Weblogic in Production Mode prevents -javaagent command

classic Classic list List threaded Threaded
3 messages Options
Mark Dollemore Mark Dollemore
Reply | Threaded
Open this post in threaded view
|

Weblogic in Production Mode prevents -javaagent command

Run into a problem whereby we can't load the Jolokia agent using the -javaagent command on our Production weblogic environment, works perfectly in test, but not prod. The difference appears to be that prod is running with Production_mode=True where as Dev has this set to False.

Anyone else come across this, or how to get round it??

Error message we get is:-

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:325)
        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
Caused by: java.lang.NoClassDefFoundError: java/lang/ReflectiveOperationException
        at org.jolokia.jvmagent.handler.JolokiaHttpHandler.start(JolokiaHttpHandler.java:105)
        at org.jolokia.jvmagent.handler.JolokiaHttpHandler.start(JolokiaHttpHandler.java:132)
        at org.jolokia.jvmagent.JolokiaServer.start(JolokiaServer.java:111)
        at org.jolokia.jvmagent.JvmAgent.startAgent(JvmAgent.java:89)
        at org.jolokia.jvmagent.JvmAgent.premain(JvmAgent.java:67)
        ... 6 more
Caused by: java.lang.ClassNotFoundException: java.lang.ReflectiveOperationException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 11 more
FATAL ERROR in native method: processing of -javaagent failed

Graeme Graeme
Reply | Threaded
Open this post in threaded view
|

Re: Weblogic in Production Mode prevents -javaagent command

I've just started to look at jolokia I am using Java 1.6.0_45 on a Windows 64 bit machine - I get the same error.  I've been unable to use the agent with our application.

Have you discovered a solution yet?

Mark Dollemore Mark Dollemore
Reply | Threaded
Open this post in threaded view
|

Re: Weblogic in Production Mode prevents -javaagent command

Appears that version 1.3.2 of Jolokia agents works fine. Maybe give this a go.