On Jul 24, 2010, at 4:57 AM, Henri Gomez wrote:

>>> Note, I'm using openejb 3.1 as a webapp in Tomcat 6.0.28
>> 
>> Yep.  The setup should copy the agent jar into the Tomcat lib dir and then 
>> mod the catalina.sh so that there's a '-javaagent:' flag passed to the vm on 
>> Tomcat startup.  That will ensure the agent is there on boot and should 
>> prevent the agent from needing to attach dynamically -- which is supposed to 
>> work in java 6, but clearly having troubles.
>> 
>> Definitely let us know how it goes.
> 
> Do you means I need a special catalina.sh ?
> 
> It's strange since I'm using exactly the same runtime script (not
> catalina.sh) on Snow and Linux boxes.

You might be able to pass it via the JAVA_OPTS variable.  Basically the goal is 
to copy the openejb-javaagent-3.x.x.jar into the tomcat.home/lib/ directory and 
make sure this java option is getting passed to the jvm:

 -javaagent:$CATALINA_HOME/lib/openejb-javaagent-3.x.x.jar

When the agent is specified on the java command line it won't try and attach 
itself dynamically, which should prevent that error message you were seeing.


-David

Reply via email to