[mule-user] Mule2.0: can't find Jotm schema on startup

0 views
Skip to first unread message

Meunier Pierre-Emmanuel

unread,
Feb 26, 2008, 8:19:10 AM2/26/08
to us...@mule.codehaus.org

Hello again.

 

I receive the following exception when starting Mule 2.0.0-RC2 with Java5:

 

org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.mulesource.org/schema/mule/jotm/2.0/mule-jotm.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

      at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(Unknown Source)

      at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)

      at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)

      at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)

      at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)

      at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)

      at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)

      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

      at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

      at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)

      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:381)

      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:327)

      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:295)

      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)

      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)

      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)

      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)

      at org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:199)

      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:97)

      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:411)

      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:338)

      at org.mule.config.spring.MuleApplicationContext.<init>(MuleApplicationContext.java:121)

      at org.mule.config.spring.MuleApplicationContext.<init>(MuleApplicationContext.java:53)

      at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringParentRegistry(SpringXmlConfigurationBuilder.java:82)

      at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:58)

      at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:38)

      at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:68)

      at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:80)

      at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:38)

      at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:38)

      at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:68)

      at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:188)

      at org.mule.MuleServer.initialize(MuleServer.java:346)

      at org.mule.MuleServer.run(MuleServer.java:252)

      at org.mule.MuleServer.start(MuleServer.java:239)

      at org.mule.MuleServer.main(MuleServer.java:116)

 

 

It seems like it can’t find a jotm schema. I can’t find a jotm module either. Can I still use Jotm with Mule 2.0.0?

 

My config is:

 

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xmlns:spring="http://www.springframework.org/schema/beans"

      xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.0"

      xmlns:jotm="http://www.mulesource.org/schema/mule/jotm/2.0"

      xsi:schemaLocation="

       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

       http://www.mulesource.org/schema/mule/core/2.0 http://www.mulesource.org/schema/mule/core/2.0/mule.xsd

       http://www.mulesource.org/schema/mule/jms/2.0 http://www.mulesource.org/schema/mule/jms/2.0/mule-jms.xsd

       http://www.mulesource.org/schema/mule/jotm/2.0 http://www.mulesource.org/schema/mule/jotm/2.0/mule-jotm.xsd">

      

    <spring:bean name="mqQcf" class="com.ibm.mq.jms.MQXAQueueConnectionFactory">

      <spring:property name="hostName" value="xxxxxxx" />

      <spring:property name="queueManager" value="xxxxxxxxx" />

      <spring:property name="port" value="xxxx" />

      <spring:property name="transportType" value="1" />

    </spring:bean>

   

    <jotm:transaction-manager />

      

    <jms:connector name="mqConnector" connectionFactory-ref="mqQcf">

      <custom-exception-strategy class="org.mule.RollbackRoutingExceptionStrategy">

            <jms:outbound-endpoint queue="PM.DLQ">

                  <jms:xa-transaction action="ALWAYS_BEGIN" />

            </jms:outbound-endpoint>

      </custom-exception-strategy>

    </jms:connector>

   

      <model name="MulePerformance">

            <service name="simpleJmsRouting">

                  <inbound>

                        <jms:inbound-endpoint queue="PM.IN">

                              <jms:xa-transaction action="ALWAYS_BEGIN" />

                        </jms:inbound-endpoint>

                  </inbound>

                  <bridge-component />

                  <outbound>

                        <custom-outbound-router class="org.mule.routing.outbound.TransactionJoiningRouter">

                              <jms:outbound-endpoint queue="PM.OUT">

                                    <jms:xa-transaction action="ALWAYS_JOIN" />

                              </jms:outbound-endpoint>

                        </custom-outbound-router>

                  </outbound>

            </service>

      </model>

</mule>

 

Can anyone spot a problem with this config?

 

Many thanks

 

Pierre

************************************************************************
DISCLAIMER
The information contained in this e-mail is confidential and is intended
for the recipient only.
If you have received it in error, please notify us immediately by reply
e-mail and then delete it from your system. Please do not copy it or
use it for any other purposes, or disclose the content of the e-mail
to any other person or store or copy the information in any medium.
The views contained in this e-mail are those of the author and not
necessarily those of Admenta UK Group.
 
