I am trying to be based on Spring bean that defines the JNDI Factory to use
via the jms:endpoint as follows:
<jms:endpoint service="alarm:writeAlarmInJMSQueue"
endpoint="jmsWriter"
role="provider"
destinationStyle="queue"
connectionFactory="#managedJmsFactory"
/>
<bean id="jbossJndiTemplate"
class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop
key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory
</prop>
<prop key="java.naming.provider.url">jnp://localhost:1099</prop>
<prop
key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
</props>
</property>
</bean>
<bean id="managedJmsFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="jbossJndiTemplate"/>
</property>
<property name="jndiName">
<value>ConnectionFactory</value>
</property>
</bean>
The problem is that deployment phase still reports me following error:
java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is:
java.net.MalformedURLException: no protocol:
Applications/apache-servicemix-3.1.1-incubating/bin/../conf/]</loc-message>
<stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
org.springfram
s.factory.BeanCreationException: Error creating bean with name
'org.apache.servicemix.jms.JmsEndpoint' defined in file [C:\Install
tions\apache-servicemix-3.1.1-incubating\data\smx\service-assemblies\voda-proto-sa\version_1\sus\servicemix-jms\voda-proto-jms-su\
: Cannot resolve reference to bean 'managedJmsFactory' while setting bean
property 'connectionFactory'; nested exception is org.sp
ork.beans.factory.BeanCreationException: Error creating bean with name
'managedJmsFactory' defined in file [C:\Installed Applicati
-servicemix-3.1.1-incubating\data\smx\service-assemblies\voda-proto-sa\version_1\sus\servicemix-jms\voda-proto-jms-su\xbean.xml]:
of init method failed; nested exception is
javax.naming.CommunicationException [Root exception is
java.rmi.ServerException: Remot
occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is:
java.net.MalformedURLException: no protocol:
Applications/apache-servicemix-3.1.1-incubating/bin/../conf/]
at
org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
at
org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
at
org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:154)
at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:79)
at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:527)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:335)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:646)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$200(AutoDeploymentService.java:62)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:609)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Hope someone may help me.
Rgds,
Christophe.
Tof wrote:
>
> Hello again,
>
> I found one forum problem resolution about almost same problem (JNDI and
> JBossMQ)
> but i did not understand the solution when following error occurs:
> ...
> It seems it should be a uri and have a protocol and can
> not just be "ConnectionFactory".
> ...
> The discussion finally switches on generateJbiDescriptor property setting
> but i do not know how fix this JNDI connection issue !
>
> My problem is a little bit different since i want my ServiceMix accesses
> to one JMS queue but ServiceMix is not deployed within JBoss.
>
> Is it possible to do this ?
> If yes, what is the suitable xbean.xml file.
>
> Rgds,
> Christophe.
>
>
> Tof wrote:
>>
>> Hello,
>>
>> I am trying to create a JMS writer that posts data into the default
>> testing queue named queue/testQueue of JBOSS.
>>
>> I have the following xbean.xml for my jms component:
>> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0"
>> xmlns:alarm="http://servicemix.apache.org/samples/voda-proto">
>>
>> <jms:endpoint service="alarm:writeAlarmInJMSQueue"
>> endpoint="jmsWriter"
>> role="provider"
>> jndiProviderURL="jnp://localhost:1099"
>> jndiConnectionFactoryName="ConnectionFactory"
>> destinationStyle="queue"
>> jmsProviderDestinationName="queue/testQueue"
>> />
>> </beans>
>>
>> The deployment fails indicating that ConnectionFactory is unknown !!!
>> Please could you help finding correct bean setup ?
>> Do i need to create a jndi connection bean ?
>> if it is the case where can i find the document that describes this .
>>
>> Many thanx in advnace and regard,
>> Christophe.
>>
>
>
--
View this message in context:
http://www.nabble.com/JMSwriter-in-JBOSS-queue-testQueue-tf4335517s12049.html#a12367311
Sent from the ServiceMix - User mailing list archive at Nabble.com.