[mule-user] Message content temporary disappears

1 view
Skip to first unread message

Dmitry

unread,
Oct 24, 2007, 10:43:17 AM10/24/07
to us...@mule.codehaus.org

I have a component that bridges 2 jdbc endpoints. It's as simple as possible:
select a, b, c from source -> insert into destination values (${a}, ${b},
${c}). And it works (like a couple of similar constructs) almost always. But
sometimes I find in log errors that I can not explain. According to log
nulls are inserted while the content of the message listed within the same
record is completely valid.

********************************************************************************
Message : Failed to route event via endpoint:
MuleEndpoint{endpointUri=jdbc://writeSms,
connector=JdbcConnector{this=9c22ff, started=true, initialised=true,
name='jdbcSmsgateConnector', disposed=false,
numberOfConcurrentTransactedReceivers=4,
createMultipleTransactedReceivers=true, connected=true,
supportedProtocols=[jdbc], serviceOverrides=null}, transformer=null,
name='endpoint.jdbc.writeSms', type='sender', properties={},
transactionConfig=Transaction{factory=null, action=NONE, timeout=30000},
filter=null, deleteUnacceptedMessages=false, initialised=true,
securityFilter=null, synchronous=false, initialState=started,
createConnector=0, remoteSync=null, remoteSyncTimeout=null,
endpointEncoding=null}. Message payload is of type:
BasicRowProcessor$CaseInsensitiveHashMap
Type : org.mule.umo.provider.DispatchException
Code : MULE_ERROR-42999
JavaDoc :
http://mule.mulesource.org/docs/apidocs/org/mule/umo/provider/DispatchException.html
SQL Code : 1400
Payload : {mfo=313979, text=Some text's here, don't want to
show it, contains digits and letters, account=9999999999, sender=dwh,
address=0000000000, taxcd=000000000, outid=470980}
SQL State : 23000
********************************************************************************
Exception stack is:
1. ORA-01400: cannot insert NULL into ("EXIMGATE"."OUT_MESSAGES"."ADDRESS")
(SQL Code: 1400, SQL State: + 23000) (java.sql.SQLException)
oracle.jdbc.driver.SQLStateMapping:74
(http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html)
2. ORA-01400: cannot insert NULL into ("EXIMGATE"."OUT_MESSAGES"."ADDRESS")
Query: insert into out_messages (id , sender, address, subject, text,
external_id, destype, mfo, account, tax_cd) values (oum_seq.nextval, ?, ?,
?, ?, ?, 'S', ?, ?, ?) Parameters: [null, null, null, null, null, null,
null, null](SQL Code: 1400, SQL State: + 23000) (java.sql.SQLException)
org.apache.commons.dbutils.QueryRunner:359
(http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html)
3. Failed to route event via endpoint:
MuleEndpoint{endpointUri=jdbc://writeSms,
connector=JdbcConnector{this=9c22ff, started=true, initialised=true,
name='jdbcSmsgateConnector', disposed=false,
numberOfConcurrentTransactedReceivers=4,
createMultipleTransactedReceivers=true, connected=true,
supportedProtocols=[jdbc], serviceOverrides=null}, transformer=null,
name='endpoint.jdbc.writeSms', type='sender', properties={},
transactionConfig=Transaction{factory=null, action=NONE, timeout=30000},
filter=null, deleteUnacceptedMessages=false, initialised=true,
securityFilter=null, synchronous=false, initialState=started,
createConnector=0, remoteSync=null, remoteSyncTimeout=null,
endpointEncoding=null}. Message payload is of type:
BasicRowProcessor$CaseInsensitiveHashMap
(org.mule.umo.provider.DispatchException)
org.mule.providers.AbstractMessageDispatcher:252
(http://mule.mulesource.org/docs/apidocs/org/mule/umo/provider/DispatchException.html)
********************************************************************************
Root Exception stack trace:
java.sql.SQLException: ORA-01400: cannot insert NULL into
("EXIMGATE"."OUT_MESSAGES"."ADDRESS")

at
oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
at
oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:947)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3462)
at
oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1061)
at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:425)
at
org.mule.providers.jdbc.JdbcMessageDispatcher.executeWriteStatement(JdbcMessageDispatcher.java:73)
at
org.mule.providers.jdbc.JdbcMessageDispatcher.doSend(JdbcMessageDispatcher.java:161)
at
org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:224)
at org.mule.providers.AbstractConnector.send(AbstractConnector.java:1629)
at org.mule.impl.ImmutableMuleEndpoint.send(ImmutableMuleEndpoint.java:950)
at org.mule.impl.MuleSession.sendEvent(MuleSession.java:327)
at org.mule.impl.MuleSession.sendEvent(MuleSession.java:210)
at
org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:118)
at
org.mule.routing.outbound.FilteringOutboundRouter.route(FilteringOutboundRouter.java:66)
at
org.mule.routing.outbound.OutboundPassThroughRouter.route(OutboundPassThroughRouter.java:79)
at
org.mule.routing.outbound.OutboundRouterCollection$1.doInTransaction(OutboundRouterCollection.java:66)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:39)
at
org.mule.routing.outbound.OutboundRouterCollection.route(OutboundRouterCollection.java:71)
at org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:275)
at org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:393)
at
org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:418)
at org.mule.impl.MuleSession.sendEvent(MuleSession.java:349)
at
org.mule.routing.inbound.InboundRouterCollection.send(InboundRouterCollection.java:197)
at
org.mule.routing.inbound.InboundRouterCollection.route(InboundRouterCollection.java:163)
at
org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:581)
at
org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:322)
at
org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:257)
at
org.mule.providers.jdbc.JdbcMessageReceiver.processMessage(JdbcMessageReceiver.java:108)
at
org.mule.providers.TransactedPollingMessageReceiver$MessageProcessorWorker.doInTransaction(TransactedPollingMessageReceiver.java:194)
at
org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:92)
at
org.mule.providers.TransactedPollingMessageReceiver$MessageProcessorWorker.run(TransactedPollingMessageReceiver.java:180)
at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
at java.lang.Thread.run(Thread.java:595)

