cancel
Showing results for 
Search instead for 
Did you mean: 

Hermes JMS not working properly with Ready API 1.5.0

SOLVED
Highlighted
Occasional Contributor

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)

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Occasional Contributor

Re: Hermes JMS not working properly with Ready API 1.5.0

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.

Occasional Contributor

Re: Hermes JMS not working properly with Ready API 1.5.0

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 10
Community Hero

Re: Hermes JMS not working properly with Ready API 1.5.0

It appears from Internet search that, it is due to class loading issue or multiple jar having such class.
You may try the way mentioned #4 in the below link to find more details
http://forum.spring.io/forum/spring-projects/container/68083-java-lang-linkageerror-loader-constrain...

 

Also suggest to open a support case for the same here



Regards,
Rao.
Occasional Contributor

Re: Hermes JMS not working properly with Ready API 1.5.0

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.

Community Manager

Re: Hermes JMS not working properly with Ready API 1.5.0

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.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Community Hero

Re: Hermes JMS not working properly with Ready API 1.5.0

Ok. In general, one should consider migrating to new version if there such a desperate need. Any way it is better to have check criteria before taking a new version.
Have you also added above comment regarding switching tool while raising the issue with support?


Regards,
Rao.
Occasional Contributor

Re: Hermes JMS not working properly with Ready API 1.5.0

I'm using the latest snapshot with the maven build run from Jenkins

 

http://smartbearsoftware.com/repository/maven2/com/smartbear/ready-api-maven-plugin/1.5.0-m-SNAPSHOT...

 

            <plugin>
                <groupId>com.smartbear</groupId>
                <artifactId>ready-api-maven-plugin</artifactId>
                <version>1.5.0-m-SNAPSHOT</version>
                <executions>
                    <execution>
                        <id>someTest</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <projectFile>${basedir}/someTest-soapui-project.xml</projectFile>
              <settingsFile>c:\Dev\soap-ui-settings\soapui-settings.xml</settingsFile>
                            <outputFolder>${project.build.directory}/surefire-reports</outputFolder>
                            <junitReport>true</junitReport>
                            <printReport>false</printReport>
                            <environment>${env}</environment>
                        </configuration>
                    </execution>
                </executions>                       
                
                <dependencies>

                     <dependency>
                        <groupId>org.reflections</groupId>
                        <artifactId>reflections</artifactId>
                        <version>0.9.9-RC1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.poi</groupId>
                        <artifactId>poi-ooxml</artifactId>
                        <version>3.10-FINAL</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.xmlbeans</groupId>
                        <artifactId>xmlbeans</artifactId>
                        <version>2.4.0</version>
                    </dependency>
                </dependencies>
            </plugin>

 

 

 

