Hi
yes, I can run it without, but I have several persistence units defined and I
would have to delete all but one for it to work.
I have actually done that as a work-around, and I ran straight into class
loading problems with tomcat, and ClassNotFoundExceptions appearing for anything
that I had in the tomcat lib directory for the javaagent operation.
Regards
Adam
Rick Curtis on 08/12/09 17:25, wrote:
Adam -
Have you tried setting the javaagent without the =properties=persis.... ?
Another option would be build/package time enhancement?
Thanks,
Rick
Adam Hardy-4 wrote:
I'm using the Eclipse Galileo and WTP to run an embedded instance of
tomcat in
Eclipse and I am trying to run enhancement on my webapp's entities using
any
means possible but am having no luck so far.
The furthest I get is with the javaagent as a parameter on the tomcat
launch
config. However this fails when I try to specify the persistence.xml file.
I tried:
-javaagent:/disk2/java/m2-repo/org/apache/openjpa/openjpa/1.2.2-SNAPSHOT/openjpa-1.2.2-SNAPSHOT.jar=properties=persistence.xml#OpenJpaJdbc
and I get this:
by: java.util.MissingResourceException: persistence.xml#OpenJpaJdbc
at
org.apache.openjpa.lib.conf.ProductDerivations.load(ProductDerivations.java:272)
at
org.apache.openjpa.lib.conf.Configurations.populateConfiguration(Configurations.java:344)
at
org.apache.openjpa.enhance.PCEnhancerAgent.registerClassLoadEnhancer(PCEnhancerAgent.java:101)
at
org.apache.openjpa.enhance.PCEnhancerAgent.premain(PCEnhancerAgent.java:82)
... 6 more
The line works fine when I'm using it as a parameter to run junit tests,
but not
here.
I can see that Eclipse-Tomcat has put the persistence.xml file deep in its
directory structure somewhere, but giving the full path as a parameter
didn't
help anyway, it should be picked up from the classpath, I assume.