The tarball which I downloaded from the datastax lab does not have InventoryMapperBuilder code.
Bringing together the Apache Cassandra experts from the community and DataStax.
Want to learn? Have a question? Want to share your expertise? You are in the right place!
Not sure where to begin? Getting Started
The tarball which I downloaded from the datastax lab does not have InventoryMapperBuilder code.
Hi @amit535_97416,
the InventoryMapperBuilder class is generated code based on your annotations.
The java-driver-mapper-processor
artifact contains the annotation processor. It hooks into the Java compiler, and generates additional source files from your annotated classes before the main compilation happens.
Have a look at the driver documentation here:
https://docs.datastax.com/en/developer/java-driver/4.8/manual/mapper/config/
and
https://docs.datastax.com/en/developer/java-driver/4.8/manual/mapper/mapper/
You would need to generate the class first.
Also a note re the lab release of the Datastax java driver spring boot starter. As far as I know it is no longer developed.
The recommendation is now to go with Spring Data Cassandra.
https://docs.spring.io/spring-data/cassandra/docs/current/reference/html/#reference
For an example using the Mapper, check out the Cassandra Workshop Series, week 4, Getting Started with Astra Java:
I hope this helps!
Thanks Bettina, I was using eclipse and running the program as Spring boot application, the class was not getting generated.
When I built using Maven it got generated.
As suggested above, I generally use spring data Cassandra,
but this time I have created a keyspace and table using AWS Keyspaces in AWS and was trying to connect programmatically, but it was failing to connect using the application.conf and the DriverConfigLoader when used with Spring data cassandra and I have no clue how to pass the DefaultSslEngineFactory using the spring.data.* properties, hence wanted to explore the java-driver-spring-boot from datastax.
I'll look into the link for the mapper example (Astra Java).
6 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2022 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use