Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid CQL form [keyspace_name]: needs double quotes #1362

Closed
krishna-maersk opened this issue Mar 17, 2023 · 3 comments
Closed

Invalid CQL form [keyspace_name]: needs double quotes #1362

krishna-maersk opened this issue Mar 17, 2023 · 3 comments
Labels
for: external-project For an external project and not something we can fix

Comments

@krishna-maersk
Copy link

krishna-maersk commented Mar 17, 2023

Unable to set keyspace name in application.properties or yml, when we provided without quotes it throughs below error

Caused by: java.lang.IllegalArgumentException: Invalid CQL form [keyspace_name]: needs double quotes
	at com.datastax.oss.driver.shaded.guava.common.base.Preconditions.checkArgument(Preconditions.java:216) ~[java-driver-shaded-guava-25.1-jre-graal-sub-1.jar:na]
	at com.datastax.oss.driver.api.core.CqlIdentifier.fromCql(CqlIdentifier.java:80) ~[java-driver-core-4.15.0.jar:na]
	at com.datastax.oss.driver.api.core.session.SessionBuilder.withKeyspace(SessionBuilder.java:571) ~[java-driver-core-4.15.0.jar:na]
	at org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration.cassandraSessionBuilder(CassandraAutoConfiguration.java:98) ~[spring-boot-autoconfigure-3.0.4.jar:3.0.4]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:139) ~[spring-beans-6.0.6.jar:6.0.6]
	... 103 common frames omitted


when we give with double quotes:

spring.cassandra.keyspace-name="keyspace_name"

we got below:

Caused by: com.datastax.oss.driver.api.core.InvalidKeyspaceException: Invalid keyspace "keyspace_name"
	at com.datastax.oss.driver.api.core.InvalidKeyspaceException.copy(InvalidKeyspaceException.java:34) ~[java-driver-core-4.15.0.jar:na]
	at com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures.getUninterruptibly(CompletableFutures.java:149) ~[java-driver-core-4.15.0.jar:na]
	at com.datastax.oss.driver.api.core.session.SessionBuilder.build(SessionBuilder.java:835) ~[java-driver-core-4.15.0.jar:na]
	at org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration.cassandraSession(CassandraAutoConfiguration.java:87) ~[spring-boot-autoconfigure-3.0.4.jar:3.0.4]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:139) ~[spring-beans-6.0.6.jar:6.0.6]
	... 91 common frames omitted


setup :
java 17
id 'org.springframework.boot' version '3.0.4'
which includes
image

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 17, 2023
@mp911de
Copy link
Member

mp911de commented Mar 17, 2023

This is Spring Boot code, please file this ticket at https://github.com/spring-projects/spring-boot/issues

@mp911de mp911de closed this as not planned Won't fix, can't repro, duplicate, stale Mar 17, 2023
@mp911de mp911de added for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 17, 2023
@xzeexcz
Copy link

xzeexcz commented Apr 17, 2024

Did you fix it?

@Pseudow
Copy link

Pseudow commented Apr 20, 2024

Did you fixt it?

@spring-projects spring-projects locked as resolved and limited conversation to collaborators Apr 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
for: external-project For an external project and not something we can fix
Projects
None yet
Development

No branches or pull requests

5 participants