[mule-user] Mule problems with JBoss 5.1.0 JMS

瀏覽次數:2 次
跳到第一則未讀訊息

thor silva

未讀,
2009年12月4日 上午8:15:232009/12/4
收件者:us...@mule.codehaus.org
Hello All,

I am using Mule 2.2.1 and JBoss 5.1.0.G.A. I am trying to run the following configuration:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2"
xmlns:management="http://www.mulesource.org/schema/mule/management/2.2"
xmlns:tcp="http://www.mulesource.org/schema/mule/tcp/2.2"
xsi:schemaLocation="
http://www.mulesource.org/schema/mule/jms/2.2 http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd
http://www.mulesource.org/schema/mule/management/2.2 http://www.mulesource.org/schema/mule/management/2.2/mule-management.xsd
http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.mulesource.org/schema/mule/tcp/2.2 http://www.mulesource.org/schema/mule/tcp/2.2/mule-tcp.xsd">

<jms:connector name="jmsConnector"
connectionFactoryJndiName="java:/ConnectionFactory"
jndiInitialFactory="org.jnp.interfaces.NamingContextFactory"
jndiProviderUrl="jnp://localhost:1099"
jndiDestinations="true"
forceJndiDestinations="true"
specification="1.1"/>


<tcp:connector name="tcp_connector" validateConnections="false">
<tcp:streaming-protocol/>
</tcp:connector>

<byte-array-to-string-transformer name="batsTransformer" ignoreBadInput="false" />

<model>
<service name="reception">
<inbound>
<tcp:inbound-endpoint host="localhost" port="5555" connector-ref="tcp_connector">
<transformer ref="batsTransformer"/>
</tcp:inbound-endpoint>
</inbound>
<outbound>
<pass-through-router>
<jms:outbound-endpoint queue="queue/myQueue" connector-ref="jmsConnector">
<jms:object-to-jmsmessage-transformer/>
</jms:outbound-endpoint>
</pass-through-router>
</outbound>
</service>
</model>

</mule>

So, when I run this config, I got the following error ClassNotFoundError:

INFO 2009-12-04 11:01:08,415 [main] org.mule.MuleServer: Mule Server initializing...
INFO 2009-12-04 11:01:08,805 [main] org.mule.config.spring.MuleApplicationContext: Refreshing org.mule.config.spring.MuleApplicationContext@116471f: display name [org.mule.config.spring.MuleApplicationContext@116471f]; startup date [Fri Dec 04 11:01:08 BRST 2009]; root of context hierarchy
INFO 2009-12-04 11:01:09,618 [main] org.mule.config.spring.MuleApplicationContext: Bean factory for application context [org.mule.config.spring.MuleApplicationContext@116471f]: org.springframework.beans.factory.support.DefaultListableBeanFactory@491c4c
INFO 2009-12-04 11:01:09,899 [main] org.mule.transport.jms.JmsConnector: Initialising: JmsConnector{this=435a3a, started=false, initialised=false, name='jmsConnector', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[jms], serviceOverrides=null}
ERROR 2009-12-04 11:01:09,930 [main] org.mule.config.spring.SpringXmlConfigurationBuilder: Configuration with "org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Error creating bean with name 'jmsConnector': Invocation of init method failed; nested exception is org.mule.api.lifecycle.InitialisationException: Error creating the connection factory
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:98)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:112)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:58)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:177)
at org.mule.MuleServer.initialize(MuleServer.java:351)
at org.mule.MuleServer.run(MuleServer.java:257)
at org.mule.MuleServer.start(MuleServer.java:244)
at org.mule.MuleServer.main(MuleServer.java:121)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsConnector': Invocation of init method failed; nested exception is org.mule.api.lifecycle.InitialisationException: Error creating the connection factory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:87)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:68)
... 13 more
Caused by: org.mule.api.lifecycle.InitialisationException: Error creating the connection factory
at org.mule.transport.jms.JmsConnector.doInitialise(JmsConnector.java:173)
at org.mule.transport.AbstractConnector.initialise(AbstractConnector.java:336)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 27 more
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at org.mule.transport.jms.JmsConnector.initJndiContext(JmsConnector.java:336)
at org.mule.transport.jms.JmsConnector.createConnectionFactory(JmsConnector.java:232)
at org.mule.transport.jms.JmsConnector.doInitialise(JmsConnector.java:169)
... 35 more
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
... 42 more
ERROR 2009-12-04 11:01:09,930 [main] org.mule.config.builders.AutoConfigurationBuilder: Configuration with "org.mule.config.builders.AutoConfigurationBuilder" failed.
org.mule.api.config.ConfigurationException: Initialisation Failure: Error creating bean with name 'jmsConnector': Invocation of init method failed; nested exception is org.mule.api.lifecycle.InitialisationException: Error creating the connection factory (org.mule.api.lifecycle.InitialisationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:112)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:58)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:177)
at org.mule.MuleServer.initialize(MuleServer.java:351)
at org.mule.MuleServer.run(MuleServer.java:257)
at org.mule.MuleServer.start(MuleServer.java:244)
at org.mule.MuleServer.main(MuleServer.java:121)
Caused by: org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Error creating bean with name 'jmsConnector': Invocation of init method failed; nested exception is org.mule.api.lifecycle.InitialisationException: Error creating the connection factory
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:98)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
... 10 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsConnector': Invocation of init method failed; nested exception is org.mule.api.lifecycle.InitialisationException: Error creating the connection factory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:87)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:68)
... 13 more
Caused by: org.mule.api.lifecycle.InitialisationException: Error creating the connection factory
at org.mule.transport.jms.JmsConnector.doInitialise(JmsConnector.java:173)
at org.mule.transport.AbstractConnector.initialise(AbstractConnector.java:336)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 27 more
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at org.mule.transport.jms.JmsConnector.initJndiContext(JmsConnector.java:336)
at org.mule.transport.jms.JmsConnector.createConnectionFactory(JmsConnector.java:232)
at org.mule.transport.jms.JmsConnector.doInitialise(JmsConnector.java:169)
... 35 more
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
... 42 more
ERROR 2009-12-04 11:01:09,930 [main] org.mule.MuleServer:
********************************************************************************
Message : Error creating the connection factory
Type : org.mule.api.lifecycle.InitialisationException
Code : MULE_ERROR-72016
JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/lifecycle/InitialisationException.html
Resolved Name : <none>
Remaining Name : <none>
********************************************************************************
Exception stack is:
1. org.jnp.interfaces.NamingContextFactory (java.lang.ClassNotFoundException)
java.net.URLClassLoader$1:-1 (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ClassNotFoundException.html)
2. javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory] (javax.naming.NoInitialContextException)
javax.naming.spi.NamingManager:-1 (http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/NoInitialContextException.html)
3. Error creating the connection factory (org.mule.api.lifecycle.InitialisationException)
org.mule.transport.jms.JmsConnector:173 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/lifecycle/InitialisationException.html)
********************************************************************************
Root Exception stack trace:
java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at org.mule.transport.jms.JmsConnector.initJndiContext(JmsConnector.java:336)
at org.mule.transport.jms.JmsConnector.createConnectionFactory(JmsConnector.java:232)
at org.mule.transport.jms.JmsConnector.doInitialise(JmsConnector.java:169)
at org.mule.transport.AbstractConnector.initialise(AbstractConnector.java:336)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:87)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:68)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:98)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:112)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:58)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:177)
at org.mule.MuleServer.initialize(MuleServer.java:351)
at org.mule.MuleServer.run(MuleServer.java:257)
at org.mule.MuleServer.start(MuleServer.java:244)
at org.mule.MuleServer.main(MuleServer.java:121)