Admenta UK plc is a company incorporated in England and Wales
under company number 3011757 and whose registered office
is at Sapphire Court, Walsgrave Triangle, Coventry CV2 2TX
************************************************************************
 

Andrew Perepelytsya

unread,
Feb 26, 2008, 8:28:47 AM2/26/08
to us...@mule.codehaus.org
It's been deprecated and phased out due to issues with its implementation. Use JBossTS instead, this is a more robust TM implementation, which Mule supports and bundles.

Andrew

Meunier Pierre-Emmanuel

unread,
Feb 26, 2008, 8:44:46 AM2/26/08
to us...@mule.codehaus.org

Hi Andrew

 

Thanks for the quick answer!

 

I’ve changed <jtom:transaction-manager /> with <jboss-transaction-manager /> but mule won’t start. He comes up with the following exception:

 

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 95 in XML document from class path resource [conf/mule-config.xml] is invalid; nested exception is org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'mule:baseTransactionType' to a(n) 'type definition' component.

      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:389)

Caused by:

org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'mule:baseTransactionType' to a(n) 'type definition' component.

      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

      at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)

      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

      at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)

      at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)

      at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(Unknown Source)

      at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseGlobal(Unknown Source)

      at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseSchemas(Unknown Source)

      at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)

      at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)

      at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)

      at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)

      at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)

      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

      at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

      at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

      at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)

      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:381)

      ... 25 more

 

Any idea? All the Mule jars are on the classpath, including all the jboss-ts ones.

 

Pierre

 


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

Andrew Perepelytsya

unread,
Feb 26, 2008, 9:06:18 AM2/26/08
to us...@mule.codehaus.org
Which Mule version is that? Are you sure MULE_HOME is properly configured?

Meunier Pierre-Emmanuel

unread,
Feb 26, 2008, 9:34:14 AM2/26/08
to us...@mule.codehaus.org

I am running Mule inside Eclipse, so no MULE_HOME is configured… I put all the mule jar files in the classpath and I run org.mule.MuleServer with the config file as a program parameter.

 

I tried to run it from the command line with MULE_HOME configured and I get a different error:

 

javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial

        at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)

        at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)

        at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)

        at javax.naming.InitialContext.lookup(Unknown Source)

        at org.mule.transaction.lookup.GenericTransactionManagerLookupFactory.create(GenericTransactionManagerLookupFactory.java:96)

        at org.mule.DefaultMuleContext.getTransactionManager(DefaultMuleContext.java:679)

        at org.mule.transport.jms.JmsConnector.createConnection(JmsConnector.java:189)

        at org.mule.transport.jms.JmsConnector.doConnect(JmsConnector.java:283)

        at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1399)

        at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)

        at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:107)

        at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1408)

        at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)

        at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:107)

        at org.mule.transport.AbstractConnector.start(AbstractConnector.java:400)

        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.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:246)

        at org.mule.lifecycle.DefaultLifecyclePhase.fireLifecycle(DefaultLifecyclePhase.java:111)

        at org.mule.lifecycle.GenericLifecycleManager.firePhase(GenericLifecycleManager.java:82)

        at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:202)

        at org.mule.MuleServer.run(MuleServer.java:254)

        at org.mule.MuleServer.start(MuleServer.java:239)

        at org.mule.modules.boot.MuleServerWrapper.start(MuleServerWrapper.java:48)

        at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)

ERROR 2008-02-26 14:30:08,625 [WrapperListener_start_runner] org.mule.MuleServer:

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

Message               : Initialisation Failure: Unable to create transaction manager

Type                  : org.mule.api.lifecycle.InitialisationException

Code                  : MULE_ERROR-72085

JavaDoc               : http://mule.mulesource.org/docs/apidocs/org/mule/api/lifecycle/InitialisationException.html

