3 Replies Latest reply: Apr 25, 2012 12:47 PM by Jerry Watts RSS

Arquillian  - NoClassDefFoundError: org/jboss/byteman/agent/submit/Submit

Jerry Watts Newbie

Hello,

 

I keep getting this error when running arquillian-extension_byteman as remote container on jboss-as-7.1.0.Final:

 

java.lang.NoClassDefFoundError: org/jboss/byteman/agent/submit/Submit

    at org.jboss.arquillian.extension.byteman.impl.common.SubmitUtil.install(SubmitUtil.java:37)

    at org.jboss.arquillian.extension.byteman.impl.container.RuleInstaller.installClass(RuleInstaller.java:44)

    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)

 

All the byteman jars (byteman-submit.jar,byteman.jar,byteman-install.jar) are on the classpath and are located in the same directory as arquillian-extension-byteman-1.0.0.jar.

 

 

Initial observation: it appears that the DeploymentAppender.java class adds the Submit.class and few others are added to the  archive that Arquillian creates and deploys. I opened up the test.jar that gets created and deployed and did not see the following classes: Submit.class, ScriptText.class, BMRule.class, BMRules.class, BytemanRemoteExtension.class, GenerateScriptUtil.class, SubmitException.class, BytemanConfiguration.class); So it appears that this is the cause of the NoClassDefFoundError. Then the question becomes, why are these not being added to the archive?

 

I'm able to run this on jboss-6.1.0.Final, so appear to be a version issues, but cannot determine what version of what I'm missing.

 

Attached is my pom.xml

 

Thanks

  • 1. Re: Arquillian  - NoClassDefFoundError: org/jboss/byteman/agent/submit/Submit
    Aslak Knutsen Master

    Is you remote jboss as 7 server started as desribed in the notes here: https://github.com/arquillian/arquillian-extension-byteman ?

  • 2. Re: Arquillian  - NoClassDefFoundError: org/jboss/byteman/agent/submit/Submit
    Jerry Watts Newbie

    Yes, below is myArquillian.xml. Howerver I was receiveing: NoClassDefFoundError: com/sun/tools/attach/VirtualMachine, so I ended up adding the following to my standalone.bat:

     

    set JAVA_OPTS= %JAVA_OPTS% -Dorg.jboss.byteman.transform.all -javaagent:G:\lib\byteMan\byteman-download-2.0.1\lib\byteman.jar=boot:G:\lib\byteMan\byteman-download-2.0.1\lib\byteman.jar,listener:true

     

    <?xml version="1.0" encoding="UTF-8"?>

    <arquillian xmlns="http://jboss.org/schema/arquillian"

        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

     

        <!-- Uncomment to have test archives exported to the file system for inspection -->

     

        <engine>

             <property name="deploymentExportPath">target</property>

        </engine>

       

     

      <container qualifier="dev" default="true">

        <configuration>

          <property name="jbossHome">G:/jboss/installs2/jboss-as-7.1.0.Final</property>

                <!-- -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y  -->

                <!-- <property name="javaVmArguments">-Djboss.modules.system.pkgs=com.sun.tools.attach,org.jboss.byteman -Xbootclasspath/a:/usr/lib/jvm/java-6-openjdk/lib/tools.jar</property> -->

            <property name="allowConnectingToRunningServer">true</property>

          <!--<property name="javaVmArguments">-Djboss.modules.system.pkgs=com.sun.tools.attach,org.jboss.byteman -Xbootclasspath/a:${path.tools_jar}</property> -->

           <property name="javaVmArguments">-Djboss.modules.system.pkgs=com.sun.tools.attach,org.jboss.byteman -Xbootclasspath/p:D:/applications/java/64_27/lib/tools.jar</property>

        

        </configuration>

      </container>

      <extension qualifier="byteman">

        <property name="autoInstallAgent">true</property>

        <property name="agentProperties">org.jboss.byteman.verbose=true</property>

      </extension>

    </arquillian>

     

     

    Thanks

  • 3. Re: Arquillian  - NoClassDefFoundError: org/jboss/byteman/agent/submit/Submit
    Jerry Watts Newbie

    Hello,

     

    Still cannot get arquillian remote container with byteman extention working, I'm running the profile arq-jbossas-remote-7 in the example pom: https://github.com/arquillian/arquillian-extension-byteman.

     

    This error is reported in the surefire report:

    java.lang.NoClassDefFoundError: org/jboss/byteman/agent/submit/Submit

        at org.jboss.arquillian.extension.byteman.impl.common.SubmitUtil.install(SubmitUtil.java:51)

        at org.jboss.arquillian.extension.byteman.impl.container.RuleInstaller.installClass(RuleInstaller.java:44)

     

     

    I see this in the jboss console and server.log:

    JBREM000200: Remote connection failed: java.io.IOException: An established connection was aborted by the software

     

    I ensured that all the client side jars are the same version as the sever side jars, per the search results for JBREM000200 error

     

    arquillian.xml that's downloaded with the sample app, does have the correct settings listed in the notes.

     

    arq-jbossas-managed-7 profile works fine but not arq-jbossas-remote-7, both running against same jboss install.

     

    Also tried adding  <property name="allowConnectingToRunningServer">true</property> to configuration section in the arquillian.xml, then manually starting the server and running both

    arq-jbossas-managed-7 and arq-jbossas-remote-7 profile to no avail.

     

    I'm at a lost, any help and/or suggestions would be greatly appreciated. 

     

    Thanks