********************************************************************************

ERROR 2009-12-04 11:01:09,946 [main] org.mule.MuleServer:
********************************************************************************
* A Fatal error has occurred while the server was running: *
* org.jnp.interfaces.NamingContextFactory (java.lang.ClassNotFoundException) *
* *
* The error is fatal, the system must shutdown *
* Server started: 31/12/69 21:00 *
* Server shutdown: 04/12/09 11:01 *
********************************************************************************
WARN 2009-12-04 11:01:09,946 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToString'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,946 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToByteArray'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,946 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToOutputHandler'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,946 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToInputStream'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,946 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_XmlToOutputHandler'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,946 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_DomDocumentToString'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,946 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_XmlToDocumentResult'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named 'XmlToDom4jDocument'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named 'XmlToW3CDocument'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named 'transformer.7'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ServletRequestToOutputHandler'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToByteArray'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToString'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToHashtable'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToVector'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_JMSMessageToObject'. The previous object will be overwritten.
WARN 2009-12-04 11:01:09,961 [main] org.mule.registry.TransientRegistry: TransientRegistry already contains an object named '_ObjectToMessage'. The previous object will be overwritten.
INFO 2009-12-04 11:01:09,977 [main] org.mule.transport.jms.JmsConnector: Initialising: JmsConnector{this=16ef71, started=false, initialised=false, name='jmsConnector', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[jms], serviceOverrides=null}
INFO 2009-12-04 11:01:09,977 [Thread-0] org.mule.MuleServer: Mule server shutting down due to normal shutdown request
WARN 2009-12-04 11:01:09,977 [Thread-1] org.mule.context.notification.ServerNotificationManager: Notification not enqueued after ServerNotificationManager disposal: MuleContextNotification{action=mule context disposing, resourceId=MI107857.Not clustered.16ff4f98-e0d5-11de-a8b4-15e9b6142672, timestamp=1259931669977}
INFO 2009-12-04 11:01:09,977 [Thread-0] org.mule.MuleServer:
**************************************************************************************
* The server is shutting down due to normal shutdown request *
* Server started: 31/12/69 21:00 *
* Server shutdown: 04/12/09 11:01 *
**************************************************************************************
INFO 2009-12-04 11:01:09,977 [Thread-1] org.mule.transport.jms.JmsConnector: Initialising: JmsConnector{this=c3e9e9, started=false, initialised=false, name='jmsConnector', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[jms], serviceOverrides=null}
WARN 2009-12-04 11:01:09,977 [Thread-1] org.mule.context.notification.ServerNotificationManager: Notification not enqueued after ServerNotificationManager disposal: MuleContextNotification{action=mule context disposed, resourceId=MI107857.Not clustered.16ff4f98-e0d5-11de-a8b4-15e9b6142672, timestamp=1259931669977}

