List:Cluster« Previous MessageNext Message »
From:Serdyn du Toit Date:June 26 2013 7:33pm
Subject:Re: ClusterJDatastoreException (possible obscure Windows error?)
View as plain text  
Okay, it isn't a machine specific issue.  I am now using the latest version
of MySql cluster and OpenJpa.

Others are struggling with the same issue here:
http://forums.mysql.com/read.php?25,582195,588316#msg-588316

My initial openjpa.ndb.connectString was as follows:
        properties.put("openjpa.ndb.connectString", "192.168.1.3:1186");

In the stacktraces a salient thing to notice is that the nodeid is zero...
INFO: Created cluster connection '192.168.1.3:1186' with node id 0.
org.apache.openjpa.persistence.PersistenceException: Error getting
connection to cluster with properties
{com.mysql.clusterj.connect.verbose=0,
com.mysql.clusterj.connect.retries=4, com.mysql.clusterj.connect.delay=5,
com.mysql.clusterj.connectstring=192.168.1.3:1186,
com.mysql.clusterj.max.transactions=1024,
com.mysql.clusterj.connect.timeout.before=30,
com.mysql.clusterj.database=clusterdb,
com.mysql.clusterj.connect.timeout.after=20}:
 Caused by com.mysql.clusterj.ClusterJDatastoreException:Datastore
exception on connectString '192.168.1.3:1186' nodeId 0; Return code: -1
error code: 0 message: .
at
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:218)
~[openjpa-all-2.2.2.jar:2.2.2]