Object                : JmsConnector{this=158cc6, started=false, initialised=true, name='mqConnector', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[jms], serviceOverrides=null}

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

Exception stack is:

1. Unable to create transaction manager (org.mule.api.MuleRuntimeException)

  org.mule.DefaultMuleContext:685 (http://mule.mulesource.org/docs/apidocs/org/mule/api/MuleRuntimeException.html)

2. Initialisation Failure: Unable to create transaction manager (org.mule.api.lifecycle.InitialisationException)

  org.mule.transport.jms.JmsConnector:196 (http://mule.mulesource.org/docs/apidocs/org/mule/api/lifecycle/InitialisationException.html)

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

Root Exception stack trace:

org.mule.api.MuleRuntimeException: Unable to create transaction manager

        at org.mule.DefaultMuleContext.getTransactionManager(DefaultMuleContext.java:685)

        at org.mule.transport.jms.JmsConnector.createConnection(JmsConnector.java:189)

        at org.mule.transport.jms.JmsConnector.doConnect(JmsConnector.java:283)

        at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1399)

        at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)

        at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:107)

        at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1408)

        at org.mule.transport.SingleAttemptConnectionStrategy.doConnect(SingleAttemptConnectionStrategy.java:25)

        at org.mule.transport.AbstractConnectionStrategy.connect(AbstractConnectionStrategy.java:107)

        at org.mule.transport.AbstractConnector.start(AbstractConnector.java:400)

        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.mule.lifecycle.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:246)

        at org.mule.lifecycle.DefaultLifecyclePhase.fireLifecycle(DefaultLifecyclePhase.java:111)

        at org.mule.lifecycle.GenericLifecycleManager.firePhase(GenericLifecycleManager.java:82)

        at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:202)

        at org.mule.MuleServer.run(MuleServer.java:254)

        at org.mule.MuleServer.start(MuleServer.java:239)

 

 

I am using Mule 2.0.0-RC2.

 

Thanks for your help

 

Pierre

 


From: Andrew Perepelytsya [mailto:aper...@gmail.com]
Sent: 26 February 2008 14:06
To: us...@mule.codehaus.org
Subject: Re: [mule-user] Mule2.0: can't find Jotm schema on startup

 

Which Mule version is that? Are you sure MULE_HOME is properly configured?

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

andrew cooke

unread,
Feb 26, 2008, 6:44:05 PM2/26/08
to us...@mule.codehaus.org

The first error - Cannot resolve the name 'mule:baseTransactionType' - may
be related to a know issue with Eclipse (not necessarily a bug in Eclipse,
but IntelliJ Idea's Spring support avoids it) when using Mule RC releases.
We don't change the URIs for the schema, and have the latest (ie pre-RC3)
deployed, while your code is RC2. We should have warned about this in the
release notes, but I'm pretty sure we forgot (or I may be mistaken and
this turned out not to be an issue - Dan, can you remember?).

That is not an problem when using the command line (or with IntelliJ)
because Spring uses some config files in the classpath to locate the
schema on your own disk.

The second error - javax.naming.NoInitialContextException - sounds like
you need to specify a JNDI provider. I don't know much about this, so
can't say whether or not we should do so automatically (but I assume we
should). Tomorrow I will have a look at our tests and see if there's
anything that covers this. If not, I'll write a simple test and see what
happens or ask someone for help. Either way I'll report back, because
this looks like it may be a bug we want to fix before RC3 goes out.

Cheers,
Andrew

PS The easiest way to avoid the schema issue is probably to grab an RC3
snapshot from http://mule.mulesource.org/display/MULE/Download - that
might also fix the other problem...

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

http://xircles.codehaus.org/manage_email


andrew cooke

unread,
Feb 27, 2008, 7:40:37 AM2/27/08
to us...@mule.codehaus.org

OK, I checked with current RC3.

