One of my integration use cases, failed in loading groovy transformer,
where
<property name="scriptFile"
But, when I choose to declare tansformer, embedding it with
<text-property name="scriptText">
Mule boots up with no errors,
I was hopping any of you might have an idea, where should I search for
solution,
Many Thanks,
See error log below,
INFO 2008-08-15 09:43:39,525 [WrapperListener_start_runner]
org.mule.MuleManager: Transformer ObjectToString has been initialised
successfully
DEBUG 2008-08-15 09:43:39,627 [WrapperListener_start_runner]
org.mule.transformers.script.ScriptTransformer: Setting transformer name to:
XmlToMessageServiceEvent
DEBUG 2008-08-15 09:43:39,769 [WrapperListener_start_runner]
org.mule.util.IOUtils: Unable to load resource from the file system:
/appl/MuleESB/shared/projects/espeed.ads/XmlToMessageServiceEvent.groovy
DEBUG 2008-08-15 09:43:39,777 [WrapperListener_start_runner]
org.mule.util.IOUtils: Unable to load resource from the classpath
DEBUG 2008-08-15 09:43:39,778 [WrapperListener_start_runner]
org.mule.util.IOUtils: Unable to load resource as a URL:
XmlToMessageServiceEvent.groovy
ERROR 2008-08-15 09:43:39,782 [WrapperListener_start_runner]
org.apache.commons.digester.Digester: End event threw exception
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetRootRule.end(SetRootRule.java:209)
at org.apache.commons.digester.Rule.end(Rule.java:230)
at org.apache.commons.digester.Digester.endElement(Digester.java:1130)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(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.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1685)
at
org.mule.config.builders.AbstractDigesterConfiguration.process(AbstractDigesterConfiguration.java:101)
at
org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:268)
at
org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:221)
at org.mule.MuleServer.initialize(MuleServer.java:298)
at org.mule.MuleServer.run(MuleServer.java:219)
at org.mule.MuleServer.start(MuleServer.java:207)
at org.mule.MuleServer.main(MuleServer.java:177)
at org.mule.modules.boot.MuleServerWrapper.start(MuleServerWrapper.java:45)
at
org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
Caused by: java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:61)
at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
at
org.mule.components.script.jsr223.Scriptable.initialise(Scriptable.java:107)
at
org.mule.transformers.script.ScriptTransformer.initialise(ScriptTransformer.java:69)
at org.mule.MuleManager.registerTransformer(MuleManager.java:647)
... 30 more
ERROR 2008-08-15 09:43:39,835 [WrapperListener_start_runner]
org.mule.MuleServer:
********************************************************************************
Message : Failed to parse configuration resource
"mule-messagerequestcontroller.xml"
Type : org.mule.config.ConfigurationException
Code : MULE_ERROR-13001
JavaDoc :
http://mule.mulesource.org/docs/apidocs/org/mule/config/ConfigurationException.html
********************************************************************************
Exception stack is:
1. Error at line 62 char 21: null (org.xml.sax.SAXParseException)
org.apache.commons.digester.Digester:2919 (null)
2. Failed to parse configuration resource
"mule-messagerequestcontroller.xml" (org.mule.config.ConfigurationException)
org.mule.config.builders.AbstractDigesterConfiguration:105
(http://mule.mulesource.org/docs/apidocs/org/mule/config/ConfigurationException.html)
********************************************************************************
Root Exception stack trace:
java.lang.NullPointerException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2919)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:2945)
at org.apache.commons.digester.Digester.endElement(Digester.java:1133)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown
Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(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.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1685)
at
org.mule.config.builders.AbstractDigesterConfiguration.process(AbstractDigesterConfiguration.java:101)
at
org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:268)
at
org.mule.config.builders.MuleXmlConfigurationBuilder.configure(MuleXmlConfigurationBuilder.java:221)
at org.mule.MuleServer.initialize(MuleServer.java:298)
at org.mule.MuleServer.run(MuleServer.java:219)
at org.mule.MuleServer.start(MuleServer.java:207)
at org.mule.MuleServer.main(MuleServer.java:177)
at org.mule.modules.boot.MuleServerWrapper.start(MuleServerWrapper.java:45)
at
org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
********************************************************************************
ERROR 2008-08-15 09:43:39,842 [WrapperListener_start_runner]
org.mule.MuleServer:
********************************************************************************
* A Fatal error has occurred while the server was running:
*
* Error at line 62 char 21: null (org.xml.sax.SAXParseException)
*
*
*
* The error is fatal, the system must shutdown
*
* Server started: 12/31/69 7:00 PM
*
* Server shutdown: 8/15/08 9:43 AM
*
********************************************************************************
--
View this message in context: http://www.nabble.com/groovy-transformer---Mule-%281.4.4%29-org.mule.util.IOUtils%3A-Unable-to-load-resource-tp19038237p19038237.html
Sent from the Mule - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Without a look at the full config it's hard to say anyting definitive
but ...
> Caused by: java.lang.NullPointerException
> at java.io.Reader.<init>(Reader.java:61)
> at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
> at
> org.mule.components.script.jsr223.Scriptable.initialise(Scriptable.java:107)
> at
> org.mule.transformers.script.ScriptTransformer.initialise(ScriptTransformer.java:69)
> at org.mule.MuleManager.registerTransformer(MuleManager.java:647)
This part of the exception combined with the following error message:
> Message : Failed to parse configuration resource
> "mule-messagerequestcontroller.xml"
would cause me tho think that Mule cannot find the
mule-messagerequestcontroller.xml file that's somehow referenced by the
script component.
-dirk
OR....
Forgot to mention, there are NO exceptions when running on Windows,
where we are using MULE_HOME only ; where in UNIX we ran based on MULE_BASE
location
--
View this message in context: http://www.nabble.com/groovy-transformer---Mule-%281.4.4%29-org.mule.util.IOUtils%3A-Unable-to-load-resource-tp19038237p19039482.html
The only difference I see in this transformer
XMLToMessageServiceEvent.groovy (see below),
"import" of a custom class (which is part of .jar placed in
MULE_BASE/lib/user
-------------------------------------------------------------
// import the JavaBean class
import com.bgcp.mule.implementation.MessageServiceEvent;
// parse the xml, src is the incoming object from Mule
def root = new XmlSlurper().parseText(src);
def msgEvent = new MessageServiceEvent();
//def msgEvent as java.util.Map;
msgEvent.serviceType = root.row.ServiceType.text();
msgEvent.serviceDataSource = root.row.ServiceDataSource.text();
msgEvent.eventID = root.row.EventID.text()
msgEvent.sequenceNumber = new Long( root.row.SequenceNumber.text()
).longValue();
msgEvent.action = root.row.Action.text();
msgEvent.actionType = root.row.ActionType.text();
msgEvent.createDate = root.row.CreateDate.text();
msgEvent.modifiedDate = root.row.ModifiedDate.text();
msgEvent.modifiedBy = root.row.ModifiedBy.text();
msgEvent.isActive = root.row.IsActive.text();
return msgEvent;
-------------------------------------------------------------
--
View this message in context: http://www.nabble.com/groovy-transformer---Mule-%281.4.4%29-org.mule.util.IOUtils%3A-Unable-to-load-resource-tp19038237p19055189.html
Following your advice,
I have switched my deployment to run from MULE_HOME, adding /lib/user to
classpath,
Wrapper debug log,
-----------------------------------------
--> Wrapper Started as Daemon
Using tick timer.
server listening on port 32000.
Classpath element, wrapper.java.classpath.2, does not exist:
/appl/MuleESB/mule/lib/user:/appl/MuleESB/mule/lib/opt:/appl/MuleESB/mule/lib/mule
Command[0] : java
Command[1] : -Dmule.home=/appl/MuleESB/mule
Command[2] : -Dmule.base=/appl/MuleESB/mule
Command[3] : -Dm2.repo="%M2_REPO%"
Command[4] :
-Dmule.bootstrap.library.download.description.1=javax.activation.DataSource,/javax/activation/activation/1.1,activation-1.1.jar
Command[5] :
-Dmule.bootstrap.library.download.description.2=javax.mail.Message,/javax/mail/mail/1.4,mail-1.4.jar
Command[6] : -Djava.endorsed.dirs=/appl/MuleESB/mule/lib/endorsed
Command[7] : -Xmx512m
Command[8] :
-Djava.library.path=/usr/lib:/usr/dt/lib:/usr/share/lib:/appl/MuleESB/mule/lib/boot
Command[9] : -classpath
Command[10] :
/appl/MuleESB/mule-1.4.4/bin/../conf:/appl/MuleESB/mule/lib/user:/appl/MuleESB/mule/lib/opt:/appl/MuleESB/mule/lib/mule:/appl/MuleESB/mule/lib/boot/commons-cli-1.0.jar:/appl/MuleESB/mule/lib/boot/mule-module-boot-1.4.4.jar:/appl/MuleESB/mule/lib/boot/wrapper-3.2.3.jar
Command[11] : -Dwrapper.key=jNkIPtSi2GAsaCD2
Command[12] : -Dwrapper.port=32000
Command[13] : -Dwrapper.jvm.port.min=31000
Command[14] : -Dwrapper.jvm.port.max=31999
Command[15] : -Dwrapper.debug=TRUE
Command[16] : -Dwrapper.pid=19080
Command[17] : -Dwrapper.version=3.2.3
Command[18] : -Dwrapper.native_library=wrapper
Command[19] : -Dwrapper.service=TRUE
Command[20] : -Dwrapper.cpu.timeout=10
Command[21] : -Dwrapper.jvmid=1
Command[22] : org.mule.modules.boot.MuleBootstrap
Command[23] : -config
Command[24] : mule-messagerequestcontroller.xml
Command[25] : start0
Launching a JVM...
-----------------------------------------
where (in mule config) declared transformer property as
<property name="scriptFile"
value="/appl/MuleESB/mule/lib/user/XmlToMessageServiceEvent.groovy"/>
Still, cannot load resource, see lines from mule.log below
--------------------------------------------------------------
DEBUG 2008-08-19 16:03:22,411 [WrapperListener_start_runner]
org.mule.util.IOUtils: Unable to load resource from the classpath
DEBUG 2008-08-19 16:03:22,412 [WrapperListener_start_runner]
org.mule.util.IOUtils: Unable to load resource as a URL:
/appl/MuleESB/mule/lib/user/XmlToMessageServiceEvent.groovy
--------------------------------------------------------------
Now, I am guessing...if it has to do with loading/accessing my .jar classes?
BTW my .jar is in /lib/user,
Thanks,
--
View this message in context: http://www.nabble.com/groovy-transformer---Mule-%281.4.4%29-org.mule.util.IOUtils%3A-Unable-to-load-resource-tp19038237p19057855.html
Uncomment this line in the case of startup failure.
#wrapper.debug=true
To keep in mind, all of the "pure" groovy transformers pass mule boot and
work fine,
The issue is with new transformer that imports custom class
(MULE_BASE/lib/user/part-of-my.jar):
- Cannot pass mule boot if declared in mule config by reference <property
name="scriptFile" to groovy file name
- Passing mule boot and works fine if declared in <text-property>
---------------------------
--
View this message in context: http://www.nabble.com/groovy-transformer---Mule-%281.4.4%29-org.mule.util.IOUtils%3A-Unable-to-load-resource-tp19038237p19220622.html