Can have you post these findings to your stack overflow post also? This information might help someone else in the future.
Thanks, Rick On Fri, Dec 6, 2013 at 9:13 AM, Dieter Meier (JIRA) <[email protected]> wrote: > > [ > https://issues.apache.org/jira/browse/OPENJPA-2462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841339#comment-13841339] > > Dieter Meier commented on OPENJPA-2462: > --------------------------------------- > > Thank you Rick, > > your guess was right. I had the Problem, that I included to many not > needed jars in the Ant-Script > (following hints I found on miscellaneous websites). > > I found that website > http://webspherepersistence.blogspot.de/2011/03/lightweight-jpa-testing-in-jee.htmlhelpful, > which > explained that the essential two jars for my use case are > com.ibm.ws.jpa.thinclient_8.0.0.jar > com.ibm.ws.ejb.embeddableContainer_8.0.0.jar > > Those 2 jars I already had included. The error message seems to have been > triggered from library conflicts of unneeded jars. > So after I removed the unnecessary stuff my Junit-Ant script was running > fine. > > Best Regards > > Dieter > > > > > > > > UnsatisfiedLinkError when starting a OpenJPA-Junit-Test via Ant-Script > > ---------------------------------------------------------------------- > > > > Key: OPENJPA-2462 > > URL: https://issues.apache.org/jira/browse/OPENJPA-2462 > > Project: OpenJPA > > Issue Type: Question > > Components: jpa > > Affects Versions: 2.1.1 > > Environment: Windows 7 Enterprise > > Reporter: Dieter Meier > > Priority: Minor > > Labels: newbie > > > > Hello OpenJpa & DB2 Experts, > > > > I´m getting the folloing error message(stacktrace below). The error > appears when the affected Junit test is started from an ant script. > > Starting the Junit-Test manually in Eclipse works without any > problems. Therefore the exception seems to be strange. > > For any kind input, which could push the analysis into the right > direction I would be grateful. > > > > Further Information : > > Drivers: > > db2jcc.jar > > db2jcc_license_cu.jar > > [Version 3.64.82] > > OpenJPA Version : 2.1.2 > > Persistence.xml: > > <?xml version="1.0" encoding="UTF-8"?> > > <persistence xmlns="http://java.sun.com/xml/ns/persistence" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > version="2.0" > > xsi:schemaLocation="http://java.sun.com/xml/ns/persistence > http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> > > > > <persistence-unit name="mypersistenceunit" > transaction-type="RESOURCE_LOCAL"> > > > <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> > > <class>common.data.domain.MyDomainObjectx</class> > > <class>common.data.domain.MyDomainObjecty</class> > > <properties> > > <property name="openjpa.ReadLockLevel" value="none"/> > > <property name="openjpa.Log" value="DefaultLevel=TRACE, > Runtime=TRACE, Tool=TRACE, SQL=TRACE, Enhance=TRACE"/> > > <property name="openjpa.ConnectionFactoryProperties" > value="PrettyPrint=true, PrettyPrintLineLength=72"/> > > <property name="javax.persistence.jdbc.driver" > value="com.ibm.db2.jcc.DB2Driver"/> > > <property name="javax.persistence.jdbc.url" > value="jdbc:db2://xyz:62000/MyDBInstance"/> > > <property name="javax.persistence.jdbc.user" value="myuser"/> > > <property name="javax.persistence.jdbc.password" > value="mypass"/> > > </properties> > > > > </persistence-unit> > > </persistence> > > [junit] at > org.apache.openjpa.jdbc.schema.DataSourceFactory.newConnectException(DataSourceFactory.java:261) > > [junit] at > org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:247) > > [junit] at > org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:733) > > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > > [junit] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) > > [junit] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) > > [junit] at java.lang.reflect.Method.invoke(Method.java:611) > > [junit] at > org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:295) > > [junit] at > org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1652) > > [junit] at > org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:645) > > [junit] at > org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:204) > > [junit] at > org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) > > [junit] at > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) > > [junit] at > com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:50) > > [junit] at > com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:35) > > [junit] > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > > [junit] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) > > [junit] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) > > [junit] at java.lang.reflect.Method.invoke(Method.java:611) > > [junit] at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) > > [junit] at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > > [junit] at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) > > [junit] at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) > > [junit] at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) > > [junit] at > org.junit.runners.ParentRunner.run(ParentRunner.java:300) > > [junit] at > junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) > > [junit] at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:420) > > [junit] at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911) > > [junit] at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768) > > [junit] Caused by: > com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: > [jcc][t4][2043][11550][3.64.82] Exception > java.lang.reflect.InvocationTargetException: Error opening socket to server > xyz.com/11.11.111.11 on port 62,000 with message: null. ERRORCODE=-4499, > SQLSTATE=08001 > > [junit] at com.ibm.db2.jcc.am.bd.a(bd.java:321) > > [junit] at com.ibm.db2.jcc.am.bd.a(bd.java:340) > > [junit] at com.ibm.db2.jcc.t4.vb.a(vb.java:436) > > [junit] at com.ibm.db2.jcc.t4.vb.<init>(vb.java:93) > > [junit] at com.ibm.db2.jcc.t4.a.b(a.java:355) > > [junit] at com.ibm.db2.jcc.t4.b.newAgent_(b.java:2026) > > [junit] at > com.ibm.db2.jcc.am.Connection.initConnection(Connection.java:718) > > [junit] at > com.ibm.db2.jcc.am.Connection.<init>(Connection.java:667) > > [junit] at com.ibm.db2.jcc.t4.b.<init>(b.java:332) > > [junit] at > com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:232) > > [junit] at > com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:198) > > [junit] at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:475) > > [junit] at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:116) > > [junit] at > org.apache.openjpa.jdbc.schema.SimpleDriverDataSource.getSimpleConnection(SimpleDriverDataSource.java:96) > > [junit] at > org.apache.openjpa.jdbc.schema.SimpleDriverDataSource.getConnection(SimpleDriverDataSource.java:92) > > [junit] at > org.apache.openjpa.jdbc.schema.SimpleDriverDataSource.getConnection(SimpleDriverDataSource.java:88) > > [junit] at > org.apache.openjpa.lib.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:139) > > [junit] at > org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:112) > > [junit] at > org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:239) > > [junit] ... 28 more > > [junit] Caused by: java.lang.reflect.InvocationTargetException > > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > Method) > > [junit] at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) > > [junit] at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) > > [junit] at java.lang.reflect.Method.invoke(Method.java:611) > > [junit] at com.ibm.db2.jcc.t4.v.run(v.java:69) > > [junit] at > java.security.AccessController.doPrivileged(AccessController.java:251) > > [junit] at com.ibm.db2.jcc.t4.vb.a(vb.java:422) > > [junit] ... 44 more > > [junit] Caused by: java.lang.UnsatisfiedLinkError: > com/ibm/net/SocketUtils.configureKeepAlive(JIII)V > > [junit] at > com.ibm.net.SocketUtils.configureKeepAlive(SocketUtils.java:233) > > [junit] ... 51 more > > [junit] ) > > [junit] class load: > org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirrorImpl$VmExitErrorTest > from: > file:/C:/IBM/Ressource/SDP/plugins/org.apache.ant_1.7.1.v20100518-1145/lib/ant-junit.jar > > [junit] class load: java/util/Collections$1 > > [junit] class load: org/w3c/dom/CDATASection > > [junit] class load: org/apache/xerces/dom/CDATASectionImpl > > [junit] Tests run: 0, Failures: 0, Errors: 1, Time elapsed: 3.391 sec > > [junit] class load: sun/nio/cs/UTF8_Encoder > > [junit] class load: sun/nio/cs/UTF_8$Encoder > > [junit] class load: org.apache.tools.ant.util.DOMElementWriter from: > file:/C:/IBM/Ressource/SDP/plugins/org.apache.ant_1.7.1.v20100518-1145/lib/ant.jar > > [junit] class load: > org.apache.tools.ant.util.DOMElementWriter$XmlNamespacePolicy from: > file:/C:/IBM/Ressource/SDP/plugins/org.apache.ant_1.7.1.v20100518-1145/lib/ant.jar > > [junit] class load: java/util/IdentityHashMap$1 > > [junit] class load: java/util/IdentityHashMap$IdentityHashMapIterator > > [junit] class load: java/util/IdentityHashMap$1$1 > > [junit] class load: java/util/IdentityHashMap$IdentityHashMapEntry > > [junit] class load: com/ibm/tools/attach/javaSE/AttachHandler$1 > > [junit] class load: java/lang/Thread$State > > [junit] class load: java/io/DeleteOnExitHook > > > > -- > This message was sent by Atlassian JIRA > (v6.1#6144) > -- *Rick Curtis*
