Error using Blueprint xml to establish a Weblogic component with a JndiObjectFactoryBean -
so, i'm trying weblogic component work in our application's blueprint file using snippit below, though i'm not sure else include other being used connect jms queue.
> <bean id="wmqjndifactorybean" > class="org.springframework.jndi.jndiobjectfactorybean"> > <property name="jndiname" value="jms/connectionfactory"/> > <property name="jnditemplate"> > <bean class="org.springframework.jndi.jnditemplate"> > <property name="environment"> > <props> > <prop key="java.naming.factory.initial">weblogic.jndi.wlinitialcontextfactory</prop> > <prop key="java.naming.provider.url">t3://localhost</prop> > <prop key="java.naming.security.principal">weblogic</prop> > <prop key="java.naming.security.credentials">weblogic</prop> > </props> > </property> > </bean> > </property> > <property name="lookuponstartup" value="false"/> > <property name="proxyinterface" value="javax.jms.connectionfactory"/> > </bean> > <bean id="weblogic-jms" class="org.apache.camel.component.jms.jmscomponent"> > <property name="configuration"> > <bean class="org.apache.camel.component.jms.jmsconfiguration"> > <property name="connectionfactory" ref="wmqjndifactorybean"/> > </bean> > </property> > </bean>
and exception occurs:
org.osgi.service.blueprint.container.componentdefinitionexception: error setting property: propertydescriptor <name: connectionfactory, getter: class org.apache.camel.component.jms.jmsconfiguration.getconnectionfactory(), setter: [class org.apache.camel.component.jms.jmsconfiguration.setconnectionfactory(interface javax.jms.connectionfactory)] @ org.apache.aries.blueprint.container.beanrecipe.setproperty(beanrecipe.java:941) @ org.apache.aries.blueprint.container.beanrecipe.setproperties(beanrecipe.java:907) @ org.apache.aries.blueprint.container.beanrecipe.setproperties(beanrecipe.java:888) @ org.apache.aries.blueprint.container.beanrecipe.internalcreate2(beanrecipe.java:820) @ org.apache.aries.blueprint.container.beanrecipe.internalcreate(beanrecipe.java:787) @ org.apache.aries.blueprint.di.abstractrecipe.create(abstractrecipe.java:106) @ org.apache.aries.blueprint.container.beanrecipe.setproperty(beanrecipe.java:933) @ org.apache.aries.blueprint.container.beanrecipe.setproperties(beanrecipe.java:907) @ org.apache.aries.blueprint.container.beanrecipe.setproperties(beanrecipe.java:888) @ org.apache.aries.blueprint.container.beanrecipe.internalcreate2(beanrecipe.java:820) @ org.apache.aries.blueprint.container.beanrecipe.internalcreate(beanrecipe.java:787) @ org.apache.aries.blueprint.di.abstractrecipe$1.call(abstractrecipe.java:79) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ org.apache.aries.blueprint.di.abstractrecipe.create(abstractrecipe.java:88) @ org.apache.aries.blueprint.container.blueprintrepository.createinstances(blueprintrepository.java:245) @ org.apache.aries.blueprint.container.blueprintrepository.createall(blueprintrepository.java:183) @ org.apache.aries.blueprint.container.blueprintcontainerimpl.instantiateeagercomponents(blueprintcontainerimpl.java:668) @ org.apache.aries.blueprint.container.blueprintcontainerimpl.dorun(blueprintcontainerimpl.java:370) @ org.apache.aries.blueprint.container.blueprintcontainerimpl.run(blueprintcontainerimpl.java:261) @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ org.apache.aries.blueprint.container.executorservicewrapper.run(executorservicewrapper.java:106) @ org.apache.aries.blueprint.utils.threading.impl.discardablerunnable.run(discardablerunnable.java:48) @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.access$201(scheduledthreadpoolexecutor.java:178) @ java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.run(scheduledthreadpoolexecutor.java:292) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) caused by: java.lang.exception: unable convert value org.springframework.jndi.jndiobjectfactorybean type javax.jms.connectionfactory @ org.apache.aries.blueprint.container.aggregateconverter.convert(aggregateconverter.java:184) @ org.apache.aries.blueprint.container.blueprintrepository.convert(blueprintrepository.java:402) @ org.apache.aries.blueprint.utils.reflectionutils$propertydescriptor.convert(reflectionutils.java:394) @ org.apache.aries.blueprint.utils.reflectionutils$methodpropertydescriptor.internalset(reflectionutils.java:628) @ org.apache.aries.blueprint.utils.reflectionutils$propertydescriptor.set(reflectionutils.java:378) @ org.apache.aries.blueprint.container.beanrecipe.setproperty(beanrecipe.java:939) ... 29 more
and after scouring internet hours on past couple days, have not found solution. can't tell it's not because it's hard remember i've tried, of articles/other questions looked @ weren't applicable.
so why exception occurring , how can fix it?
someone on our team figured out answer. first, changed route little bit:
<bean id="jmsinconnectionfactoryjndilookupfactory" class="org.springframework.jndi.jndiobjectfactorybean" init-method="afterpropertiesset"> <property name="jndiname" value="jms/connectionfactory"/> <property name="jnditemplate"> <bean class="org.springframework.jndi.jnditemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">weblogic.jndi.wlinitialcontextfactory</prop> <prop key="java.naming.provider.url">t3://localhost</prop> <prop key="java.naming.security.principal">weblogic</prop> <prop key="java.naming.security.credentials">weblogic</prop> </props> </property> </bean> </property> </bean> <bean id="jmsinconnectionfactory" factory-ref="jmsinconnectionfactoryjndilookupfactory" factory-method="getobject" /> <bean id="weblogic-jms" class="org.apache.camel.component.jms.jmscomponent"> <property name="configuration"> <bean class="org.apache.camel.component.jms.jmsconfiguration"> <property name="connectionfactory" ref="jmsinconnectionfactory"/> </bean> </property> </bean>
second, ran issue, solved here: https://issues.jboss.org/browse/entesb-1567
and fixed, apparently! hope helps.
Comments
Post a Comment