- Config related to JBoss transaction manager is in mule-jbossts
(not mule-jotm, which doesn't exist). Are we talking about the same
thing?

- The <transaction-manager> element defined in mule-jbossts is used
in several tests:
-- JbossTSNamespaceHandlerTestCase starts a basic config with no errors
-- JmsXATransactionComponentTestCase appears to execute a process within
a transaction
-- So does JmsXAAlwaysBeginTestCase, etc.

I don't see either of your errors when running the tests above.

The last RC3 snapshot build that ran successfully was 3 days ago.
Relatively little in the schema has changed since then (only a file
connector filter, I think). So I would suggest getting the RC3 snapshot
and using that.

Andrew

PS Should we rename mule-jbossts? I have a feeling I may have chosen that
name more or less at random....

Meunier Pierre-Emmanuel

unread,
Feb 27, 2008, 8:33:58 AM2/27/08
to us...@mule.codehaus.org
Hi Andrew

I was using <jboss-transaction-manager /> from the core schema. I've
changed it to <jbossts:transaction-manager /> and it now works fine when
I run Mule from the command line.

The only thing is that I now receive an exception when the queues are
empty:

ERROR 2008-02-27 13:29:09,570 [mqConnector.receiver.8]
org.mule.RollbackRoutingExceptionStrategy: Failed to dispatch message to
error queue after it failed to process. This may cause message
loss.Logging Message here:
org.mule.transport.DefaultMessageAdapter/org.mule.transport.DefaultMessa
geAdapter@5d5a2c{id=ID:414d5120514d5f757236303764303530d01bc547200052d1,
payload=com.ibm.jms.JMSObjectMessage,
correlationId=ID:414d5120514d5f757236303764303530d01bc547200052d1,
correlationGroup=1, correlationSeq=-1, encoding=UTF-8,
exceptionPayload=org.mule.message.DefaultExceptionPayload@cb3542}
org.mule.api.transport.DispatchException: Failed to route event via
endpoint: OutboundEndpoint{endpointUri=jms://PM.DLQ,
connector=JmsConnector{this=29ea31, started=true, initialised=true,


name='mqConnector', disposed=false,
numberOfConcurrentTransactedReceivers=4,

createMultipleTransactedReceivers=true, connected=true,
supportedProtocols=[jms], serviceOverrides=null},
transformer=[ObjectToJMSMessage{this=38d460, name='null',
ignoreBadInput=false, returnClass=interface javax.jms.Message,
sourceTypes=[]}], name='endpoint.jms.PM.DLQ', isInbound=false,
isOutbound=true, properties={},
transactionConfig=Transaction{factory=org.mule.transaction.XaTransaction
Factory@1efe4ac, action=ALWAYS_BEGIN, timeout=0}, filter=null,
deleteUnacceptedMessages=false, initialised=false, securityFilter=null,
synch
ronous=false, initialState=started, remoteSync=false,
remoteSyncTimeout=3000, endpointEncoding=UTF-8}. Message payload is of
type: JMSObjectMessage
at
org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatc
her.java:186)
at
org.mule.transport.AbstractConnector.send(AbstractConnector.java:1936)
at
org.mule.endpoint.ImmutableMuleEndpoint.send(ImmutableMuleEndpoint.java:
440)
at
org.mule.AbstractExceptionListener.routeException(AbstractExceptionListe
ner.java:256)
at
org.mule.DefaultExceptionStrategy.handleMessagingException(DefaultExcept
ionStrategy.java:30)
at
org.mule.DefaultExceptionStrategy.handleStandardException(DefaultExcepti
onStrategy.java:53)
at
org.mule.AbstractExceptionListener.exceptionThrown(AbstractExceptionList
ener.java:142)
at
org.mule.transport.AbstractMessageReceiver.handleException(AbstractMessa
geReceiver.java:191)
at
org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:
56)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWor
ker(ThreadPoolExecutor.java:1061)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy3.send(Unknown Source)
at
org.mule.transport.jms.Jms102bSupport.send(Jms102bSupport.java:218)
at
org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDi
spatcher.java:274)
at
org.mule.transport.jms.JmsMessageDispatcher.doSend(JmsMessageDispatcher.
java:331)
at
org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatc
her.java:156)
... 12 more
Caused by: org.mule.transaction.IllegalTransactionStateException: Mule
transaction is null, but enlist method is called
at
org.mule.transport.jms.xa.SessionInvocationHandler.enlist(SessionInvocat
ionHandler.java:175)
at
org.mule.transport.jms.xa.ConsumerProducerInvocationHandler.invoke(Consu
merProducerInvocationHandler.java:42)
... 17 more

