On May 22, 2008, at 3:38 PM, fmchale wrote:
Hello,
Our team is using geronimo for our application server so we thought
it best
to use openejb to do unit testing. I have been attempting to set it
up
using eclipse. I have followed the examples and created a simple
test case
for an EJB. Everything seems to go smoothly until I run into this
error
INFO - PersistenceUnit(name=MatchMakerModel,
provider=org.apache.openjpa.persistence.PersistenceProviderImpl)
15:15:57,468 INFO [startup] PersistenceUnit(name=MatchMakerModel,
provider=org.apache.openjpa.persistence.PersistenceProviderImpl)
ERROR - JAVA AGENT NOT INSTALLED. The JPA Persistence Provider
requested
installation of a ClassFileTransformer which requires a JavaAgent.
See
http://openejb.apache.org/3.0/javaagent.html
15:15:57,734 ERROR [startup] JAVA AGENT NOT INSTALLED. The JPA
Persistence
Provider requested installation of a ClassFileTransformer which
requires a
JavaAgent. See http://openejb.apache.org/3.0/javaagent.html
After reading through the examples and forums I have found that
since we are
using openjpa we need to also have the open-ejb java agent. I have
tried to
include this in the build path but the error still occurs.
The openejb-javaagent-3.0.jar needs to be specified using the "-
javaagent" vm parameter which is different than the "-classpath" vm
parameter. There should be somewhere in Eclipse where you can specify
additional java options for running tests where you can add "-
javaagent:<some-path>/openejb-javaagent-3.0.jar".
Also note that OpenJPA does have some support for running without a
javaagent, but it's not complete. You might be able to get by without
one but definitely it's better to run with it.
-David