- Index
- » Saddle Forum
- » User
- » Unexpected exception parsing XML...
Unexpected exception parsing XML document from URL, mule-config.xml
Unexpected exception parsing XML document from URL, mule-config.xml
I am new to mule and saddle. I have a simple app that reads a PostgreSQL database converts the data to HL7 and sends on a TCP/IP port. The application won't start because of an XML parsing error.
I am getting the same error on both MacOSX and CentOS Linux. Any hints, pointers or help would be much appreciated.
Here is the output:
Code:
INFO 2012-03-26 14:51:32,536 [WrapperListener_start_runner] org.mule.module.launcher.MuleContainer:
**********************************************************************
* Mule ESB and Integration Platform *
* Version: 3.2.1 Build: 23380 *
* MuleSoft, Inc. *
* For more information go to http://www.mulesoft.org *
* *
* Server started: 3/26/12 2:51 PM *
* JDK: 1.6.0_29 (mixed mode) *
* OS: Mac OS X (10.7.3, x86_64) *
* Host: jaz-pro.local (192.168.1.2) *
**********************************************************************
INFO 2012-03-26 14:51:32,622 [WrapperListener_start_runner] org.mule.module.launcher.application.DefaultMuleApplication:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ New app 'poller' +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO 2012-03-26 14:51:32,631 [WrapperListener_start_runner] org.mule.module.launcher.MuleApplicationClassLoader: [poller] Loading the following jars:
=============================
file:/Users/jaz/mule/apps/poller/lib/custom.jar
file:/Users/jaz/mule/apps/poller/lib/javaee.jar
file:/Users/jaz/mule/apps/poller/lib/json-20080701.jar
file:/Users/jaz/mule/apps/poller/lib/log4j.jar
file:/Users/jaz/mule/apps/poller/lib/lu-tudor-santec-message.jar
file:/Users/jaz/mule/apps/poller/lib/lu.tudor.santec.saddle.muleextensions.jar
file:/Users/jaz/mule/apps/poller/lib/MapPatientToHL7.jar
file:/Users/jaz/mule/apps/poller/lib/PatientToHL7.jar
file:/Users/jaz/mule/apps/poller/lib/poi-3.7-20101029.jar
file:/Users/jaz/mule/apps/poller/lib/poi-ooxml-3.7-20101029.jar
file:/Users/jaz/mule/apps/poller/lib/poi-ooxml-schemas-3.7-20101029.jar
file:/Users/jaz/mule/apps/poller/lib/poi-scratchpad-3.7-20101029.jar
file:/Users/jaz/mule/apps/poller/lib/SaddleMule3.2.0Components.jar
file:/Users/jaz/mule/apps/poller/lib/xbean.jar
=============================
ERROR 2012-03-26 14:51:35,423 [WrapperListener_start_runner] org.mule.module.launcher.DeploymentService:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Failed to deploy app 'poller', see below +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
org.mule.module.launcher.DeploymentInitException: NullPointerException:
at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:215)
at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:51)
at org.mule.module.launcher.DeploymentService.start(DeploymentService.java:175)
at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:157)
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:597)
at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:56)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:4006)
Caused by: org.mule.api.config.ConfigurationException: Unexpected exception parsing XML document from URL [file:/Users/jaz/mule/apps/poller/mule-config.xml]; nested exception is java.lang.NullPointerException (org.mule.api.lifecycle.InitialisationException) (org.mule.api.config.ConfigurationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:52)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java)
at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:203)
... 10 more
Caused by: org.mule.api.config.ConfigurationException: Unexpected exception parsing XML document from URL [file:/Users/jaz/mule/apps/poller/mule-config.xml]; nested exception is java.lang.NullPointerException (org.mule.api.lifecycle.InitialisationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:52)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)
... 13 more
Caused by: org.mule.api.lifecycle.InitialisationException: Unexpected exception parsing XML document from URL [file:/Users/jaz/mule/apps/poller/mule-config.xml]; nested exception is java.lang.NullPointerException
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:117)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)
... 17 more
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [file:/Users/jaz/mule/apps/poller/mule-config.xml]; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
at org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:112)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:109)
... 20 more
Caused by: java.lang.NullPointerException
at org.mule.config.spring.parsers.assembly.DefaultBeanAssembler.insertBeanInTarget(DefaultBeanAssembler.java:282)
at org.mule.config.spring.parsers.AbstractChildDefinitionParser.postProcess(AbstractChildDefinitionParser.java:73)
at org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser.doParse(AbstractMuleBeanDefinitionParser.java:426)
at org.mule.config.spring.parsers.AbstractChildDefinitionParser.parseChild(AbstractChildDefinitionParser.java:57)
at org.mule.config.spring.parsers.AbstractChildDefinitionParser.doParse(AbstractChildDefinitionParser.java:51)
at org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser.parseInternal(AbstractMuleBeanDefinitionParser.java:297)
at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:88)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:130)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:130)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:130)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:130)
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:130)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:141)
at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:45)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
... 29 more
Here is the mule-config.xml for the poller app.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mule xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tool http://www.springframework.org/schema/tool/spring-tool-3.0.xsd
http://cxf.apache.org/core http://cxf.apache.org/core/core.xsd
http://cxf.apache.org/configuration/beans http://cxf.apache.org/configuration/beans/cxf-beans.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
http://www.mulesoft.org/schema/mule/acegi http://www.mulesoft.org/schema/mule/acegi/3.2/mule-acegi.xsd
http://www.mulesoft.org/schema/mule/ajax http://www.mulesoft.org/schema/mule/ajax/3.2/mule-ajax.xsd
http://www.mulesoft.org/schema/mule/atom http://www.mulesoft.org/schema/mule/atom/3.2/mule-atom.xsd
http://www.mulesoft.org/schema/mule/axis http://www.mulesoft.org/schema/mule/axis/3.2/mule-axis.xsd
http://www.mulesoft.org/schema/mule/bpm http://www.mulesoft.org/schema/mule/bpm/3.2/mule-bpm.xsd
http://www.mulesoft.org/schema/mule/client http://www.mulesoft.org/schema/mule/client/3.2/mule-client.xsd
http://www.mulesoft.org/schema/mule/ee/cluster http://www.mulesoft.org/schema/mule/ee/cluster/3.2/mule-cluster-ee.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.2/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/ee/core http://www.mulesoft.org/schema/mule/ee/core/3.2/mule-ee.xsd
http://www.mulesoft.org/schema/mule/ejb http://www.mulesoft.org/schema/mule/ejb/3.2/mule-ejb.xsd
http://www.mulesoft.org/schema/mule/email http://www.mulesoft.org/schema/mule/email/3.2/mule-email.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.2/mule-file.xsd
http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ftp/3.2/mule-ftp.xsd
/schemas/saddle/hl7/mule32/0.8 /schemas/saddle/hl7/mule32/0.8/saddle-hl7.xsd
http://www.mulesoft.org/schema/mule/ee/ftp http://www.mulesoft.org/schema/mule/ee/ftp/3.2/mule-ftp-ee.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd
http://www.mulesoft.org/schema/mule/ibeans http://www.mulesoft.org/schema/mule/ibeans/3.2/mule-ibeans.xsd
http://www.mulesoft.org/schema/mule/imap http://www.mulesoft.org/schema/mule/imap/3.2/mule-imap.xsd
http://www.mulesoft.org/schema/mule/imaps http://www.mulesoft.org/schema/mule/imaps/3.2/mule-imaps.xsd
http://www.mulesoft.org/schema/mule/jaas http://www.mulesoft.org/schema/mule/jaas/3.2/mule-jaas.xsd
http://www.mulesoft.org/schema/mule/jbossts http://www.mulesoft.org/schema/mule/jbossts/3.2/mule-jbossts.xsd
http://www.mulesoft.org/schema/mule/jdbc http://www.mulesoft.org/schema/mule/jdbc/3.2/mule-jdbc.xsd
http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/3.2/mule-jdbc-ee.xsd
http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/3.2/mule-jersey.xsd
http://www.mulesoft.org/schema/mule/jetty http://www.mulesoft.org/schema/mule/jetty/3.2/mule-jetty.xsd
http://www.mulesoft.org/schema/mule/jetty-ssl http://www.mulesoft.org/schema/mule/jetty-ssl/3.2/mule-jetty-ssl.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/3.2/mule-jms.xsd
http://www.mulesoft.org/schema/mule/jnp http://www.mulesoft.org/schema/mule/jnp/3.2/mule-jnp.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/3.2/mule-json.xsd
http://www.mulesoft.org/schema/mule/management http://www.mulesoft.org/schema/mule/management/3.2/mule-management.xsd
http://www.mulesoft.org/schema/mule/ee/msmq http://www.mulesoft.org/schema/mule/ee/msmq/3.2/mule-msmq.xsd
http://www.mulesoft.org/schema/mule/multicast http://www.mulesoft.org/schema/mule/multicast/3.2/mule-multicast.xsd
http://www.mulesoft.org/schema/mule/ognl http://www.mulesoft.org/schema/mule/ognl/3.2/mule-ognl.xsd
http://www.mulesoft.org/schema/mule/pgp http://www.mulesoft.org/schema/mule/pgp/3.2/mule-pgp.xsd
http://www.mulesoft.org/schema/mule/pop3 http://www.mulesoft.org/schema/mule/pop3/3.2/mule-pop3.xsd
http://www.mulesoft.org/schema/mule/pop3s http://www.mulesoft.org/schema/mule/pop3s/3.2/mule-pop3s.xsd
http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/3.2/mule-quartz.xsd
http://www.mulesoft.org/schema/mule/rmi http://www.mulesoft.org/schema/mule/rmi/3.2/mule-rmi.xsd
http://www.mulesoft.org/schema/mule/rss http://www.mulesoft.org/schema/mule/rss/3.2/mule-rss.xsd
http://www.mulesoft.org/schema/mule/salesforce http://www.mulesoft.org/schema/mule/salesforce/3.2/mule-salesforce.xsd
http://www.mulesoft.org/schema/mule/ee/saml http://www.mulesoft.org/schema/mule/ee/saml/3.2/mule-saml-ee.xsd
http://www.mulesoft.org/schema/mule/schemadoc http://www.mulesoft.org/schema/mule/schemadoc/3.2/mule-schemadoc.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/3.2/mule-scripting.xsd
http://www.mulesoft.org/schema/mule/servlet http://www.mulesoft.org/schema/mule/servlet/3.2/mule-servlet.xsd
http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/3.2/mule-smtp.xsd
http://www.mulesoft.org/schema/mule/smtps http://www.mulesoft.org/schema/mule/smtps/3.2/mule-smtps.xsd
http://www.mulesoft.org/schema/mule/spring-security http://www.mulesoft.org/schema/mule/spring-security/3.2/mule-spring-security.xsd
http://www.mulesoft.org/schema/mule/ssl http://www.mulesoft.org/schema/mule/ssl/3.2/mule-ssl.xsd
http://www.mulesoft.org/schema/mule/stdio http://www.mulesoft.org/schema/mule/stdio/3.2/mule-stdio.xsd
http://www.mulesoft.org/schema/mule/sxc http://www.mulesoft.org/schema/mule/sxc/3.2/mule-sxc.xsd
http://www.mulesoft.org/schema/mule/tcp http://www.mulesoft.org/schema/mule/tcp/3.2/mule-tcp.xsd
http://www.mulesoft.org/schema/mule/test http://www.mulesoft.org/schema/mule/test/3.2/mule-test.xsd
http://www.mulesoft.org/schema/mule/tls http://www.mulesoft.org/schema/mule/tls/3.2/mule-tls.xsd
http://www.mulesoft.org/schema/mule/twitter http://www.mulesoft.org/schema/mule/twitter/3.2/mule-twitter.xsd
http://www.mulesoft.org/schema/mule/udp http://www.mulesoft.org/schema/mule/udp/3.2/mule-udp.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd
http://www.mulesoft.org/schema/mule/ee/wmq http://www.mulesoft.org/schema/mule/ee/wmq/3.2/mule-wmq-ee.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/3.2/mule-ws.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.2/mule-xml.xsd
http://www.mulesoft.org/schema/mule/xmpp http://www.mulesoft.org/schema/mule/xmpp/3.2/mule-xmpp.xsd
http://www.mulesoft.org/schema/mule/context http://www.mulesoft.org/schema/mule/context/3.2/mule-context.xsd
/schemas/saddle/saddleMule320Components/0.8 /schemas/saddle/saddleMule320Components/0.8/saddle.xsd" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:saddle="/schemas/saddle/saddleMule320Components/0.8" xmlns:management="http://www.mulesoft.org/schema/mule/management" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:hl7="http://www.mulesoft.org/schema/mule/hl7" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:jdbc="http://www.mulesoft.org/schema/mule/jdbc" xmlns:ns="/schemas/saddle/hl7/mule32/0.8" xmlns:spring="http://www.springframework.org/schema/beans">
<model name="model">
<service name="MapPatientToHL7">
<inbound>
<?WDPosition x="80" y="70" id="804913074" linkedTo="829731409"?>
<jdbc:inbound-endpoint name="Patients" connector-ref="DdPollingConnector" pollingFrequency="30000" transformer-refs="PatientToMessage" queryKey="ADT_IN_QRY"/>
</inbound>
<?WDPosition x="360" y="70" id="362429905" linkedTo="1567955952"?>
<component>
<prototype-object class="PatientToHL7">
<property key="endpointForPatientQuery"/>
</prototype-object>
</component>
<outbound>
<?WDPosition x="180" y="240" id="1567955952" linkedTo="1525485419"?>
<pass-through-router>
<?WDPosition x="530" y="240" id="1833054244" linkedTo=""?>
<ns:outbound-endpoint name="OutboundHL7" transformer-refs="MessageToHL7" port="6000" host="127.0.0.1"/>
</pass-through-router>
</outbound>
</service>
</model>
<?WDPosition x="200" y="70" id="829731409" linkedTo="362429905"?>
<saddle:database-to-message-transformer name="PatientToMessage" templatePath="DdPatient"/>
<?WDPosition x="350" y="240" id="1525485419" linkedTo="1833054244"?>
<saddle:message-to-mixedstring-transformer name="MessageToHL7" provideAsXML="false"/>
<spring:bean id="DD" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<spring:property name="driverClassName" value="org.postgresql.Driver"/>
<spring:property name="url" value="jdbc:postgresql://127.0.0.1:5432/db_dd"/>
<spring:property name="username" value="shastadatadirector"/>
<spring:property name="password" value="sweetmachine"/>
</spring:bean>
<saddle:saddle-jdbc-connector name="DdPollingConnector" dataSource-ref="DD" queryTimeout="-1" dynamicNotification="false" validateConnections="true">
<jdbc:query key="ADT_IN_QRY" value="select id,facility,dos,patacctnum from ADT_IN order by created limit 10"/>
</saddle:saddle-jdbc-connector>
<management:jmx-default-config/>
</mule>
Re: Unexpected exception parsing XML document from URL, mule-config.xml
Hello jaz,
the problem is really simple to solve, even if Mule's own error mesage is not very clear.
You have to set an endpoint for the incoming channelof your mapping. Just select your component and select the JDBC endpoint (Patients) as the endpoint assigned to your channel "PatientQuery".
Saddle should have done this automatically if the templates in your mapping and the transformer after the endpoint match, so please check your mapping for the right template file on the inbound channel.
In the end it should look like this:
If you encounter any further problems feel free to ask and we will anwer your questions as fast as possible.
Best regards,
Matthias
- mkutscheid
- 309 Posts
- Index
- » Saddle Forum
- » User
- » Unexpected exception parsing XML...
Board Info
- Board Stats
- Total Topics:
- 119
- Total Polls:
- 0
- Total Posts:
- 800
- User Info
- Total Users:
- 960
- Newest User:
- rpjtate
- Members Online:
- 0
- Guests Online:
- 21
- Most Active Users:
- mkutscheid, dzungdev, Ortwin, aartik, cheikh, Mishra, sdanhardt, javega
- Online:
- There are no members online