But as soon as there are JMS messages to proceed, everything's fine. And
when there are no messages, the exception comes back again regularly.
Any idea why?

I will now try to run my config within Eclipse and see if I can get rid
of my previous problem.

Thanks a lot for your help!

Pierre

Andrew

http://xircles.codehaus.org/manage_email

************************************************************************
DISCLAIMER
The information contained in this e-mail is confidential and is intended
for the recipient only.
If you have received it in error, please notify us immediately by reply
e-mail and then delete it from your system. Please do not copy it or
use it for any other purposes, or disclose the content of the e-mail
to any other person or store or copy the information in any medium.
The views contained in this e-mail are those of the author and not
necessarily those of Admenta UK Group.

Admenta UK plc is a company incorporated in England and Wales
under company number 3011757 and whose registered office
is at Sapphire Court, Walsgrave Triangle, Coventry CV2 2TX
************************************************************************

---------------------------------------------------------------------

Andrew Perepelytsya

unread,
Feb 27, 2008, 8:41:24 AM2/27/08
to us...@mule.codehaus.org
Most probably you haven't declared a transaction on one of the endpoints.

Andrew

Meunier Pierre-Emmanuel

unread,
Feb 27, 2008, 9:55:23 AM2/27/08
to us...@mule.codehaus.org

I have 3 endpoints and I think they all have transaction declared:

 

<jms:outbound-endpoint queue="PM.DLQ">

<jms:xa-transaction action="ALWAYS_BEGIN" />

</jms:outbound-endpoint>

...

<jms:inbound-endpoint queue="PM.IN">

<jms:xa-transaction action="ALWAYS_BEGIN" />

</jms:inbound-endpoint>

...

<jms:outbound-endpoint queue="PM.OUT">

      <jms:xa-transaction action="ALWAYS_JOIN" />

</jms:outbound-endpoint>

 

I managed to run the config from the command line earlier. But if I run the same config from Eclipse or embedded in a web app, it doesn’t work (I tried with RC2 and RC3 as suggested). I get the following error again:

 

org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'mule:baseTransactionType' to a(n) 'type definition' component.

 

Can you explain what are the differences between running Mule from the command line and from Eclipse/a Webapp in terms of how Spring loads/handles the schemas?

 

Many thanks for your very quick feedback!

 

Pierre

 


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

Andrew Perepelytsya

unread,
Feb 27, 2008, 12:37:57 PM2/27/08
to us...@mule.codehaus.org
I suspect there could be a problem with XML libraries. When you run Mule standalone, a newer (correct) versions of parsers are being properly endorsed and used at runtime. When running in IDE or webapp it all depends on the versions available there. Most probably, they are older, and thus have this error.

Andrew

Meunier Pierre-Emmanuel

unread,
Feb 28, 2008, 4:51:14 AM2/28/08
to us...@mule.codehaus.org

Hi Andrew

 

You were right. It was a problem with the XML libraries.

 

