Harish S
2012-02-15 11:54:51 UTC
Hi guys i am trying to check the presence of some data in a database table, if the data is present then it should perform some action else it should perform some other action. i have stuck in the choice message processor's when expression. anyone plz help me in solving the problem.
Error i am getting is
ERROR 2012-02-15 17:21:42,886 [test.stage1.02] org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Failed to route event via endpoint: null. Message payload is of type: CaseInsensitiveHashMap
Code : MULE_ERROR-39999
--------------------------------------------------------------------------------
Exception stack is:
1. null (java.lang.NullPointerException)
org.mule.routing.filters.ExpressionFilter:140 (null)
2. Failed to route event via endpoint: null. Message payload is of type: CaseInsensitiveHashMap (org.mule.api.routing.RoutingException)
org.mule.routing.outbound.AbstractOutboundRouter:175 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/routing/RoutingException.html)
Code which i have used is given below:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:spring="http://www.springframework.org/schema/beans" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:xm="http://www.mulesoft.org/schema/mule/xml" xmlns:jdbc="http://www.mulesoft.org/schema/mule/ee/jdbc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.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/stdio http://www.mulesoft.org/schema/mule/stdio/3.2/mule-stdio.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.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.2/mule-file.xsd">
<spring:bean id="jdbcDataSource"
class="org.enhydra.jdbc.standard.StandardDataSource" destroy-method="shutdown">
<spring:property name="driverName"
value="oracle.jdbc.driver.OracleDriver" />
<spring:property name="url"
value="jdbc:oracle:thin:hr/manage-vegXm4Wwwz4S9fsqc+***@public.gmane.org:1521:wmdb" />
</spring:bean>
<jdbc:connector name="jdbcConnector1" pollingFrequency="1000"
dataSource-ref="jdbcDataSource" transactionPerMessage="true">
<jdbc:query key="SelectAssociateFromTVDB"
value="select count(*) as test from TRAVEL_VENDOR_EMPL_DETAILS where ASSOCIATE_ID='303250' AND PROCESSED='Y'" />
<jdbc:query key="SelectAssociateFromTVDB.ack"
value="update TRAVEL_VENDOR_EMPL_DETAILS set PROCESSED='Y' where ASSOCIATE_ID ='303250' AND PROCESSED!='Y'" />
</jdbc:connector>
<vm:endpoint name="A" path="TravelVendor" />
<flow name="TravelVendor">
<file:inbound-endpoint
path="C:\Users\303250\Desktop\Mule\Mule_Integration_PoC\TV\Inbound">
<file:filename-wildcard-filter pattern="Associate_Travel_Details.xml" />
</file:inbound-endpoint>
<log-component />
<byte-array-to-string-transformer
name="ByteArrayToString" />
<vm:outbound-endpoint ref="A" />
</flow>
<flow name="test">
<composite-source>
<vm:inbound-endpoint ref="A" />
<jdbc:inbound-endpoint queryKey="SelectAssociateFromTVDB" />
</composite-source>
<all>
<jdbc:outbound-endpoint queryKey="SelectAssociateFromTVDB.ack" />
<choice>
<when expression="#[map-Payload:[TEST==1]]">
<stdio:outbound-endpoint name="out" system="OUT"
exchange-pattern="one-way" />
</when>
<otherwise>
<file:outbound-endpoint
path="C:\Users\303250\Desktop\Mule\Mule_Integration_PoC\TV" />
</otherwise>
</choice>
</all>
</flow>
</mule>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Error i am getting is
ERROR 2012-02-15 17:21:42,886 [test.stage1.02] org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : Failed to route event via endpoint: null. Message payload is of type: CaseInsensitiveHashMap
Code : MULE_ERROR-39999
--------------------------------------------------------------------------------
Exception stack is:
1. null (java.lang.NullPointerException)
org.mule.routing.filters.ExpressionFilter:140 (null)
2. Failed to route event via endpoint: null. Message payload is of type: CaseInsensitiveHashMap (org.mule.api.routing.RoutingException)
org.mule.routing.outbound.AbstractOutboundRouter:175 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/routing/RoutingException.html)
Code which i have used is given below:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:spring="http://www.springframework.org/schema/beans" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:xm="http://www.mulesoft.org/schema/mule/xml" xmlns:jdbc="http://www.mulesoft.org/schema/mule/ee/jdbc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.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/stdio http://www.mulesoft.org/schema/mule/stdio/3.2/mule-stdio.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.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/3.2/mule-file.xsd">
<spring:bean id="jdbcDataSource"
class="org.enhydra.jdbc.standard.StandardDataSource" destroy-method="shutdown">
<spring:property name="driverName"
value="oracle.jdbc.driver.OracleDriver" />
<spring:property name="url"
value="jdbc:oracle:thin:hr/manage-vegXm4Wwwz4S9fsqc+***@public.gmane.org:1521:wmdb" />
</spring:bean>
<jdbc:connector name="jdbcConnector1" pollingFrequency="1000"
dataSource-ref="jdbcDataSource" transactionPerMessage="true">
<jdbc:query key="SelectAssociateFromTVDB"
value="select count(*) as test from TRAVEL_VENDOR_EMPL_DETAILS where ASSOCIATE_ID='303250' AND PROCESSED='Y'" />
<jdbc:query key="SelectAssociateFromTVDB.ack"
value="update TRAVEL_VENDOR_EMPL_DETAILS set PROCESSED='Y' where ASSOCIATE_ID ='303250' AND PROCESSED!='Y'" />
</jdbc:connector>
<vm:endpoint name="A" path="TravelVendor" />
<flow name="TravelVendor">
<file:inbound-endpoint
path="C:\Users\303250\Desktop\Mule\Mule_Integration_PoC\TV\Inbound">
<file:filename-wildcard-filter pattern="Associate_Travel_Details.xml" />
</file:inbound-endpoint>
<log-component />
<byte-array-to-string-transformer
name="ByteArrayToString" />
<vm:outbound-endpoint ref="A" />
</flow>
<flow name="test">
<composite-source>
<vm:inbound-endpoint ref="A" />
<jdbc:inbound-endpoint queryKey="SelectAssociateFromTVDB" />
</composite-source>
<all>
<jdbc:outbound-endpoint queryKey="SelectAssociateFromTVDB.ack" />
<choice>
<when expression="#[map-Payload:[TEST==1]]">
<stdio:outbound-endpoint name="out" system="OUT"
exchange-pattern="one-way" />
</when>
<otherwise>
<file:outbound-endpoint
path="C:\Users\303250\Desktop\Mule\Mule_Integration_PoC\TV" />
</otherwise>
</choice>
</all>
</flow>
</mule>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email