Hi,

I am trying to create an ESB JMS inbound endpoint integration test with
HornetQ broker. Since the testing framework doesn't support HornetQ broker,
I am planning to run the broker outside and perform the test.
I created a simple test class similar to which was done for JMS inbound
endpoint polling consumer with ActiveMQ, and configured it with the HornetQ
parameters, then I copied the HornetQ jars into
/product-esb/modules/integration/tests-integration/tests-transport/src/test/resources/artifacts/ESB/jar/
directory.
But when I ran the test it shows a difficulty in finding the HornetQ
library classes with the following exception.
Is there anything that I have missed in configuring library files?

Thank you!

FAILED: testSharedTopic
>         Consuming messages from a shared topic
> javax.naming.NoInitialContextException: Cannot instantiate class:
> org.jnp.interfaces.NamingContextFactory [Root exception is
> java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
> at javax.naming.InitialContext.init(InitialContext.java:242)
> at javax.naming.InitialContext.<init>(InitialContext.java:216)
> at
> org.wso2.carbon.esb.jms.inbound.transport.test.utills.JMS2TopicMessageProducer.<init>(JMS2TopicMessageProducer.java:40)
> at
> org.wso2.carbon.esb.jms.inbound.transport.test.JMSInboundSharedSubscriberTestCase.testSharedTopic(JMSInboundSharedSubscriberTestCase.java:66)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
> at
> org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
> at org.testng.TestRunner.runWorkers(TestRunner.java:1178)
> at org.testng.TestRunner.privateRun(TestRunner.java:757)
> at org.testng.TestRunner.run(TestRunner.java:608)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
> at org.testng.SuiteRunner.run(SuiteRunner.java:240)
> at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
> at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
> at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
> at org.testng.TestNG.run(TestNG.java:999)
> at
> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
> at
> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
> at
> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
> at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
> at
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
> at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
> Caused by: java.lang.ClassNotFoundException:
> org.jnp.interfaces.NamingContextFactory
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:278)
> at
> com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:72)
> at
> com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:61)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
> ... 39 more


-- 
*Eranda Rajapakshe*
Computer Science and Engineering Undergraduate,
University of Moratuwa.
Tel : +94784822608
Email : [email protected] <[email protected]>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to