Skip to content
mevivs edited this page Sep 21, 2012 · 20 revisions

1. I get below error while persisting data:

org.scale7.cassandra.pelops.exceptions.InvalidRequestException at org.scale7.cassandra.pelops.exceptions.IExceptionTranslator$ExceptionTranslator.translate(IExceptionTranslator.java:47) at org.scale7.cassandra.pelops.Operand.tryOperation(Operand.java:109) at org.scale7.cassandra.pelops.Mutator.execute(Mutator.java:72) at com.impetus.kundera.cassandra.client.pelops.PelopsClient.writeData(PelopsClient.java:191) at com.impetus.kundera.cassandra.ColumnFamilyDataAccessor.write(ColumnFamilyDataAccessor.java:100) at com.impetus.kundera.db.DataManager.persist(DataManager.java:79) at com.impetus.kundera.ejb.EntityManagerImpl.persist(EntityManagerImpl.java:346) at com.impetus.kundera.examples.twitter.dao.TwitterService.addUser(TwitterService.java:64) at com.impetus.kundera.examples.twitter.TwitterTestSuite.addUsers(TwitterTestSuite.java:93) at com.impetus.kundera.examples.twitter.TwitterTestSuite.executeTestSuite(TwitterTestSuite.java:80) at com.impetus.kundera.examples.twitter.TwissandraTest.testOnExecute(TwissandraTest.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: InvalidRequestException(why:no keyspace has been specified) at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:19045) at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:1035) at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:1009) at org.scale7.cassandra.pelops.Mutator$1.execute(Mutator.java:67) at org.scale7.cassandra.pelops.Mutator$1.execute(Mutator.java:63) at org.scale7.cassandra.pelops.Operand.tryOperation(Operand.java:82) ... 27 more

Solution: If you are using Cassandra as standalone server, you need to create your keyspaces and column families before persisting/ accessing data.

2. I get below warning:

[WARN ] [main] com.impetus.kundera.metadata.KunderaMetadataManager - No Entity metadata found for the class class User. Any CRUD operation on this entity will fail.If your entity is for RDBMS, make sure you put fully qualified entity class name under class tag in persistence.xml for RDBMS persistence unit. Returning null value.

Solution: This happens when Kundera is not able to read and load your entity classes. This is essential for it to perform almost any operation. Make sure your entity class is in classpath and is annotated with @Table in the following format:

@Table(name="tableName", schema="schemaName@persistenceUnit")

schemaName and persistenceUnit must match with the one specified in persistence.xml.

Home

Home

Clone this wiki locally