5 Replies Latest reply: Jun 10, 2011 5:08 PM by Tariq Lahyani RSS

-javaagent problem

loupi loupi Newbie

hi!!

What is this error please

 

"FATAL ERROR in native method: processing of -javaagent failed"

 

I created two examples, the first works fine but the second shows me this error

Tahnk you

  • 1. -javaagent problem
    loupi loupi Newbie

    Hi,

    here's the error :

    java.lang.NoClassDefFoundError: javassist/scopedpool/ScopedClassPoolFactory

        at java.lang.Class.getDeclaredMethods0(Native Method)

        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)

        at java.lang.Class.getMethod0(Class.java:2670)

        at java.lang.Class.getMethod(Class.java:1603)

        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:294)

        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)

    Caused by: java.lang.ClassNotFoundException: javassist.scopedpool.ScopedClassPoolFactory

        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

        ... 6 more

    FATAL ERROR in native method: processing of -javaagent failed

    Exception in thread "main"

     

    Question: Why javaagent work in a single example, must i make some configurations??

    PLEASE,  I really need your help!!

  • 2. -javaagent problem
    loupi loupi Newbie

    Hello everyone,
    the problem is resolved by adding all the jar files in the classpath of my second project!!!
    I don't know if this is the right solution! but the essential my second example works:))
    If you have any answers, please do not hesitate

  • 3. -javaagent problem
    Flavia Rainone Master

    ScopedClassPoolFactory is contained in the jboss-classpool-scoped.jar, this jar must be in the classpath so the JVM can load the agent code correctly.

  • 4. Re: -javaagent problem
    Michal Eibl Newbie

    Sorry, it isn't. It is part of javassist.jar (see full name of the class: javassist.scopedpool.ScopedClassPoolFactory and you can also check it in the mentioned jar file).

     

    But when I add the javassist.jar, it requires jboss-common-core.jar, then jboss-logging-spi.jar and then trove.jar. After all I get a message:

     

    ERROR: transport error 202: gethostbyname: unknown host

    ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)

    JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]

    FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)

     

    Any idea?

  • 5. Re: -javaagent problem
    Tariq Lahyani Newbie

    Where can I get jboss-classpool-scoped.jar from?

    I downloaded jBoss pojo cache and I am getting the same error mentioned above, but I do not see this jar in the lib folder.  Googling it did not produce much.

     

    Thanks,