Having a look at the manual documenting the format of the connectString:
http://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-connectstring.html
I now change the openjpa.ndb.connectString setting to the following ("the
long form" as per the manual):
        properties.put("openjpa.ndb.connectString", "nodeid=1,
192.168.1.3:1186");

The problem still persists.

Full stacktrace:
org.apache.openjpa.persistence.PersistenceException: Error getting
connection to cluster with properties
{com.mysql.clusterj.connect.verbose=0,
com.mysql.clusterj.connect.retries=4, com.mysql.clusterj.connect.delay=5,
com.mysql.clusterj.connectstring=192.168.1.3:1186,
com.mysql.clusterj.max.transactions=1024,
com.mysql.clusterj.connect.timeout.before=30,
com.mysql.clusterj.database=clusterdb,
com.mysql.clusterj.connect.timeout.after=20}:
 Caused by com.mysql.clusterj.ClusterJDatastoreException:Datastore
exception on connectString '192.168.1.3:1186' nodeId 0; Return code: -1
error code: 0 message: .
at
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:218)
~[openjpa-all-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
~[openjpa-all-2.2.2.jar:2.2.2]
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
~[openjpa-all-2.2.2.jar:2.2.2]
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
~[openjpa-all-2.2.2.jar:2.2.2]
at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
~[openjpa-all-2.2.2.jar:2.2.2]
<snip, my test classes>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.7.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
~[na:1.7.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
~[na:1.7.0_21]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_21]
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
[junit-4.10.jar:na]
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
[junit-4.10.jar:na]
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
[junit-4.10.jar:na]
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
[junit-4.10.jar:na]
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
[junit-4.10.jar:na]
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
[junit-4.10.jar:na]
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
[junit-4.10.jar:na]
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
[junit-4.10.jar:na]
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
[junit-4.10.jar:na]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
[junit-4.10.jar:na]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
[junit-4.10.jar:na]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
[junit-4.10.jar:na]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
[junit-4.10.jar:na]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
[junit-4.10.jar:na]
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
[junit-4.10.jar:na]
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
[junit-4.10.jar:na]
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
[.cp/:na]
Caused by: com.mysql.clusterj.ClusterJFatalUserException: Error getting
connection to cluster with properties
{com.mysql.clusterj.connect.verbose=0,
com.mysql.clusterj.connect.retries=4, com.mysql.clusterj.connect.delay=5,
com.mysql.clusterj.connectstring=192.168.1.3:1186,
com.mysql.clusterj.max.transactions=1024,
com.mysql.clusterj.connect.timeout.before=30,
com.mysql.clusterj.database=clusterdb,
com.mysql.clusterj.connect.timeout.after=20}:
 Caused by com.mysql.clusterj.ClusterJDatastoreException:Datastore
exception on connectString '192.168.1.3:1186' nodeId 0; Return code: -1
error code: 0 message: .
at
com.mysql.clusterj.core.SessionFactoryImpl.createClusterConnection(SessionFactoryImpl.java:252)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.core.SessionFactoryImpl.createClusterConnectionPool(SessionFactoryImpl.java:226)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.core.SessionFactoryImpl.<init>(SessionFactoryImpl.java:174)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.core.SessionFactoryImpl.getSessionFactory(SessionFactoryImpl.java:129)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.core.SessionFactoryServiceImpl.getSessionFactory(SessionFactoryServiceImpl.java:36)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.core.SessionFactoryServiceImpl.getSessionFactory(SessionFactoryServiceImpl.java:27)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.ClusterJHelper.getSessionFactory(ClusterJHelper.java:69)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.ClusterJHelper.getSessionFactory(ClusterJHelper.java:54)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.openjpa.NdbOpenJPAConfigurationImpl.createSessionFactory(NdbOpenJPAConfigurationImpl.java:311)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.openjpa.NdbOpenJPAConfigurationImpl.getSessionFactory(NdbOpenJPAConfigurationImpl.java:278)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.openjpa.NdbOpenJPAConfigurationImpl.getSessionFactory(NdbOpenJPAConfigurationImpl.java:55)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.openjpa.NdbOpenJPAStoreManager.setContext(NdbOpenJPAStoreManager.java:98)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.openjpa.NdbOpenJPAStoreManager.setContext(NdbOpenJPAStoreManager.java:92)
~[clusterj-7.3.2.jar:na]
at
org.apache.openjpa.kernel.DelegatingStoreManager.setContext(DelegatingStoreManager.java:79)
~[openjpa-all-2.2.2.jar:2.2.2]
at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:375)
~[openjpa-all-2.2.2.jar:2.2.2]
at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:326)
~[openjpa-all-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:228)
~[openjpa-all-2.2.2.jar:2.2.2]
at
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:212)
~[openjpa-all-2.2.2.jar:2.2.2]
... 35 common frames omitted
Caused by: com.mysql.clusterj.ClusterJDatastoreException: Datastore
exception on connectString '192.168.1.3:1186' nodeId 0; Return code: -1
error code: 0 message: .
at
com.mysql.clusterj.tie.ClusterConnectionImpl.throwError(ClusterConnectionImpl.java:168)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.tie.ClusterConnectionImpl.handleError(ClusterConnectionImpl.java:138)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.tie.ClusterConnectionImpl.waitUntilReady(ClusterConnectionImpl.java:123)
~[clusterj-7.3.2.jar:na]
at
com.mysql.clusterj.core.SessionFactoryImpl.createClusterConnection(SessionFactoryImpl.java:245)
~[clusterj-7.3.2.jar:na]
... 52 common frames omitted

No idea on how to fix this yet.  Might be an OpenJpa problem related to the
propagation of the connectString?  Or an MySql Cluster problem.  Not yet
clear to me...

Regards,
Serdyn du Toit

Thread
ClusterJDatastoreException (possible obscure Windows error?)Serdyn du Toit5 Jun
  • RE: ClusterJDatastoreException (possible obscure Windows error?)Andrew Morgan5 Jun
    • Re: ClusterJDatastoreException (possible obscure Windows error?)Serdyn du Toit5 Jun
      • Re: ClusterJDatastoreException (possible obscure Windows error?)Serdyn du Toit26 Jun
        • Re: ClusterJDatastoreException (possible obscure Windows error?)Serdyn du Toit26 Jun
          • Re: ClusterJDatastoreException (possible obscure Windows error?)Craig L Russell26 Jun
            • Re: ClusterJDatastoreException (possible obscure Windows error?)Serdyn du Toit26 Jun
              • Re: ClusterJDatastoreException (possible obscure Windows error?)Craig L Russell26 Jun
                • Re: ClusterJDatastoreException (possible obscure Windows error?)Serdyn du Toit29 Jun
                  • Re: ClusterJDatastoreException (possible obscure Windows error?)Andrew Morgan29 Jun
                    • Re: ClusterJDatastoreException (possible obscure Windows error?)Johan Andersson29 Jun
                      • Re: ClusterJDatastoreException (possible obscure Windows error?)Serdyn du Toit3 Jul