0 Replies Latest reply on Apr 12, 2012 10:22 PM by spyhunter99

    NoSuchMethod when a jUnit test calls a web service

    spyhunter99

      So I have a simple console app that calls a web service, returning a true or false if successful. I also have a jUnit test that actually calls the same function, failling when the main function returns false.

       

      When running the app normally, there's no problems, it works.

       

      When running the junit test via ant, I get the following output

      [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 2.343 sec

      [junit]

      [junit] ------------- Standard Output ---------------

      [junit] Setting up policy

      [junit] ------------- ---------------- ---------------

      [junit] Testcase: testMain(testcmdclient.AMQPAlertSmokeTestTest):   Caused an ERROR

      [junit] org.jboss.logging.Logger.debugf(Ljava/lang/String;[Ljava/lang/Object;)V

      [junit] java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;[Ljava/lang/Object;)V

      [junit]     at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.configureStub(ServiceDelegateImpl.java:438)

      [junit]     at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.createProxy(ServiceDelegateImpl.java:416)

      [junit]     at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:243)

      [junit]     at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:574)

      [junit]     at javax.xml.ws.Service.getPort(Service.java:99)

      [junit]     at myserviceclientlibrary.getMyPortPort()....

       

      build class path, most of the libraries were grabbed from jboss 6.1final with native 3.4.1 installed

      log4j-1.2.16.jar

      syslog4j-0.9.46-bin.jar

      qpidclient-client-14.jar

      geronimo-jms_1.1_spec-1.0.jar

      myclientlibrary.jar

      jbossws-native-core-3.4.1.SP2.jar

      jbossws-common-jbossws341SP2.jar

      trove.jar

      xercesImpl.jar

      jbossws-spi-jbossws341.jar

      jboss61jbossxb.jar

      mail.jar

      jboss61wsdl4j.jar

      jboss61wscommons-policy.jar

      commons-logging-1.1.1.jar

      javassist.jar

      jaxb-impl.jar

      jboss61jboss-logging.jar

      jboss61jaxrpc-api.jar

       

       

      its obviously a class loading issue but i am not rally sure what the root cause is. any advice?