However, I have now a new error (sorry…)

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_muleSimpleRegistryBootstrap' defined in URL [jar:file:/D:/java/tools/mule-2.0.0-RC3-SNAPSHOT/lib/opt/mule-module-spring-config-2.0.0-RC3-SNAPSHOT.jar!/default-mule-config.xml]: Invocation of init method failed; nested exception is org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Object "transformer: _JMSMessageToByteArray" has already been registered in the Registry. Registered object is "JMSMessageToObject{this=73227322, name='_JMSMessageToByteArray', ignoreBadInput=false, returnClass=class [B, sourceTypes=[interface javax.jms.Message]}.class org.mule.transport.jms.transformers.JMSMessageToObject", Object being registered is "JMSMessageToObject{this=59e059e0, name='_JMSMessageToByteArray', ignoreBadInput=false, returnClass=class [B, sourceTypes=[interface javax.jms.Message]}.class org.mule.transport.jms.transformers.JMSMessageToObject"

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1260)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)

      at java.security.AccessController.doPrivileged(AccessController.java:197)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)

      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)

      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)

      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)

      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)

      at org.mule.config.spring.MuleApplicationContext.<init>(MuleApplicationContext.java:102)

      at org.mule.config.spring.MuleApplicationContext.<init>(MuleApplicationContext.java:56)

      at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringParentRegistry(SpringXmlConfigurationBuilder.java:95)

      at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:71)

      at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:38)

      at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)

      at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:107)

      at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)

      at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:38)

      at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)

      at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:188)

      at org.mule.MuleServer.initialize(MuleServer.java:346)

      at org.mule.MuleServer.run(MuleServer.java:252)

      at org.mule.MuleServer.start(MuleServer.java:239)

      at org.mule.MuleServer.main(MuleServer.java:116)

Caused by:

org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Object "transformer: _JMSMessageToByteArray" has already been registered in the Registry. Registered object is "JMSMessageToObject{this=73227322, name='_JMSMessageToByteArray', ignoreBadInput=false, returnClass=class [B, sourceTypes=[interface javax.jms.Message]}.class org.mule.transport.jms.transformers.JMSMessageToObject", Object being registered is "JMSMessageToObject{this=59e059e0, name='_JMSMessageToByteArray', ignoreBadInput=false, returnClass=class [B, sourceTypes=[interface javax.jms.Message]}.class org.mule.transport.jms.transformers.JMSMessageToObject"

      at org.mule.config.bootstrap.SimpleRegistryBootstrap.initialise(SimpleRegistryBootstrap.java:108)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:618)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1325)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1294)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1257)

      ... 26 more

 

Again the config works fine from the command line but fails from Eclipse or when Mule is inside a webapp.

 

Any ideas/clues are welcomed!

 

Thanks

 

Pierre

 


From: Andrew Perepelytsya [mailto:aper...@gmail.com]
Sent: 27 February 2008 17:38
To: us...@mule.codehaus.org
Subject: Re: [mule-user] Mule2.0: can't find Jotm schema on startup

 

I suspect there could be a problem with XML libraries. When you run Mule standalone, a newer (correct) versions of parsers are being properly endorsed and used at runtime. When running in IDE or webapp it all depends on the versions available there. Most probably, they are older, and thus have this error.

Andrew

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

Andrew Perepelytsya

unread,
Feb 28, 2008, 8:31:04 AM2/28/08
to us...@mule.codehaus.org
Clearly it doesn't like multiple transformer registration attempts under the same name. You really need only 1.

Andrew

Ross Mason

unread,
Feb 28, 2008, 8:51:28 AM2/28/08
to us...@mule.codehaus.org
This looks like a bug since since transformers prefixed with a _ are added by the modules that owns them, in this case Jms.  Can you post here how you are configuring your MUle instance, i.e. from a webApp, using Multiple config files, etc.

Cheers,

Ross Mason
CTO, Co-Founder
MuleSource Inc.





Meunier Pierre-Emmanuel

unread,
Feb 28, 2008, 10:54:07 AM2/28/08
to us...@mule.codehaus.org

Hi Ross

 

I am trying to run it from Eclipse. Not with the Mule IDE plugins, just by running org.mule.MuleServer. There is one config file (see below). I created a Mule library in Eclipse which contains all the jar files from the Mule installation folder:

$MULE_HOME/lib/boot

$MULE_HOME/lib/endorsed

$MULE_HOME/lib/opt

$MULE_HOME/lib/mule

 