13:45:58,611 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-imq.jar for hermes.ext.imq.ImqAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-aq.jar for hermes.ext.oracle.aq.OracleAQAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-ems.jar for hermes.ext.ems.TibcoEMSAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-webspheremq.jar for hermes.ext.mq.MQSeriesAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-jbossmq.jar for hermes.ext.jbossmq.JBossMQAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-arjuna.jar for hermes.ext.arjuna.ArjunaMSAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-weblogic.jar for hermes.ext.weblogic.WebLogicJMSAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-joram.jar for hermes.ext.joram.JoramAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-wme.jar for hermes.ext.wme.WMEAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-openjms.jar for hermes.ext.openjms.OpenJMSAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-fiorano.jar for hermes.ext.fiorano.FioranoAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-sonicmq.jar for hermes.ext.sonicmq.SonicMQAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-sapjms.jar for hermes.ext.sap.SAPJMSAdminFactory
13:45:58,612 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-activemq.jar for hermes.ext.activemq.ActiveMQAdminFactory
13:45:58,613 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-seebeyond.jar for hermes.ext.seebeyond.ican.SeeBeyondICANAdminFactory
13:45:58,613 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-seebeyond.jar for hermes.ext.seebeyond.jcaps.SeeBeyondJCAPSAdminFactory
13:45:58,613 ERROR [ConfigDAOImpl] cannot find ../lib/hermes-sapjms.jar for hermes.ext.sap.SAPJMSAdminFactory
[ERROR] Error when trying to find JMS sessionjavax.naming.NamingException: No message, linked exception is : null
	at hermes.HermesContext.load(HermesContext.java:88)
	at hermes.HermesInitialContextFactory.getInitialContext(HermesInitialContextFactory.java:95)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
	at javax.naming.InitialContext.init(InitialContext.java:244)
	at javax.naming.InitialContext.<init>(InitialContext.java:216)
	at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.getHermes(HermesUtils.java:118)
	at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.hermesContext(HermesUtils.java:91)
	at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.getHermes(HermesUtils.java:233)
	at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils$getHermes.call(Unknown Source)
	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:27)
	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.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:234)
	at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[ERROR] Error when trying to find JMS sessionjavax.naming.NamingException: No message, linked exception is : null
	at hermes.HermesContext.load(HermesContext.java:88)
	at hermes.HermesInitialContextFactory.getInitialContext(HermesInitialContextFactory.java:95)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
	at javax.naming.InitialContext.init(InitialContext.java:244)
	at javax.naming.InitialContext.<init>(InitialContext.java:216)
	at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.getHermes(HermesUtils.java:118)
	at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.hermesContext(HermesUtils.java:91)
	at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.getHermes(HermesUtils.java:233)
	at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils$getHermes.call(Unknown Source)
	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:30)
	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.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:234)
	at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:148)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
13:46:04,074 ERROR [SoapUI] An error occurred [Session name 'dev14-jms1' does not exist in Hermes configuration or path to Hermes config ( C:\.hermes )is not valid!], see error log for details
13:46:04,074 ERROR [SoapUI] An error occurred [Session name 'dev14-jms1' does not exist in Hermes configuration or path to Hermes config ( C:\.hermes )is not valid!], see error log for details
13:46:04,077 ERROR [errorlog] javax.naming.NamingException: Session name 'dev14-jms1' does not exist in Hermes configuration or path to Hermes config ( C:\.hermes )is not valid!
javax.naming.NamingException: Session name 'dev14-jms1' does not exist in Hermes configuration or path to Hermes config ( C:\.hermes )is not valid!

 

So I wen't into the GUI version and the same issue occures...

hermes config can't be loaded by soap ui anymore

 

1.5.0 version is really buggy

Community Hero

Re: Hermes JMS not working properly with Ready API 1.5.0

Couple of things from the above post:
1. It is not able to find the valid hermes-config.xml in the provided location 'C:\.hermes', please check.

2. I do not know about maven. I believe there can be way to set the heremes configuration location if you are not using the default location. Otherwise, you may try with default location.

3. Not sure why it is not able to locate the library files (jars). Do you want to try with absolute location.

For now these are the pointers to try.


Regards,
Rao.
Occasional Contributor

Re: Hermes JMS not working properly with Ready API 1.5.0

Hi Rao,

 

First of all everythin works with ready api 1.4.1

 

1. Yes Its correct works with 1.4.1

 

2. Smiley Happy https://maven.apache.org/ - will allow You to run Soap UI test using Jenkins in a continouts testing mode....

    No You're incorrect , maven soap ui plugin accepts the soapui config file which points to the correct location.

 

3. This is again an issue with the latest build - everything works with 1.4.1

 

Basically This is the buggiest version ever.

I was trying to report a support call but that is not possible.

Some salesforce authentication is required .....

 

What a company....

Community Hero

Re: Hermes JMS not working properly with Ready API 1.5.0

Ok. As Tany mentioned, SmartBear team looking into this case which is good.

One thing is one should go for software upgrade when it is really need than to go for it when available. Otherwise upgrade it in dev environment, do sanity check before using it in other environments. Otherwise it could be costiler if something critical for stop working with new release. Just a general upgrade phenomenon with any software.


Regards,
Rao.
Occasional Contributor

Re: Hermes JMS not working properly with Ready API 1.5.0

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!

New Here?
Join us and watch the welcome video:
Top Kudoed Authors