The component:
<mule-descriptor name="DwhSMSLoader"
implementation="org.mule.components.simple.PassThroughComponent"
initialState="started">
<inbound-router>
<endpoint address="jdbc://getSms"
connector="jdbcDwhConnector" synchronous="true"/>
</inbound-router>

<outbound-router>
<router
className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint address="jdbc://writeSms"
connector="jdbcSmsgateConnector" synchronous="false" />
</router>
</outbound-router>
<interceptor name="default" />
</mule-descriptor>


The only difference with other similar components I found was that polling
frequency on jdbcDwhConnector was significantly lower (6 hours vs several
seconds). Does anybody have an idea what to do to catch it?
--
View this message in context: http://www.nabble.com/Message-content-temporary-disappears-tf4684058.html#a13384771
Sent from the Mule - User mailing list archive at Nabble.com.


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

http://xircles.codehaus.org/manage_email

Dmitry

unread,
Oct 25, 2007, 1:43:31 AM10/25/07
to us...@mule.codehaus.org

Ok, to make it more compact and expressive (omited only unnecessary details).

Reading connector:
<connector name="jdbcDwhConnector"
className="org.mule.providers.jdbc.JdbcConnector">
<properties>
<container-property name="dataSource" reference="dwhDB" />
<property name="pollingFrequency" value="3600000" />
<map name="queries">
<property name="getSms"
value="select outid, body, sender, address, mfo, account, taxCd from
out_table />
</map>
</properties>
</connector>
Writing connector:
<connector name="jdbcSmsgateConnector"
className="org.mule.providers.jdbc.JdbcConnector">
<properties>
<container-property name="dataSource"
reference="nimiusEximgateDB" />
<map name="queries">
<property name="writeSms"
value="insert into out_messages (id , sender, address, subject, text,


external_id, destype, mfo, account, tax_cd) values (oum_seq.nextval,

${sender}, ${address}, ${subject}, ${text}, ${outId}, 'S', ${mfo},
${account}, ${taxCd})" />
</map>
</properties>
</connector>

Component:


<mule-descriptor name="DwhSMSLoader"

implementation="org.mule.components.simple.PassThroughComponent"
initialState="started">
<inbound-router>
<endpoint address="jdbc://getSms"
connector="jdbcDwhConnector"
synchronous="true"/>
</inbound-router>

<outbound-router>
<router

className="org.mule.routing.outbound.OutboundPassThroughRouter">
<endpoint address="jdbc://writeSms"

connector="jdbcSmsgateConnector" synchronous="false" />
</router>
</outbound-router>
<interceptor name="default" />
</mule-descriptor>

And the most strange part of the log:


SQL Code : 1400
Payload : {mfo=313979, text=Some text's here, don't want to
show it, contains digits and letters, account=9999999999, sender=dwh,

address=123456789, taxcd=000000000, outid=470980}


SQL State : 23000
********************************************************************************
Exception stack is:
1. ORA-01400: cannot insert NULL into ("EXIMGATE"."OUT_MESSAGES"."ADDRESS")
(SQL Code: 1400, SQL State: + 23000) (java.sql.SQLException)
oracle.jdbc.driver.SQLStateMapping:74
(http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html)
2. ORA-01400: cannot insert NULL into ("EXIMGATE"."OUT_MESSAGES"."ADDRESS")
Query: insert into out_messages (id , sender, address, subject, text,
external_id, destype, mfo, account, tax_cd) values (oum_seq.nextval, ?, ?,
?, ?, ?, 'S', ?, ?, ?) Parameters: [null, null, null, null, null, null,
null, null]

So it seems that there's something wrong with resolving variables in
connector.getParams, I suspect propertyExtractorCache: in different
scenarious I may need different property extractors to work with the same
parameters, is it prohibited?

Kind regards,
Dmitry
--
View this message in context: http://www.nabble.com/Message-content-temporary-disappears-tf4684058.html#a13400604

Dmitry

unread,
Oct 25, 2007, 3:44:53 AM10/25/07
to us...@mule.codehaus.org

OK, I found it! The issue was indeed in caching property extractors: the
first one becomes the only one for this parameter and all other messages are
processed by the same extractor, regardless of their nature. I suppose that
using query + param as a key for the cache is not clean enough.

Kind regards,
Dmitry
--
View this message in context: http://www.nabble.com/Message-content-temporary-disappears-tf4684058.html#a13401735

Andrew Perepelytsya

unread,
Oct 29, 2007, 3:19:49 PM10/29/07
to us...@mule.codehaus.org
Could you please file a JIRA for this?

Andrew
Reply all
Reply to author
Forward
0 new messages