Config file is:

 

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xmlns:spring="http://www.springframework.org/schema/beans"

      xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.0"

      

    <spring:bean name="mqQcf" class="com.ibm.mq.jms.MQXAQueueConnectionFactory">

      <spring:property name="hostName" value="xxxxxx" />

      <spring:property name="queueManager" value="xxxxxxx " />

      <spring:property name="port" value="xxxxx" />

      <spring:property name="transportType" value="1" />

    </spring:bean>

   

    <jbossts:transaction-manager />

      

    <jms:connector name="mqConnector" connectionFactory-ref="mqQcf">

      <custom-exception-strategy class="org.mule.RollbackRoutingExceptionStrategy">

            <jms:outbound-endpoint queue="PM.DLQ">

                  <jms:jmsmessage-to-object-transformer />

                  <jms:xa-transaction action="ALWAYS_BEGIN" />

            </jms:outbound-endpoint>

      </custom-exception-strategy>

    </jms:connector>

   

      <model name="MulePerformance">

            <service name="simpleJmsRouting">

                  <inbound>

                        <jms:inbound-endpoint queue="PM.IN">

                              <jms:xa-transaction action="ALWAYS_BEGIN" />

                        </jms:inbound-endpoint>

                  </inbound>

                  <bridge-component />

                  <outbound>

                        <custom-outbound-router class="org.mule.routing.outbound.TransactionJoiningRouter">

                              <jms:outbound-endpoint queue="PM.OUT">

                                    <jms:object-to-jmsmessage-transformer />

                                    <jms:xa-transaction action="ALWAYS_JOIN" />

                              </jms:outbound-endpoint>

                        </custom-outbound-router>

                  </outbound>

            </service>

      </model>

</mule>

 

If I run the same config from the command line it works fine.

 

Thanks for your help.

 

Pierre

 


andrew cooke

unread,
Feb 29, 2008, 7:05:58 AM2/29/08
to us...@mule.codehaus.org

just to clarify here, jbossts gives "standalone transactions" using the
arjuna transaction engine. the jboss-transaction-manager element, in
contrast, tries to retrieve a jboss manager from jndi - that assumes that
you are running in an environment (ie a jboss server) that provides access
to both jndi and the transaction manager itself. so that explains, i
assume, why you had a jndi error when you used the non-jbossts element.

andrew


> I was using <jboss-transaction-manager /> from the core schema. I've
> changed it to <jbossts:transaction-manager /> and it now works fine when
> I run Mule from the command line.

---------------------------------------------------------------------

Meunier Pierre-Emmanuel

unread,
Mar 6, 2008, 6:34:17 AM3/6/08
to us...@mule.codehaus.org
Just to give an update on this.

I have downloaded the latest code from Subversion (version 2.0.0 RC3)
and everything works fine now. I haven't got the exception related the
mule schemas anymore.

Thanks

Pierre

-----Original Message-----
From: andrew cooke [mailto:aco...@mulesource.com]

andrew

http://xircles.codehaus.org/manage_email

************************************************************************
DISCLAIMER
The information contained in this e-mail is confidential and is intended
for the recipient only.
If you have received it in error, please notify us immediately by reply
e-mail and then delete it from your system. Please do not copy it or
use it for any other purposes, or disclose the content of the e-mail
to any other person or store or copy the information in any medium.
The views contained in this e-mail are those of the author and not
necessarily those of Admenta UK Group.

Admenta UK plc is a company incorporated in England and Wales
under company number 3011757 and whose registered office
is at Sapphire Court, Walsgrave Triangle, Coventry CV2 2TX
************************************************************************

---------------------------------------------------------------------

Daniel Feist

unread,
Mar 6, 2008, 10:10:53 AM3/6/08
to us...@mule.codehaus.org
Hi,

I had created an issue for this and had just started looking into it.
 

More specifically for the issues you were encountering with duplicate transformer error when running in eclipse but not from the command-line.

Can you confirm you  no longer get those "duplicate transformer registration error" either when running standalone or in eclipse?

thanks,
Dan

Meunier Pierre-Emmanuel

unread,
Mar 7, 2008, 4:09:09 AM3/7/08
to us...@mule.codehaus.org

Hi Dan

 

I have tried it again just now. And it works fine from the command line, from eclipse and embedded in a webapp!

 

Thanks

 

Pierre

 


Reply all
Reply to author
Forward
0 new messages