# No converter found capable of converting from type \[com.google.protobuf.ByteString$LiteralByteString\] to type \[java.lang.String\]

**URL:** <https://devforum.okta.com/t/no-converter-found-capable-of-converting-from-type-com-google-protobuf-bytestring-literalbytestring-to-type-java-lang-string/31041>\
**Category:** OAuth/OIDC\
**Tags:** spring, java\
**Created:** [October 25, 2024, 5:30pm UTC](https://devforum.okta.com/t/no-converter-found-capable-of-converting-from-type-com-google-protobuf-bytestring-literalbytestring-to-type-java-lang-string/31041 "2024-10-25T17:30:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wale](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@Wale](https://devforum.okta.com/u/Wale)\
**Post date:** [October 25, 2024, 5:30pm UTC](https://devforum.okta.com/t/no-converter-found-capable-of-converting-from-type-com-google-protobuf-bytestring-literalbytestring-to-type-java-lang-string/31041/1 "2024-10-25T17:30:33Z")

</div>

Currently running into an issue while trying to use GCP secret manager to hide okta-client-id and secret within the application.properties. The error as seen in the title reads ‘No converter found capable of converting from type [com.google.protobuf.ByteString$LiteralByteString] to type [java.lang.String]’. The stack trace can be found below. For more details, I am using spring boot (3.3.4), `"com.okta.spring:okta-spring-boot-starter:3.0.7"`, and `"com.google.cloud:spring-cloud-gcp-starter-secretmanager:5.7.0"`. You can also find the build.gradle below. This issue only occurs when using secret manager with okta environment properties, if I set a value from secret manager to any non okta property then there is no issue i.e `test=${sm://okta-client-secret}` works.

Stack Trace

```auto
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [com.google.protobuf.ByteString$LiteralByteString] to type [java.lang.String]
	at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:294)
	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:185)
	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:165)
	at org.springframework.core.env.AbstractPropertyResolver.convertValueIfNecessary(AbstractPropertyResolver.java:265)
	at org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertyResolver.getProperty(ConfigurationPropertySourcesPropertyResolver.java:82)
	at org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertyResolver.getPropertyAsRawString(ConfigurationPropertySourcesPropertyResolver.java:71)
	at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:153)
	at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
	at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:239)
	at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210)
	at org.springframework.core.env.AbstractPropertyResolver.resolveNestedPlaceholders(AbstractPropertyResolver.java:230)
	at org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertyResolver.getProperty(ConfigurationPropertySourcesPropertyResolver.java:80)
	at org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertyResolver.getProperty(ConfigurationPropertySourcesPropertyResolver.java:61)
	at org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:552)
	at com.okta.spring.boot.oauth.env.OktaOAuth2PropertiesMappingEnvironmentPostProcessor.postProcessEnvironment(OktaOAuth2PropertiesMappingEnvironmentPostProcessor.java:115)
	at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:109)
	at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:94)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
	at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136)
	at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:81)
	at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:64)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118)
	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112)
	at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:63)
	at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:370)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:330)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
	at com.ga_residential.ga_residential_backend.GaResidentialBackendApplicationKt.main(GaResidentialBackendApplication.kt:13)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50)

Process finished with exit code 0

```

build.gradle

```auto
plugins {
	kotlin("jvm") version "1.9.25"
	kotlin("plugin.spring") version "1.9.25"
	kotlin("plugin.jpa") version "1.9.25"
	id("org.springframework.boot") version "3.3.4"
	id("io.spring.dependency-management") version "1.1.6"
}

group = "com.demo-oauth"
version = "0.0.1-SNAPSHOT"

java {
	toolchain {
		languageVersion = JavaLanguageVersion.of(21)
	}
}

repositories {
	mavenCentral()
}

dependencies {
	implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
	implementation("org.springframework.boot:spring-boot-starter-web")
	implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
	implementation("com.okta.spring:okta-spring-boot-starter:3.0.7")
	implementation("io.github.wimdeblauwe:htmx-spring-boot-thymeleaf:3.5.0")
	implementation("org.flywaydb:flyway-core")
	implementation("org.flywaydb:flyway-database-postgresql")
	implementation("org.jetbrains.kotlin:kotlin-reflect")
	implementation("com.google.cloud:spring-cloud-gcp-starter-secretmanager:5.7.0")
	runtimeOnly("org.postgresql:postgresql")
	runtimeOnly("org.springframework.boot:spring-boot-devtools")
	testImplementation("org.springframework.boot:spring-boot-starter-test")
	testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
	testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

kotlin {
	compilerOptions {
		freeCompilerArgs.addAll("-Xjsr305=strict")
	}
}

tasks.withType<Test> {
	useJUnitPlatform()
}

```

---

<div class="post-metadata">

**Author:** ![vk-giri](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/vk-giri/32/5178_2.png) [@vk-giri](https://devforum.okta.com/u/vk-giri)\
**Post date:** [November 18, 2024, 8:34am UTC](https://devforum.okta.com/t/no-converter-found-capable-of-converting-from-type-com-google-protobuf-bytestring-literalbytestring-to-type-java-lang-string/31041/2 "2024-11-18T08:34:46Z")

</div>

Hi,

The GCP Secret Manager falls outside the scope of Okta. Please consult the GCP documentation to determine the appropriate steps for troubleshooting this issue.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [December 18, 2024, 8:35am UTC](https://devforum.okta.com/t/no-converter-found-capable-of-converting-from-type-com-google-protobuf-bytestring-literalbytestring-to-type-java-lang-string/31041/3 "2024-12-18T08:35:10Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
