RE: Tomcat and openjpa javaagent
Try putting that jar into Tomcat's bin directory instead. It must be available to the system classloader, not Tomcat's common classloader. This had no effect. Tomcat in startup script sets the CLASSPATH variable to $CATALINA_HOME/bin/bootstrap.jar, so i tried to modify it in catalina.sh to $CATALINA_HOME/bin/commons-lang-2.3.jar. Now tomcat starts, but when launching my application I'm getting more exceptions, first: Caused by: NoClassDefFoundError: javax/persistence/spi/PersistenceProvider I've added geronimo-jpa_3.0_spec-1.0.jar and then I got Caused by: java.lang.ClassNotFoundException: javax.transaction.Synchronization so it asks me for a bunch of libs from my WEB-INF/lib directory. And finally JVM says it is unable to load classes from my app. So i think it is not a right way to fix my problem) Hoping for your help! -- View this message in context: http://old.nabble.com/Tomcat-and-openjpa-javaagent-tp28506406p28509633.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and openjpa javaagent
On 10/05/2010 10:57, n0weak wrote: Try putting that jar into Tomcat's bin directory instead. It must be available to the system classloader, not Tomcat's common classloader. This had no effect. Tomcat in startup script sets the CLASSPATH variable to $CATALINA_HOME/bin/bootstrap.jar, so i tried to modify it in catalina.sh to $CATALINA_HOME/bin/commons-lang-2.3.jar. Now tomcat starts, but when launching my application I'm getting more exceptions, first: Caused by: NoClassDefFoundError: javax/persistence/spi/PersistenceProvider I've added geronimo-jpa_3.0_spec-1.0.jar and then I got Caused by: java.lang.ClassNotFoundException: javax.transaction.Synchronization so it asks me for a bunch of libs from my WEB-INF/lib directory. And finally JVM says it is unable to load classes from my app. So i think it is not a right way to fix my problem) Hoping for your help! Perhaps the OpenJPA list would be a better place to ask this question? p signature.asc Description: OpenPGP digital signature
Re: Tomcat and openjpa javaagent
geronumolibs need a jee container to function otherwise the classes will never be instantiated. Use hibernate as a possible workaround -- From: n0weak n0w...@gmail.com Sent: Monday, May 10, 2010 11:57 AM To: users@tomcat.apache.org Subject: RE: Tomcat and openjpa javaagent Try putting that jar into Tomcat's bin directory instead. It must be available to the system classloader, not Tomcat's common classloader. This had no effect. Tomcat in startup script sets the CLASSPATH variable to $CATALINA_HOME/bin/bootstrap.jar, so i tried to modify it in catalina.sh to $CATALINA_HOME/bin/commons-lang-2.3.jar. Now tomcat starts, but when launching my application I'm getting more exceptions, first: Caused by: NoClassDefFoundError: javax/persistence/spi/PersistenceProvider I've added geronimo-jpa_3.0_spec-1.0.jar and then I got Caused by: java.lang.ClassNotFoundException: javax.transaction.Synchronization so it asks me for a bunch of libs from my WEB-INF/lib directory. And finally JVM says it is unable to load classes from my app. So i think it is not a right way to fix my problem) Hoping for your help! -- View this message in context: http://old.nabble.com/Tomcat-and-openjpa-javaagent-tp28506406p28509633.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and openjpa javaagent
Well, I set openjpa-all-2.0.0.jar as javaagent, and all startup exceptions are gone. Still there is no runtime optimization available, an exeption is being throwed when accessing the database: Caused by: openjpa-2.0.0-r422266:935683 nonfatal user error org.apache.openjpa.persistence.ArgumentException: This configuration disallows runtime optimization, but the following listed types were not enhanced at build time or at class load time with a javaagent: -- View this message in context: http://old.nabble.com/Tomcat-and-openjpa-javaagent-tp28506406p28511183.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat and openjpa javaagent
According to the advice from http://openjpa.208410.n2.nabble.com/openjpa-javaagent-enhancement-with-tomcat-td5029993.html this thread I switched to build-time enhancement, and it worked for me. -- View this message in context: http://old.nabble.com/Tomcat-and-openjpa-javaagent-tp28506406p28517128.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat and openjpa javaagent
From: n0weak [mailto:n0w...@gmail.com] Subject: Tomcat and openjpa javaagent and also put commons-lang-2.3.jar into tomcat lib directory. Try putting that jar into Tomcat's bin directory instead. It must be available to the system classloader, not Tomcat's common classloader. But still tomcat throws an exeption on startup: No, Tomcat doesn't, the JVM does. Note that there are no Tomcat classes in the stack trace. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org