I already inserted the jnpclient.jar and jbossall-client.jar form JBoss in the <MULE_HOME>/lib/usr.

So, any suggestions ?

Thanks in advance.

Thor da Silva

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Andrew Perepelytsya

未讀,
2009年12月4日 上午8:54:422009/12/4
收件者:us...@mule.codehaus.org

Are you sure it's not lib/user? If it's as you said, usr, then it's a wrong folder.

Also, double check the class is actually in the jar. JBoss 5 may have repackaged them.

HTH,
Andrew

thor silva

未讀,
2009年12月4日 上午9:44:582009/12/4
收件者:us...@mule.codehaus.org
Hello Mr Andrew,

Yes, the directory is lib/user. I copied all the jboss jars that are in the jboss client directory.

Any suggestions ?

Thanks in Advance

thor silva

未讀,
2009年12月7日 上午8:16:492009/12/7
收件者:us...@mule.codehaus.org
Hello all,

The problem solution for Mule and JBoss.

I do my tests on a Windows XP machine. The production code goes into an Solaris Machine. So, I was putting the libs that came with the JBoss (the client directory) in the <MULE_HOME>/lib/user and was getting an ClassNotFoundException. So, I began to suspect that I was having problems with the classpath. Someway, not all the libs were found in the classpath. I went to the net and got a program that let me know what was the classpath that Mule was seeing and how long is it. The program is shown below (http://www.java-tips.org/java-se-tips/java.lang/how-to-print-classpath.html):

import java.net.URL;
import java.net.URLClassLoader;

public class PrintClasspath {
public static void main(String[] args) {

//Get the System Classloader
ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();

//Get the URLs
URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();

for(int i=0; i< urls.length; i++)
{
System.out.println(urls[i].getFile());
}

}
}

I adapted it to let me know the size of the classpath too. I transformed it into an Mule Component. So, the code end up looking like this:

package br.com.thordasilva;

import java.net.URL;
import java.net.URLClassLoader;

public class Component {

public void execute(Object o){
//Get the System Classloader
ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();

//Get the URLs
URL[] urls = ((URLClassLoader)sysClassLoader).getURLs();

StringBuffer classpath = new StringBuffer("");
for (int i = 0; i < urls.length; i++) {
classpath.append(urls[i].getFile()+",");
}

System.out.println(classpath.toString());
System.out.println(classpath.toString().length() - 1);

}
}

I got this code and create an jar with it. I named it ww.jar. Next step was installing a new version of mule. So, I tried d:\temp\mule. I inserted ww.jar in the d:\temp\mule\lib\user directory. I created an config file like the one below:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.2"
xsi:schemaLocation="
http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.mulesource.org/schema/mule/stdio/2.2 http://www.mulesource.org/schema/mule/stdio/2.2/mule-stdio.xsd">

<model>
<service name="test">
<inbound>
<stdio:inbound-endpoint system="IN"/>
</inbound>
<component class="br.com.thordasilva.Component"></component>
</service>
</model>
</mule>


and save it with the name a.xml. I copied it to the d:\temp\mule\bin directory. Now, I only had to run all this and discover that the complete classpath of mule has approximateddly 8973 characters. In Windows XP, the limit that I can use in an variable using the shell (cmd command) is 8KB (8 * 1024 = 8192) as describen in (http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx?mfr=true). So, when I put all the jars of the client directory of JBoss, I was getting approximattedly 13162 characters. So, the first thing to do was to detect the exact jars that I need to have in the lib/user directory of Mule. After some research, I discover that I had to have these files in the lib/user direcotry of mule:

- concurrent.jar;
- jboss-aop-client.jar;
- jboss-common-core.jar;
- jboss-logging-spi.jar;
- jboss-mdr.jar;
- jboss-messaging-client.jar;
- jboss-remoting.jar;
- jnp-client.jar;
- trove.jar.

After that, the classpath size got to 9401. So, the next try was to put Mule in an directory with a shorter name. I tried a directory called d:\x. Now, before the test, you need to update the value of the MULE_HOME variable to point to the new directory. If you don't do that, the program wont return the correct values. You still need to open a new shell (cmd command) to get these updates to work. Now, the size of the classpath is 7700 characters. So, everything is ok.

The problem is if you are running Mule in an Windows XP machine and you insert lots of jars in the lib directory. Sometime you will get an classpath that is larger than the limit of the shell and the problem of ClassNotFoundException will come true, even if the class is in you lib/user directory.

thor silva

未讀,
2009年12月7日 上午8:19:112009/12/7
收件者:us...@mule.codehaus.org
回覆所有人
回覆作者
轉寄
0 則新訊息