[ 
https://issues.apache.org/jira/browse/ARTEMIS-345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

clebert suconic updated ARTEMIS-345:
------------------------------------
    Fix Version/s:     (was: 1.2.0)
                   1.3.0

> ActiveMQConnectionFactory("vm://0") throws java.beans.IntrospectionException 
> and reports warning. 
> --------------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-345
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-345
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 1.2.0
>         Environment: Java 8
> Spring 3.1.4
>            Reporter: Derek Mahar
>            Priority: Minor
>             Fix For: 1.3.0
>
>
> Example spring-integration throws java.beans.IntrospectionException reports 
> the following warning when, in 
> examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml"examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml,
>  the example initializes bean "connectionFactory" 
> (org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory) using 
> URI "vm://0" instead of a TransportConfiguration:
> Jan 12, 2016 4:50:52 PM 
> org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl start
> INFO: AMQ221001: Apache ActiveMQ Artemis Message Broker version 
> 1.2.1-SNAPSHOT [localhost, nodeID=8c797eaa-b976-11e5-a967-080027f267a9] 
> Jan 12, 2016 4:50:52 PM 
> org.apache.commons.beanutils.FluentPropertyBeanIntrospector introspect
> 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 
> org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory.<init>(ActiveMQJMSConnectionFactory.java:38)
>       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.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
>       at 
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:121)
>       at 
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)
>       at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
>       at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
>       at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
>       at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
>       at 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
>       at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
>       at 
> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
>       at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
>       at 
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>       at 
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>       at 
> org.apache.activemq.artemis.jms.example.SpringExample.main(SpringExample.java:25)
>       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.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute(ArtemisClientPlugin.java:61)
>       at 
> org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute(ArtemisAbstractPlugin.java:75)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>       at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
>       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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> diff --git 
> a/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
>  
> b/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
> index 274a8fa..75df943 100644
> --- 
> a/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
> +++ 
> b/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
> @@ -53,12 +53,7 @@ under the License.
>     </bean>
>  
>     <bean id="connectionFactory" 
> class="org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory">
> -      <constructor-arg value="false"/>
> -      <constructor-arg>
> -         <bean 
> class="org.apache.activemq.artemis.api.core.TransportConfiguration">
> -            <constructor-arg 
> value="org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory"/>
> -         </bean>
> -      </constructor-arg>
> +      <constructor-arg value="vm://0"/>
>     </bean>
>  
>     <bean id="exampleQueue" 
> class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
> To reproduce the exception, apply the following patch:
> diff --git 
> a/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
>  
> b/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
> index 274a8fa..75df943 100644
> --- 
> a/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
> +++ 
> b/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
> @@ -53,12 +53,7 @@ under the License.
>     </bean>
>  
>     <bean id="connectionFactory" 
> class="org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory">
> -      <constructor-arg value="false"/>
> -      <constructor-arg>
> -         <bean 
> class="org.apache.activemq.artemis.api.core.TransportConfiguration">
> -            <constructor-arg 
> value="org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory"/>
> -         </bean>
> -      </constructor-arg>
> +      <constructor-arg value="vm://0"/>
>     </bean>
>  
>     <bean id="exampleQueue" 
> class="org.apache.activemq.artemis.jms.client.ActiveMQQueue">
> According to Clebert Suconic, any test case that invoke "new 
> ActiveMQConnectionFactory("vm://0")" will report the exception in the logs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to