Forum Discussion

mileppaa's avatar
mileppaa
Occasional Contributor
9 years ago
Solved

Hermes JMS not working properly with Ready API 1.5.0

Hi,

 

I just had to switch back to 1.4.1 Ready API as I noticed that something has been changed in 1.5.0.regarding the hadling of Hermes in Groovy scripts.

Problem is java linked naming exception coming when you try to run groovy script that tries to utilize Hermes. Example from

http://readyapi.smartbear.com/structure/steps/script/groovy/jms

is good example.

 

When trying to run this script, error comes with this line:

def hermes = HermesUtils.getHermes( context.testCase.testSuite.project, jmsEndpoint.sessionName)

 

Original installation was made on top of Ready API 1.4.1 by update. When I noticed that Groovy scripts (using the HermesUtils getHermes) were not working, I removed the installation and installed a clean 1.5.0. Clean installation brought it's own problem with hermes, as after that the hermes-config -file was not found. Yes, I did give the path to the correct folder, and Yes, the config file was working before the 1.5.0 installation (And yes, it is now working with 1.4.1 version.

 

This is the error:

2015-11-17 10:53:31,266 ERROR [errorlog] java.lang.LinkageError: loader constraint violation: loader (instance of sun/misc/Launcher$AppClassLoader) previously initiated loading for a different type with name "hermes/HermesDispatcher"
java.lang.LinkageError: loader constraint violation: loader (instance of sun/misc/Launcher$AppClassLoader) previously initiated loading for a different type with name "hermes/HermesDispatcher"
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.privateGetPublicMethods(Unknown Source)
    at java.lang.Class.getMethods(Unknown Source)
    at org.codehaus.groovy.reflection.stdclasses.CachedSAMClass.getSAMMethod(CachedSAMClass.java:164)
    at org.codehaus.groovy.reflection.ClassInfo.isSAM(ClassInfo.java:359)
    at org.codehaus.groovy.reflection.ClassInfo.createCachedClass(ClassInfo.java:349)
    at org.codehaus.groovy.reflection.ClassInfo.access$700(ClassInfo.java:41)
    at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:497)
    at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:488)
    at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:49)
    at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:36)
    at org.codehaus.groovy.reflection.ClassInfo.getCachedClass(ClassInfo.java:111)
    at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:110)
    at org.codehaus.groovy.classgen.asm.BytecodeHelper.box(BytecodeHelper.java:605)
    at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.writeMethod(CallSiteGenerator.java:97)
    at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.genCallXxxWithArray(CallSiteGenerator.java:140)
    at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.genStaticMetaMethodSite(CallSiteGenerator.java:203)
    at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:244)
    at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:288)
    at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
    at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3385)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:77)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:162)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
    at Script1.run(Script1.groovy:17)
    at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:92)
    at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:76)
    at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:155)
    at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:263)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

 

 

 

  • Yep,

     

    Problem is inside the Ready API, not much I can do with that. Anyways, Jira issue was created about this as support was able to reproduce this.

     

    Solution for now is to use older version 1.4.1

     

    Hermes JMS support in Ready API / SOAP UI is cool thing but I hope it could switched to some other JMS tool as Hermes is getting outdated and there seems to be no support for that anymore.

  • Hi

     

    I checked this issue with latest Ready! API 1.6.0 and now the HermesJMS is working again. So this bug is now fixed :-)

     

    Good Job SmartBear!

10 Replies

    • mileppaa's avatar
      mileppaa
      Occasional Contributor

      Yep,

       

      Problem is inside the Ready API, not much I can do with that. Anyways, Jira issue was created about this as support was able to reproduce this.

       

      Solution for now is to use older version 1.4.1

       

      Hermes JMS support in Ready API / SOAP UI is cool thing but I hope it could switched to some other JMS tool as Hermes is getting outdated and there seems to be no support for that anymore.

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi mileppaa,

         

        Thanks for submitting this issue to our Ready! API Customer Care team. I hope our developers will be able to fix it as soon as possible.