activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Babyak <vanger.p...@gmail.com>
Subject How to properly create a VM connection factory for Artemis 1.2.0?
Date Tue, 16 Feb 2016 07:20:20 GMT
For ActiveMQ 5.x i am using the following code:

// org.apache.activemq.ActiveMQConnectionFactory
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
cf.setUserName( "user" );
cf.setPassword( "dsyspsw" );
cf.setBrokerURL( "vm://DSYS?marshal=false&create=false&waitForStart=1000");

When i am trying do the same thing for Atremis, i have exception.

// org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory( "vm://0" )

causes an exception:
WARNING: Error when creating PropertyDescriptor for public synchronized
boolean
org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.setThreadPools(java.util.concurrent.ExecutorService,java.util.concurrent.ScheduledExecutorService)!
Ignoring this property.
java.beans.IntrospectionException: bad write method arg count: public
synchronized boolean
org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.setThreadPools(java.util.concurrent.ExecutorService,java.util.concurrent.ScheduledExecutorService)
    at
java.beans.PropertyDescriptor.findPropertyType(PropertyDescriptor.java:657)
    at
java.beans.PropertyDescriptor.setWriteMethod(PropertyDescriptor.java:327)
    at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:139)
    at
org.apache.commons.beanutils.FluentPropertyBeanIntrospector.createFluentPropertyDescritor(FluentPropertyBeanIntrospector.java:177)
    at
org.apache.commons.beanutils.FluentPropertyBeanIntrospector.introspect(FluentPropertyBeanIntrospector.java:140)
    at
org.apache.commons.beanutils.PropertyUtilsBean.fetchIntrospectionData(PropertyUtilsBean.java:2234)
    at
org.apache.commons.beanutils.PropertyUtilsBean.getIntrospectionData(PropertyUtilsBean.java:2215)
    at
org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:950)
    at
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:929)
    at
org.apache.activemq.artemis.utils.uri.URISchema.setData(URISchema.java:160)
    at
org.apache.activemq.artemis.uri.InVMServerLocatorSchema.internalNewObject(InVMServerLocatorSchema.java:40)
    at
org.apache.activemq.artemis.uri.InVMServerLocatorSchema.internalNewObject(InVMServerLocatorSchema.java:29)
    at
org.apache.activemq.artemis.utils.uri.URISchema.newObject(URISchema.java:94)
    at
org.apache.activemq.artemis.utils.uri.URISchema.newObject(URISchema.java:37)
    at
org.apache.activemq.artemis.utils.uri.URIFactory.newObject(URIFactory.java:59)
    at
org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.newLocator(ServerLocatorImpl.java:403)
    at
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:179)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at
org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at
org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
    at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
    at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:232)
    at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:244)
    at dsystem.jms.TestArtemis.testAMQEmbedding(TestArtemis.groovy:75)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
    at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
    at
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)

How to properly create a connection factory?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message