-
1. Re: Fixing the EJB3 testsuite...
jaikiran Mar 20, 2010 5:50 AM (in response to clebert.suconic)Clebert Suconic wrote:
also.. there's another issue.. as you need to adjust the classpath as the tests didn't get the newest hornetq libraries.
The EJB3 testsuide adds all the jars that are in JBOSS_HOME/client folder to its classpath. So as long as the JBOSS_HOME/client folder has the right set of hornetq jars, it should work.
-
2. Re: Fixing the EJB3 testsuite...
clebert.suconic Mar 22, 2010 7:52 PM (in response to jaikiran)Ok.. I will fix the client code.
But I won't be able to fix the EJB3 testsuite. that's why I provided you guys the patch and a howto. (I couldn't figure out how to fix the dependencies)
-
3. Re: Fixing the EJB3 testsuite...
wolfc Mar 23, 2010 6:30 AM (in response to clebert.suconic)I've applied the patch with a minor modification. Rev 102770 can serve as a template to fix the other tests.
Commits should go under: EJBTHREE-2057
Note that I get:
javax.jms.JMSException: Failed to initialise session factory at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:1043) at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:790) at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:572) at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:602) at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:116) at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:111) at org.jboss.ejb3.mdb.ProducerManagerImpl.connect(ProducerManagerImpl.java:221) at org.jboss.ejb3.test.interceptors2.unit.InterceptorsTestCase.testMixedConsumer(InterceptorsTestCase.java:610) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:23) at junit.extensions.TestSetup.run(TestSetup.java:27) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:23) at junit.extensions.TestSetup.run(TestSetup.java:27) Caused by: HornetQException[errorCode=0 message=Failed to initialise session factory] Caused by: java.lang.IllegalArgumentException: Error instantiating connector factory "org.hornetq.integration.transports.netty.NettyConnectorFactory" at org.hornetq.core.client.impl.FailoverManagerImpl.instantiateConnectorFactory(FailoverManagerImpl.java:1016) at org.hornetq.core.client.impl.FailoverManagerImpl.<init>(FailoverManagerImpl.java:228) at org.hornetq.core.client.impl.ClientSessionFactoryImpl.initialise(ClientSessionFactoryImpl.java:237) at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:1039) Caused by: java.lang.ClassNotFoundException: org.hornetq.integration.transports.netty.NettyConnectorFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.hornetq.core.client.impl.FailoverManagerImpl.instantiateConnectorFactory(FailoverManagerImpl.java:1011)
I guess the client side classes of HornetQ are not yet available in $JBOSS_HOME/client (and jbossall-client.jar Class-Path).
-
4. Re: Fixing the EJB3 testsuite...
clebert.suconic Mar 24, 2010 6:29 PM (in response to wolfc)Carlo wrote: "I guess the client side classes of HornetQ are not yet available in $JBOSS_HOME/client (and jbossall-client.jar Class-Path)."
I will tweak that by the end of the week.. of if anyone knows how to fix it easily... any help is appreciated.
-
5. Re: Fixing the EJB3 testsuite...
jaikiran Mar 25, 2010 1:58 AM (in response to clebert.suconic)Haven't looked at any changes around that recently, but my understanding is - if you add you hornetq jar (the one containing the missing classes) to the JBOSS_HOME/client folder (through AS_TRUNK/build/build.xml) then the rest of the build process automagically adds your jar to the ClassPath attribute of jbossall-client.jar. In short, the ClassPath attribute of jbossall-client.jar is autogenerated.
-
6. Re: Fixing the EJB3 testsuite...
wolfc Mar 25, 2010 5:01 AM (in response to jaikiran)To fire up the tests I had to copy hornetq-transports.jar into $JBOSS_HOME/client.
-
7. Re: Fixing the EJB3 testsuite...
jaikiran Mar 25, 2010 5:37 AM (in response to wolfc)r102950 contains the fix to the classpath issue https://jira.jboss.org/jira/browse/JBAS-7706?focusedCommentId=12521994#action_12521994
-
8. Re: Fixing the EJB3 testsuite...
wolfc Mar 26, 2010 4:46 AM (in response to clebert.suconic)The LegacyJMSTestAdmin creates a faulty XML:
<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=testQueue"> <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends> <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends> <attribute name="SecurityConf"> <security> <role name="guest" read=true write=true create=false/> <role name="publisher" read=true write=true create=false/> <role name="noacc" read=false write=false create=false/> </security> </attribute> </mbean> </server>
Resulting in:
Open quote is expected for attribute "read" associated with an element type "role".