You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by uday garikapati <ud...@gmail.com> on 2006/01/24 12:57:26 UTC

Groovy component error.

Hi All,

I am using ServiceMix 2.1 SNAPSHOT version under linux.
I have an esb configuration file in it i am using FilePoller and Groovy and
FileWriter components.

The scenario is i am polling a particular directory and then i am storing it
on a location and then
passing to another component and then to Groovy component and then writing
to some location.

when the navigation is passed immediately after poller to Groovy component
and then to remote location
is working fine. but when i change the navigation after polling to two other
components and then to Groovy
then it is giving error for reading "inMessage.bodyText" .
i am reading the xml file which is coming to Groovy component via above
property.

The exception is

Caused by: groovy.lang.GroovyRuntimeException: Cannot read property:
bodyText
        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
        at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java:726)
        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
InvokerHelper.java:194)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
ScriptBytecodeAdapter.java:274)
        at Script1.run(Unknown Source)
        at com.sun.script.groovy.GroovyScriptEngine.eval(
GroovyScriptEngine.java:118)
        ... 71 more

 when i read like this "inMessage.toString()" and displaying to console it
is howing this :

  org.servicemix.jbi.messaging.NormalizedMessageImpl@efe27b{properties: {
org.servicemix.file.name=ftp://userme:pwdme@193.186.7.112/xyz/abc/12345.xml,
org.servicemix.content.document=[#document: null]}}

here if we observe "org.servicemix.content.document=[#document: null]}"
document is null.

Is this the problem ? anybody help..

how can i get the content of the file ?

Thanks,
uday garikapati




when i am using "inMessage.bodyText" property it is giving some errors.

Re: Groovy component error.

Posted by Guillaume Nodet <gu...@worldonline.fr>.
If you could set up a small test showing the problem, i may be able to 
help you.
I do not see why it does not work and groovy does not say why it can not 
read the property :(

Cheers,
Guillaume Nodet

uday garikapati wrote:

>Guillaume,
>
>i have checked it earlier. to give the output to tracer component and it is
>showing the
>whole xmlfile in the console. that shows, the component is emitting correct
>xml o/p.
>
>Thanks,
>uday
>
>On 1/24/06, Guillaume Nodet <gu...@worldonline.fr> wrote:
>  
>
>>You should check that the incoming message has a valid xml content, as
>>the bodyText property transforms the xml content to a string.
>>You may try replacing it with the
>>org.apache.servicemix.components.util.TraceComponent to see what
>>happens, or using the
>>EchoComponent in between.
>>
>>Cheers,
>>Guillaume Nodet
>>
>>uday garikapati wrote:
>>
>>    
>>
>>>Guillaume,
>>>
>>>Thanks for the response. i am attaching esb and stacktrace files.
>>>
>>>when the flow is moving from "foo:resXMLDBWriter" to
>>>"foo:priOraDBWriter", the error
>>>is coming up. If it is directly wired to poller component it is
>>>working fine.
>>>
>>>Here let me put some information about the behaviour of the other
>>>components
>>>which are wired in the esb-config.
>>>
>>>All the components like XMLDBWriter component etc are similar to the
>>>FileWriter component ,
>>> but the diff is that they pushes back a message to the esb.
>>>
>>>Thanks,
>>>uday garikapati
>>>
>>>On 1/24/06, *Guillaume Nodet* <guillaume.nodet@worldonline.fr
>>><ma...@worldonline.fr>> wrote:
>>>
>>>    Could you please post the full stack trace and configuration file
>>>    please ?
>>>    I doubt the '[#document: null]' means that there is no document (I
>>>    always see that kind of string when debugging).
>>>
>>>    Cheers,
>>>    Guillaume Nodet
>>>
>>>
>>>    uday garikapati wrote:
>>>
>>>    >Hi All,
>>>    >
>>>    >I am using ServiceMix 2.1 SNAPSHOT version under linux.
>>>    >I have an esb configuration file in it i am using FilePoller and
>>>    Groovy and
>>>    >FileWriter components.
>>>    >
>>>    >The scenario is i am polling a particular directory and then i am
>>>    storing it
>>>    >on a location and then
>>>    >passing to another component and then to Groovy component and
>>>    then writing
>>>    >to some location.
>>>    >
>>>    >when the navigation is passed immediately after poller to Groovy
>>>    component
>>>    >and then to remote location
>>>    >is working fine. but when i change the navigation after polling
>>>    to two other
>>>    >components and then to Groovy
>>>    >then it is giving error for reading "inMessage.bodyText" .
>>>    >i am reading the xml file which is coming to Groovy component via
>>>    above
>>>    >property.
>>>    >
>>>    >The exception is
>>>    >
>>>    >Caused by: groovy.lang.GroovyRuntimeException: Cannot read
>>>      
>>>
>>property:
>>    
>>
>>>    >bodyText
>>>    >        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
>>>    >        at
>>>    org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java :726)
>>>    >        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
>>>    >InvokerHelper.java:194)
>>>    >        at
>>>    org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
>>>    >ScriptBytecodeAdapter.java :274)
>>>    >        at Script1.run(Unknown Source)
>>>    >        at com.sun.script.groovy.GroovyScriptEngine.eval(
>>>    >GroovyScriptEngine.java:118)
>>>    >        ... 71 more
>>>    >
>>>    > when i read like this " inMessage.toString()" and displaying to
>>>    console it
>>>    >is howing this :
>>>    >
>>>    >
>>>      
>>>
>>org.servicemix.jbi.messaging.NormalizedMessageImpl@efe27b{properties:
>>    
>>
>>>    {
>>>    >org.servicemix.file.name=ftp://userme:pwdme@193.186.7.112
>>>    /xyz/abc/12345.xml,
>>>    >org.servicemix.content.document=[#document: null]}}
>>>    >
>>>    >here if we observe "org.servicemix.content.document=[#document:
>>>    null]}"
>>>    >document is null.
>>>    >
>>>    >Is this the problem ? anybody help..
>>>    >
>>>    >how can i get the content of the file ?
>>>    >
>>>    >Thanks,
>>>    >uday garikapati
>>>    >
>>>    >
>>>    >
>>>    >
>>>    >when i am using "inMessage.bodyText" property it is giving some
>>>    errors.
>>>    >
>>>    >
>>>    >
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>><?xml version="1.0" encoding="UTF-8"?>
>>><beans xmlns="http://xbean.org/schemas/spring/1.0"
>>>xmlns:spring="http://xbean.org/schemas/spring/1.0"
>>>xmlns:sm="http://servicemix.org/config/1.0"
>>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>xsi:schemaLocation="http://xbean.org/schemas/spring/1.0../../conf/spring-
>>>      
>>>
>>beans.xsd
>>    
>>
>>>                          http://servicemix.org/config/1.0../../conf/servicemix.xsd"
>>>xmlns:foo="http://garikapati.com/">
>>>
>>><!-- the JBI container
>>> * The attribute flowName="st" makes the esb config to use single thread
>>>      
>>>
>>model.
>>    
>>
>>>-->
>>><sm:container spring:id="jbi" useMBeanServer="true"
>>> createMBeanServer="true" dumpStats="true"
>>>      
>>>
>>statsInterval="10"  rmiPort="9099" flowName="st">
>>    
>>
>>> <sm:activationSpecs>
>>>
>>>  <!-- ==================== COMMON ========================== -->
>>>  <!-- Route the event to a tracer component that just outputs the event
>>>      
>>>
>>to the console -->
>>    
>>
>>>  <sm:activationSpec componentName="tracer" service="foo:tracer">
>>>   <sm:component>
>>>    <bean xmlns="http://xbean.org/schemas/spring/1.0"
>>>     class="org.servicemix.components.util.StreamWriterComponent" />
>>>   </sm:component>
>>>  </sm:activationSpec>
>>>
>>>  <!-- ======================= INBOUND ============================ -->
>>>
>>>  <!-- Look for files in the inbox directory -->
>>>   <sm:activationSpec componentName="filePoller"
>>>      
>>>
>>service="foo:filePoller" destinationService="foo:inInvTReceiptFileArchiver">
>>    
>>
>>>   <sm:component>
>>>   <bean xmlns="http://xbean.org/schemas/spring/1.0"
>>>   class="org.servicemix.components.vfs.FilePoller">
>>>   <property name="path" value="
>>>      
>>>
>>ftp://myuser:myself@193.186.79.17/home/uday/teststore"/>
>>    
>>
>>>   <property name="period" value="1000"/>
>>>   <property name="deleteFile" value="true"/>
>>>   <property name="workManager" ref="workManager"/>
>>>   </bean>
>>>   </sm:component>
>>>   </sm:activationSpec>
>>>
>>>  <sm:activationSpec componentName="inInvTReceiptFileArchiver"
>>>      
>>>
>>service="foo:inInvTReceiptFileArchiver"
>>    
>>
>>>   destinationService="foo:resXMLDBWriter">
>>>   <sm:component>
>>>    <bean xmlns="http://xbean.org/schemas/spring/1.0"  class="
>>>      
>>>
>>com.uday.esb.XtVfsFileWriter">
>>    
>>
>>>        <property name="path" value="
>>>      
>>>
>>ftp://svanamala:abc.123@193.186.79.2/uday/softwares/esb_archive/SATDHLITI/Response
>>"/>
>>    
>>
>>>                <property name="marshaler">
>>>                    <bean class="
>>>      
>>>
>>org.servicemix.components.util.DefaultFileMarshaler">
>>    
>>
>>>                             <property name="fileName">
>>>                                       <bean class="
>>>      
>>>
>>org.servicemix.expression.JaxenStringXPathExpression">
>>    
>>
>>>                                                   <constructor-arg
>>>      
>>>
>>value="concat(/ALS/ALSHEADER/FILEID,'.xml')" />
>>    
>>
>>>                                       </bean>
>>>                              </property>
>>>                    </bean>
>>>          </property>
>>>        </bean>
>>>   </sm:component>
>>>  </sm:activationSpec>
>>>
>>>  <sm:activationSpec componentName="resXMLDBWriter"
>>>      
>>>
>>service="foo:resXMLDBWriter" destinationService="foo:priOraDBWriter">
>>    
>>
>>>   <sm:component>
>>>    <bean xmlns="http://xbean.org/schemas/spring/1.0" class="
>>>      
>>>
>>com.uday.esb.XMLDBWriter">
>>    
>>
>>>     <property name="driver" value="org.exist.xmldb.DatabaseImpl" />
>>>     <property name="xdburi"
>>>      
>>>
>>value="xmldb:exist://193.186.79.17:8080/exist/xmlrpc/db/" />
>>    
>>
>>>     <property name="username" value="admin" />
>>>     <property name="password" value="" />
>>>     <property name="collection">
>>>      <bean class="org.servicemix.expression.JaxenStringXPathExpression
>>>      
>>>
>>">
>>    
>>
>>>       <constructor-arg
>>>      
>>>
>>value="concat(substring-before(/ALSResponse/DocHeader/ClientDocID,'.'),'/Response')"
>>/>
>>    
>>
>>>      </bean>
>>>     </property>
>>>     <property name="marshaler">
>>>      <bean class="org.servicemix.components.util.DefaultFileMarshaler">
>>>       <property name="fileName">
>>>        <bean class="
>>>      
>>>
>>org.servicemix.expression.JaxenStringXPathExpression">
>>    
>>
>>>         <constructor-arg value="concat(/ALSResponse/DocHeader/ALSDocID,
>>>      
>>>
>>'.xml')" />
>>    
>>
>>>        </bean>
>>>       </property>
>>>      </bean>
>>>     </property>
>>>    </bean>
>>>   </sm:component>
>>>  </sm:activationSpec>
>>>
>>>   <sm:activationSpec componentName="priOraDBWriter"
>>>   service="foo:priOraDBWriter" destinationService="foo:tracer">
>>>   <sm:component>
>>>    <bean xmlns="http://xbean.org/schemas/spring/1.0"
>>>     class="org.servicemix.components.groovy.GroovyComponent">
>>>     <property name="scriptText">
>>>      <value>
>>>       <![CDATA[
>>>                              import groovy.sql.Sql
>>>                              import java.io.*
>>>                              import java.util.*
>>>                              import java.sql.*
>>>                              import java.text.*
>>>                              import org.dom4j.Document;
>>>                              import org.dom4j.DocumentException;
>>>                              import org.dom4j.Node;
>>>                              import org.dom4j.io.SAXReader;
>>>
>>>                              println "Called with inbound message
>>>      
>>>
>>$inMessage"
>>    
>>
>>>                              def sql = Sql.newInstance("
>>>      
>>>
>>jdbc:oracle:thin:@193.186.179.15:1521:madhu", "scott", "tiger", "
>>oracle.jdbc.driver.OracleDriver")
>>    
>>
>>>                              def tempMsg = inMessage.bodyText
>>>                              Document document = reader.read(new
>>>      
>>>
>>StringReader(tempMsg))
>>    
>>
>>>                              def reader = new SAXReader();
>>>                              Document document = reader.read(new
>>>      
>>>
>>StringReader(tempMsg))
>>    
>>
>>>                              List arList = document.selectNodes
>>>      
>>>
>>("/ALS/INVTRANS/ITEMTRANS")
>>    
>>
>>>                              for(obj in arList)
>>>                              {
>>>                                      Node node = (Node) obj;
>>>                                      cliOrdNum = node.selectSingleNode
>>>      
>>>
>>("CLIENTORDERNUMBER").getStringValue();
>>    
>>
>>>                                      if(cliOrdNum.contains("_"))
>>>                                      {
>>>                                              warehouse =
>>>      
>>>
>>node.selectSingleNode("WAREHOUSE").getStringValue();
>>    
>>
>>>                                              transactiondate =
>>>      
>>>
>>node.selectSingleNode("TRANSACTIONDATE").getStringValue();
>>    
>>
>>>                                              quantity =
>>>      
>>>
>>node.selectSingleNode("QUANTITY").getStringValue();
>>    
>>
>>>                                              itemnumber =
>>>      
>>>
>>node.selectSingleNode("ITEMNUMBER").getStringValue();
>>    
>>
>>>                                              cliLineNum =
>>>      
>>>
>>node.selectSingleNode("CLIENTLINENUMBER").getStringValue();
>>    
>>
>>>                                              docNum =
>>>      
>>>
>>cliOrdNum.substring(0,cliOrdNum.indexOf("_"));
>>    
>>
>>>                                              poRevNum =
>>>      
>>>
>>cliOrdNum.substring(cliOrdNum.indexOf("_")+1,cliOrdNum.length());
>>    
>>
>>>                                              def shipmentNum =
>>>      
>>>
>>"fooDHLPRI"+new Date().getTime()
>>    
>>
>>>                                              if(warehouse == 'AOV')
>>>                                              {
>>>                                                      warehouse = 'NYM'
>>>                                              }
>>>
>>>
>>>                                              def headersSql =
>>>      
>>>
>>sql.executeUpdate("insert into RCV_HEADERS_INTERFACE
>>(HEADER_INTERFACE_ID,RECEIPT_SOURCE_CODE,ASN_TYPE,TRANSACTION_TYPE,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN,SHIPMENT_NUM,RECEIPT_NUM,SHIP_TO_ORGANIZATION_CODE)
>>values(rcv_headers_interface_s.nextval,'VENDOR','RECEIVE','NEW',sysdate,-1,sysdate,-1,-1,${shipmentNum},${shipmentNum},${warehouse})")
>>    
>>
>>>                                              println "${headersSql} no
>>>      
>>>
>>of rows Inserted...........................in RCV_HEADERS_INTERFACE
>>.........."
>>    
>>
>>>                                      }
>>>                              }
>>>
>>>
>>>
>>>
>>>
>>>                              // lets output some message properties
>>>                              outMessage.properties = [foo:"hello",
>>>      
>>>
>>someList:[1, 2, 3]]
>>    
>>
>>>                              // lets output some non-xml body
>>>                              outMessage.bodyText = """
>>>                              <requestId></requestId>
>>>                              """
>>>                      ]]>
>>>      </value>
>>>     </property>
>>>    </bean>
>>>   </sm:component>
>>>  </sm:activationSpec>
>>>
>>> </sm:activationSpecs>
>>>
>>></sm:container>
>>>
>>><bean id="xdbConDetails" class="com.sirvisetti.esb.XDBConnectionDetails
>>>      
>>>
>>">
>>    
>>
>>>      <property name="driver" value="org.exist.xmldb.DatabaseImpl" />
>>>      <property name="xdburi"
>>>      
>>>
>>value="xmldb:exist://193.186.79.17:8080/exist/xmlrpc/db/"/>
>>    
>>
>>>      <property name="username" value="admin" />
>>>      <property name="password" value="" />
>>></bean>
>>>
>>><!-- the work manager (thread pool) for this container -->
>>><bean id="workManager"
>>> class="org.jencks.factory.WorkManagerFactoryBean">
>>> <property name="threadPoolSize" value="1" />
>>></bean>
>>>
>>>
>>></beans>
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>
>>>Called with inbound message
>>>      
>>>
>>org.servicemix.jbi.messaging.NormalizedMessageImpl@1b9da92{properties: {
>>org.servicemix.file.name=ftp://svanamala:abc.123@193.186.79.2/uday/work/smftp/archive/SATDHLITI/Response/12345.xml,
>>org.servicemix.content.document=[#document: null]}}
>>    
>>
>>>Caught: javax.script.ScriptException
>>>javax.script.ScriptException
>>>       at com.sun.script.groovy.GroovyScriptEngine.eval(
>>>      
>>>
>>GroovyScriptEngine.java:121)
>>    
>>
>>>       at com.sun.script.groovy.GroovyCompiledScript.eval(
>>>      
>>>
>>GroovyCompiledScript.java:23)
>>    
>>
>>>       at javax.script.CompiledScript.eval(CompiledScript.java:72)
>>>       at org.servicemix.components.script.ScriptComponent.runScript(
>>>      
>>>
>>ScriptComponent.java:281)
>>    
>>
>>>       at org.servicemix.components.script.ScriptComponent.process(
>>>      
>>>
>>ScriptComponent.java:223)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.components.script.ScriptComponent.onMessageExchange(
>>ScriptComponent.java:102)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:423)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:400)
>>    
>>
>>>       at com.sirvisetti.esb.XMLDBWriter.syncBackToEsb(XMLDBWriter.java
>>>      
>>>
>>:196)
>>    
>>
>>>       at com.sirvisetti.esb.XMLDBWriter.process(XMLDBWriter.java:130)
>>>       at org.servicemix.components.util.OutBinding.onMessageExchange(
>>>      
>>>
>>OutBinding.java:51)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:423)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:400)
>>    
>>
>>>       at com.sirvisetti.esb.MessageLogger.syncBackToEsb(
>>>      
>>>
>>MessageLogger.java:253)
>>    
>>
>>>       at com.sirvisetti.esb.MessageLogger.process(MessageLogger.java
>>>      
>>>
>>:181)
>>    
>>
>>>       at org.servicemix.components.util.OutBinding.onMessageExchange(
>>>      
>>>
>>OutBinding.java:51)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:423)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:400)
>>    
>>
>>>       at com.sirvisetti.esb.VfsFileWriter.processFile(
>>>      
>>>
>>VfsFileWriter.java:194)
>>    
>>
>>>       at com.sirvisetti.esb.VfsFileWriter.process(VfsFileWriter.java
>>>      
>>>
>>:134)
>>    
>>
>>>       at org.servicemix.components.util.OutBinding.onMessageExchange(
>>>      
>>>
>>OutBinding.java:51)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.send(
>>>      
>>>
>>DeliveryChannelImpl.java:389)
>>    
>>
>>>       at org.servicemix.components.util.PojoSupport.send(
>>>      
>>>
>>PojoSupport.java:213)
>>    
>>
>>>       at org.servicemix.components.xslt.XalanExtension.invoke(
>>>      
>>>
>>XalanExtension.java:111)
>>    
>>
>>>       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.xalan.extensions.ExtensionHandlerJavaClass.processElement(
>>ExtensionHandlerJavaClass.java:515)
>>    
>>
>>>       at org.apache.xalan.templates.ElemExtensionCall.execute(
>>>      
>>>
>>ElemExtensionCall.java:232)
>>    
>>
>>>       at
>>>      
>>>
>>org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(
>>TransformerImpl.java:2411)
>>    
>>
>>>       at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java
>>>      
>>>
>>:126)
>>    
>>
>>>       at
>>>      
>>>
>>org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(
>>TransformerImpl.java:2411)
>>    
>>
>>>       at
>>>      
>>>
>>org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(
>>TransformerImpl.java:2281)
>>    
>>
>>>       at org.apache.xalan.transformer.TransformerImpl.transformNode(
>>>      
>>>
>>TransformerImpl.java:1367)
>>    
>>
>>>       at org.apache.xalan.transformer.TransformerImpl.transform(
>>>      
>>>
>>TransformerImpl.java:709)
>>    
>>
>>>       at org.apache.xalan.transformer.TransformerImpl.transform(
>>>      
>>>
>>TransformerImpl.java:1284)
>>    
>>
>>>       at org.apache.xalan.transformer.TransformerImpl.transform(
>>>      
>>>
>>TransformerImpl.java:1262)
>>    
>>
>>>       at org.servicemix.components.xslt.XsltComponent.transformContent(
>>>      
>>>
>>XsltComponent.java:135)
>>    
>>
>>>       at org.servicemix.components.xslt.XsltComponent.transform(
>>>      
>>>
>>XsltComponent.java:119)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.components.util.TransformComponentSupport.onMessageExchange
>>(TransformComponentSupport.java:47)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:423)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:400)
>>    
>>
>>>       at org.servicemix.components.vfs.FilePoller.processFile(
>>>      
>>>
>>FilePoller.java:187)
>>    
>>
>>>       at org.servicemix.components.vfs.FilePoller.processFileAndDelete(
>>>      
>>>
>>FilePoller.java:158)
>>    
>>
>>>       at org.servicemix.components.vfs.FilePoller$1.run(FilePoller.java
>>>      
>>>
>>:74)
>>    
>>
>>>       at org.apache.geronimo.connector.work.WorkerContext.run(
>>>      
>>>
>>WorkerContext.java:291)
>>    
>>
>>>       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>>>      
>>>
>>Source)
>>    
>>
>>>       at java.lang.Thread.run(Thread.java:595)
>>>Caused by: groovy.lang.GroovyRuntimeException: Cannot read property:
>>>      
>>>
>>bodyText
>>    
>>
>>>       at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
>>>       at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java
>>>      
>>>
>>:726)
>>    
>>
>>>       at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
>>>      
>>>
>>InvokerHelper.java:194)
>>    
>>
>>>       at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
>>>      
>>>
>>ScriptBytecodeAdapter.java:274)
>>    
>>
>>>       at Script1.run(Unknown Source)
>>>       at com.sun.script.groovy.GroovyScriptEngine.eval(
>>>      
>>>
>>GroovyScriptEngine.java:118)
>>    
>>
>>>       ... 83 more
>>>javax.jbi.messaging.MessagingException: Failed to run compiledScript.
>>>      
>>>
>>Reason: javax.script.ScriptException
>>    
>>
>>>       at org.servicemix.components.script.ScriptComponent.process(
>>>      
>>>
>>ScriptComponent.java:238)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.components.script.ScriptComponent.onMessageExchange(
>>ScriptComponent.java:102)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:423)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:400)
>>    
>>
>>>       at com.sirvisetti.esb.XMLDBWriter.syncBackToEsb(XMLDBWriter.java
>>>      
>>>
>>:196)
>>    
>>
>>>       at com.sirvisetti.esb.XMLDBWriter.process(XMLDBWriter.java:130)
>>>       at org.servicemix.components.util.OutBinding.onMessageExchange(
>>>      
>>>
>>OutBinding.java:51)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:423)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:400)
>>    
>>
>>>       at com.sirvisetti.esb.MessageLogger.syncBackToEsb(
>>>      
>>>
>>MessageLogger.java:253)
>>    
>>
>>>       at com.sirvisetti.esb.MessageLogger.process(MessageLogger.java
>>>      
>>>
>>:181)
>>    
>>
>>>       at org.servicemix.components.util.OutBinding.onMessageExchange(
>>>      
>>>
>>OutBinding.java:51)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:423)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:400)
>>    
>>
>>>       at com.sirvisetti.esb.VfsFileWriter.processFile(
>>>      
>>>
>>VfsFileWriter.java:194)
>>    
>>
>>>       at com.sirvisetti.esb.VfsFileWriter.process(VfsFileWriter.java
>>>      
>>>
>>:134)
>>    
>>
>>>       at org.servicemix.components.util.OutBinding.onMessageExchange(
>>>      
>>>
>>OutBinding.java:51)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.send(
>>>      
>>>
>>DeliveryChannelImpl.java:389)
>>    
>>
>>>       at org.servicemix.components.util.PojoSupport.send(
>>>      
>>>
>>PojoSupport.java:213)
>>    
>>
>>>       at org.servicemix.components.xslt.XalanExtension.invoke(
>>>      
>>>
>>XalanExtension.java:111)
>>    
>>
>>>       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.xalan.extensions.ExtensionHandlerJavaClass.processElement(
>>ExtensionHandlerJavaClass.java:515)
>>    
>>
>>>       at org.apache.xalan.templates.ElemExtensionCall.execute(
>>>      
>>>
>>ElemExtensionCall.java:232)
>>    
>>
>>>       at
>>>      
>>>
>>org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(
>>TransformerImpl.java:2411)
>>    
>>
>>>       at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java
>>>      
>>>
>>:126)
>>    
>>
>>>       at
>>>      
>>>
>>org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(
>>TransformerImpl.java:2411)
>>    
>>
>>>       at
>>>      
>>>
>>org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(
>>TransformerImpl.java:2281)
>>    
>>
>>>       at org.apache.xalan.transformer.TransformerImpl.transformNode(
>>>      
>>>
>>TransformerImpl.java:1367)
>>    
>>
>>>       at org.apache.xalan.transformer.TransformerImpl.transform(
>>>      
>>>
>>TransformerImpl.java:709)
>>    
>>
>>>       at org.apache.xalan.transformer.TransformerImpl.transform(
>>>      
>>>
>>TransformerImpl.java:1284)
>>    
>>
>>>       at org.apache.xalan.transformer.TransformerImpl.transform(
>>>      
>>>
>>TransformerImpl.java:1262)
>>    
>>
>>>       at org.servicemix.components.xslt.XsltComponent.transformContent(
>>>      
>>>
>>XsltComponent.java:135)
>>    
>>
>>>       at org.servicemix.components.xslt.XsltComponent.transform(
>>>      
>>>
>>XsltComponent.java:119)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.components.util.TransformComponentSupport.onMessageExchange
>>(TransformComponentSupport.java:47)
>>    
>>
>>>       at
>>>      
>>>
>>org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
>>DeliveryChannelImpl.java:590)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
>>>      
>>>
>>AbstractFlow.java:182)
>>    
>>
>>>       at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>>>       at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
>>>      
>>>
>>AbstractFlow.java:124)
>>    
>>
>>>       at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
>>>      
>>>
>>:289)
>>    
>>
>>>       at org.servicemix.jbi.container.JBIContainer.sendExchange(
>>>      
>>>
>>JBIContainer.java:590)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
>>>      
>>>
>>DeliveryChannelImpl.java:349)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:423)
>>    
>>
>>>       at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
>>>      
>>>
>>DeliveryChannelImpl.java:400)
>>    
>>
>>>       at org.servicemix.components.vfs.FilePoller.processFile(
>>>      
>>>
>>FilePoller.java:187)
>>    
>>
>>>       at org.servicemix.components.vfs.FilePoller.processFileAndDelete(
>>>      
>>>
>>FilePoller.java:158)
>>    
>>
>>>       at org.servicemix.components.vfs.FilePoller$1.run(FilePoller.java
>>>      
>>>
>>:74)
>>    
>>
>>>       at org.apache.geronimo.connector.work.WorkerContext.run(
>>>      
>>>
>>WorkerContext.java:291)
>>    
>>
>>>       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>>>      
>>>
>>Source)
>>    
>>
>>>       at java.lang.Thread.run(Thread.java:595)
>>>Caused by: javax.script.ScriptException
>>>       at com.sun.script.groovy.GroovyScriptEngine.eval(
>>>      
>>>
>>GroovyScriptEngine.java:121)
>>    
>>
>>>       at com.sun.script.groovy.GroovyCompiledScript.eval(
>>>      
>>>
>>GroovyCompiledScript.java:23)
>>    
>>
>>>       at javax.script.CompiledScript.eval(CompiledScript.java:72)
>>>       at org.servicemix.components.script.ScriptComponent.runScript(
>>>      
>>>
>>ScriptComponent.java:281)
>>    
>>
>>>       at org.servicemix.components.script.ScriptComponent.process(
>>>      
>>>
>>ScriptComponent.java:223)
>>    
>>
>>>       ... 79 more
>>>Caused by: groovy.lang.GroovyRuntimeException: Cannot read property:
>>>      
>>>
>>bodyText
>>    
>>
>>>       at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
>>>       at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java
>>>      
>>>
>>:726)
>>    
>>
>>>       at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
>>>      
>>>
>>InvokerHelper.java:194)
>>    
>>
>>>       at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
>>>      
>>>
>>ScriptBytecodeAdapter.java:274)
>>    
>>
>>>       at Script1.run(Unknown Source)
>>>       at com.sun.script.groovy.GroovyScriptEngine.eval(
>>>      
>>>
>>GroovyScriptEngine.java:118)
>>    
>>
>>>       ... 83 more
>>>
>>>
>>>      
>>>
>>    
>>
>
>  
>


Re: Groovy component error.

Posted by uday garikapati <ud...@gmail.com>.
Guillaume,

i have checked it earlier. to give the output to tracer component and it is
showing the
whole xmlfile in the console. that shows, the component is emitting correct
xml o/p.

Thanks,
uday

On 1/24/06, Guillaume Nodet <gu...@worldonline.fr> wrote:
>
> You should check that the incoming message has a valid xml content, as
> the bodyText property transforms the xml content to a string.
> You may try replacing it with the
> org.apache.servicemix.components.util.TraceComponent to see what
> happens, or using the
> EchoComponent in between.
>
> Cheers,
> Guillaume Nodet
>
> uday garikapati wrote:
>
> > Guillaume,
> >
> > Thanks for the response. i am attaching esb and stacktrace files.
> >
> > when the flow is moving from "foo:resXMLDBWriter" to
> > "foo:priOraDBWriter", the error
> > is coming up. If it is directly wired to poller component it is
> > working fine.
> >
> > Here let me put some information about the behaviour of the other
> > components
> > which are wired in the esb-config.
> >
> > All the components like XMLDBWriter component etc are similar to the
> > FileWriter component ,
> >  but the diff is that they pushes back a message to the esb.
> >
> > Thanks,
> > uday garikapati
> >
> > On 1/24/06, *Guillaume Nodet* <guillaume.nodet@worldonline.fr
> > <ma...@worldonline.fr>> wrote:
> >
> >     Could you please post the full stack trace and configuration file
> >     please ?
> >     I doubt the '[#document: null]' means that there is no document (I
> >     always see that kind of string when debugging).
> >
> >     Cheers,
> >     Guillaume Nodet
> >
> >
> >     uday garikapati wrote:
> >
> >     >Hi All,
> >     >
> >     >I am using ServiceMix 2.1 SNAPSHOT version under linux.
> >     >I have an esb configuration file in it i am using FilePoller and
> >     Groovy and
> >     >FileWriter components.
> >     >
> >     >The scenario is i am polling a particular directory and then i am
> >     storing it
> >     >on a location and then
> >     >passing to another component and then to Groovy component and
> >     then writing
> >     >to some location.
> >     >
> >     >when the navigation is passed immediately after poller to Groovy
> >     component
> >     >and then to remote location
> >     >is working fine. but when i change the navigation after polling
> >     to two other
> >     >components and then to Groovy
> >     >then it is giving error for reading "inMessage.bodyText" .
> >     >i am reading the xml file which is coming to Groovy component via
> >     above
> >     >property.
> >     >
> >     >The exception is
> >     >
> >     >Caused by: groovy.lang.GroovyRuntimeException: Cannot read
> property:
> >     >bodyText
> >     >        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
> >     >        at
> >     org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java :726)
> >     >        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
> >     >InvokerHelper.java:194)
> >     >        at
> >     org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
> >     >ScriptBytecodeAdapter.java :274)
> >     >        at Script1.run(Unknown Source)
> >     >        at com.sun.script.groovy.GroovyScriptEngine.eval(
> >     >GroovyScriptEngine.java:118)
> >     >        ... 71 more
> >     >
> >     > when i read like this " inMessage.toString()" and displaying to
> >     console it
> >     >is howing this :
> >     >
> >     >
> org.servicemix.jbi.messaging.NormalizedMessageImpl@efe27b{properties:
> >     {
> >     >org.servicemix.file.name=ftp://userme:pwdme@193.186.7.112
> >     /xyz/abc/12345.xml,
> >     >org.servicemix.content.document=[#document: null]}}
> >     >
> >     >here if we observe "org.servicemix.content.document=[#document:
> >     null]}"
> >     >document is null.
> >     >
> >     >Is this the problem ? anybody help..
> >     >
> >     >how can i get the content of the file ?
> >     >
> >     >Thanks,
> >     >uday garikapati
> >     >
> >     >
> >     >
> >     >
> >     >when i am using "inMessage.bodyText" property it is giving some
> >     errors.
> >     >
> >     >
> >     >
> >
> >
> >------------------------------------------------------------------------
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><beans xmlns="http://xbean.org/schemas/spring/1.0"
> > xmlns:spring="http://xbean.org/schemas/spring/1.0"
> > xmlns:sm="http://servicemix.org/config/1.0"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://xbean.org/schemas/spring/1.0../../conf/spring-
> beans.xsd
> >                           http://servicemix.org/config/1.0../../conf/servicemix.xsd"
> > xmlns:foo="http://garikapati.com/">
> >
> > <!-- the JBI container
> >  * The attribute flowName="st" makes the esb config to use single thread
> model.
> > -->
> > <sm:container spring:id="jbi" useMBeanServer="true"
> >  createMBeanServer="true" dumpStats="true"
> statsInterval="10"  rmiPort="9099" flowName="st">
> >
> >  <sm:activationSpecs>
> >
> >   <!-- ==================== COMMON ========================== -->
> >   <!-- Route the event to a tracer component that just outputs the event
> to the console -->
> >   <sm:activationSpec componentName="tracer" service="foo:tracer">
> >    <sm:component>
> >     <bean xmlns="http://xbean.org/schemas/spring/1.0"
> >      class="org.servicemix.components.util.StreamWriterComponent" />
> >    </sm:component>
> >   </sm:activationSpec>
> >
> >   <!-- ======================= INBOUND ============================ -->
> >
> >   <!-- Look for files in the inbox directory -->
> >    <sm:activationSpec componentName="filePoller"
> service="foo:filePoller" destinationService="foo:inInvTReceiptFileArchiver">
> >    <sm:component>
> >    <bean xmlns="http://xbean.org/schemas/spring/1.0"
> >    class="org.servicemix.components.vfs.FilePoller">
> >    <property name="path" value="
> ftp://myuser:myself@193.186.79.17/home/uday/teststore"/>
> >    <property name="period" value="1000"/>
> >    <property name="deleteFile" value="true"/>
> >    <property name="workManager" ref="workManager"/>
> >    </bean>
> >    </sm:component>
> >    </sm:activationSpec>
> >
> >   <sm:activationSpec componentName="inInvTReceiptFileArchiver"
> service="foo:inInvTReceiptFileArchiver"
> >    destinationService="foo:resXMLDBWriter">
> >    <sm:component>
> >     <bean xmlns="http://xbean.org/schemas/spring/1.0"  class="
> com.uday.esb.XtVfsFileWriter">
> >         <property name="path" value="
> ftp://svanamala:abc.123@193.186.79.2/uday/softwares/esb_archive/SATDHLITI/Response
> "/>
> >                 <property name="marshaler">
> >                     <bean class="
> org.servicemix.components.util.DefaultFileMarshaler">
> >                              <property name="fileName">
> >                                        <bean class="
> org.servicemix.expression.JaxenStringXPathExpression">
> >                                                    <constructor-arg
> value="concat(/ALS/ALSHEADER/FILEID,'.xml')" />
> >                                        </bean>
> >                               </property>
> >                     </bean>
> >           </property>
> >         </bean>
> >    </sm:component>
> >   </sm:activationSpec>
> >
> >   <sm:activationSpec componentName="resXMLDBWriter"
> service="foo:resXMLDBWriter" destinationService="foo:priOraDBWriter">
> >    <sm:component>
> >     <bean xmlns="http://xbean.org/schemas/spring/1.0" class="
> com.uday.esb.XMLDBWriter">
> >      <property name="driver" value="org.exist.xmldb.DatabaseImpl" />
> >      <property name="xdburi"
> value="xmldb:exist://193.186.79.17:8080/exist/xmlrpc/db/" />
> >      <property name="username" value="admin" />
> >      <property name="password" value="" />
> >      <property name="collection">
> >       <bean class="org.servicemix.expression.JaxenStringXPathExpression
> ">
> >        <constructor-arg
> value="concat(substring-before(/ALSResponse/DocHeader/ClientDocID,'.'),'/Response')"
> />
> >       </bean>
> >      </property>
> >      <property name="marshaler">
> >       <bean class="org.servicemix.components.util.DefaultFileMarshaler">
> >        <property name="fileName">
> >         <bean class="
> org.servicemix.expression.JaxenStringXPathExpression">
> >          <constructor-arg value="concat(/ALSResponse/DocHeader/ALSDocID,
> '.xml')" />
> >         </bean>
> >        </property>
> >       </bean>
> >      </property>
> >     </bean>
> >    </sm:component>
> >   </sm:activationSpec>
> >
> >    <sm:activationSpec componentName="priOraDBWriter"
> >    service="foo:priOraDBWriter" destinationService="foo:tracer">
> >    <sm:component>
> >     <bean xmlns="http://xbean.org/schemas/spring/1.0"
> >      class="org.servicemix.components.groovy.GroovyComponent">
> >      <property name="scriptText">
> >       <value>
> >        <![CDATA[
> >                               import groovy.sql.Sql
> >                               import java.io.*
> >                               import java.util.*
> >                               import java.sql.*
> >                               import java.text.*
> >                               import org.dom4j.Document;
> >                               import org.dom4j.DocumentException;
> >                               import org.dom4j.Node;
> >                               import org.dom4j.io.SAXReader;
> >
> >                               println "Called with inbound message
> $inMessage"
> >
> >                               def sql = Sql.newInstance("
> jdbc:oracle:thin:@193.186.179.15:1521:madhu", "scott", "tiger", "
> oracle.jdbc.driver.OracleDriver")
> >
> >                               def tempMsg = inMessage.bodyText
> >                               Document document = reader.read(new
> StringReader(tempMsg))
> >
> >                               def reader = new SAXReader();
> >                               Document document = reader.read(new
> StringReader(tempMsg))
> >                               List arList = document.selectNodes
> ("/ALS/INVTRANS/ITEMTRANS")
> >
> >                               for(obj in arList)
> >                               {
> >                                       Node node = (Node) obj;
> >                                       cliOrdNum = node.selectSingleNode
> ("CLIENTORDERNUMBER").getStringValue();
> >
> >                                       if(cliOrdNum.contains("_"))
> >                                       {
> >                                               warehouse =
> node.selectSingleNode("WAREHOUSE").getStringValue();
> >                                               transactiondate =
> node.selectSingleNode("TRANSACTIONDATE").getStringValue();
> >                                               quantity =
> node.selectSingleNode("QUANTITY").getStringValue();
> >                                               itemnumber =
> node.selectSingleNode("ITEMNUMBER").getStringValue();
> >                                               cliLineNum =
> node.selectSingleNode("CLIENTLINENUMBER").getStringValue();
> >
> >                                               docNum =
> cliOrdNum.substring(0,cliOrdNum.indexOf("_"));
> >                                               poRevNum =
> cliOrdNum.substring(cliOrdNum.indexOf("_")+1,cliOrdNum.length());
> >                                               def shipmentNum =
> "fooDHLPRI"+new Date().getTime()
> >
> >                                               if(warehouse == 'AOV')
> >                                               {
> >                                                       warehouse = 'NYM'
> >                                               }
> >
> >
> >                                               def headersSql =
> sql.executeUpdate("insert into RCV_HEADERS_INTERFACE
> (HEADER_INTERFACE_ID,RECEIPT_SOURCE_CODE,ASN_TYPE,TRANSACTION_TYPE,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN,SHIPMENT_NUM,RECEIPT_NUM,SHIP_TO_ORGANIZATION_CODE)
> values(rcv_headers_interface_s.nextval,'VENDOR','RECEIVE','NEW',sysdate,-1,sysdate,-1,-1,${shipmentNum},${shipmentNum},${warehouse})")
> >
> >                                               println "${headersSql} no
> of rows Inserted...........................in RCV_HEADERS_INTERFACE
> .........."
> >
> >
> >                                       }
> >                               }
> >
> >
> >
> >
> >
> >                               // lets output some message properties
> >                               outMessage.properties = [foo:"hello",
> someList:[1, 2, 3]]
> >
> >                               // lets output some non-xml body
> >                               outMessage.bodyText = """
> >                               <requestId></requestId>
> >                               """
> >                       ]]>
> >       </value>
> >      </property>
> >     </bean>
> >    </sm:component>
> >   </sm:activationSpec>
> >
> >  </sm:activationSpecs>
> >
> > </sm:container>
> >
> > <bean id="xdbConDetails" class="com.sirvisetti.esb.XDBConnectionDetails
> ">
> >       <property name="driver" value="org.exist.xmldb.DatabaseImpl" />
> >       <property name="xdburi"
> value="xmldb:exist://193.186.79.17:8080/exist/xmlrpc/db/"/>
> >       <property name="username" value="admin" />
> >       <property name="password" value="" />
> > </bean>
> >
> > <!-- the work manager (thread pool) for this container -->
> > <bean id="workManager"
> >  class="org.jencks.factory.WorkManagerFactoryBean">
> >  <property name="threadPoolSize" value="1" />
> > </bean>
> >
> >
> ></beans>
> >
> >
> >------------------------------------------------------------------------
> >
> >
> >Called with inbound message
> org.servicemix.jbi.messaging.NormalizedMessageImpl@1b9da92{properties: {
> org.servicemix.file.name=ftp://svanamala:abc.123@193.186.79.2/uday/work/smftp/archive/SATDHLITI/Response/12345.xml,
> org.servicemix.content.document=[#document: null]}}
> >Caught: javax.script.ScriptException
> >javax.script.ScriptException
> >        at com.sun.script.groovy.GroovyScriptEngine.eval(
> GroovyScriptEngine.java:121)
> >        at com.sun.script.groovy.GroovyCompiledScript.eval(
> GroovyCompiledScript.java:23)
> >        at javax.script.CompiledScript.eval(CompiledScript.java:72)
> >        at org.servicemix.components.script.ScriptComponent.runScript(
> ScriptComponent.java:281)
> >        at org.servicemix.components.script.ScriptComponent.process(
> ScriptComponent.java:223)
> >        at
> org.servicemix.components.script.ScriptComponent.onMessageExchange(
> ScriptComponent.java:102)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:423)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:400)
> >        at com.sirvisetti.esb.XMLDBWriter.syncBackToEsb(XMLDBWriter.java
> :196)
> >        at com.sirvisetti.esb.XMLDBWriter.process(XMLDBWriter.java:130)
> >        at org.servicemix.components.util.OutBinding.onMessageExchange(
> OutBinding.java:51)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:423)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:400)
> >        at com.sirvisetti.esb.MessageLogger.syncBackToEsb(
> MessageLogger.java:253)
> >        at com.sirvisetti.esb.MessageLogger.process(MessageLogger.java
> :181)
> >        at org.servicemix.components.util.OutBinding.onMessageExchange(
> OutBinding.java:51)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:423)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:400)
> >        at com.sirvisetti.esb.VfsFileWriter.processFile(
> VfsFileWriter.java:194)
> >        at com.sirvisetti.esb.VfsFileWriter.process(VfsFileWriter.java
> :134)
> >        at org.servicemix.components.util.OutBinding.onMessageExchange(
> OutBinding.java:51)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.send(
> DeliveryChannelImpl.java:389)
> >        at org.servicemix.components.util.PojoSupport.send(
> PojoSupport.java:213)
> >        at org.servicemix.components.xslt.XalanExtension.invoke(
> XalanExtension.java:111)
> >        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.xalan.extensions.ExtensionHandlerJavaClass.processElement(
> ExtensionHandlerJavaClass.java:515)
> >        at org.apache.xalan.templates.ElemExtensionCall.execute(
> ElemExtensionCall.java:232)
> >        at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(
> TransformerImpl.java:2411)
> >        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java
> :126)
> >        at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(
> TransformerImpl.java:2411)
> >        at
> org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(
> TransformerImpl.java:2281)
> >        at org.apache.xalan.transformer.TransformerImpl.transformNode(
> TransformerImpl.java:1367)
> >        at org.apache.xalan.transformer.TransformerImpl.transform(
> TransformerImpl.java:709)
> >        at org.apache.xalan.transformer.TransformerImpl.transform(
> TransformerImpl.java:1284)
> >        at org.apache.xalan.transformer.TransformerImpl.transform(
> TransformerImpl.java:1262)
> >        at org.servicemix.components.xslt.XsltComponent.transformContent(
> XsltComponent.java:135)
> >        at org.servicemix.components.xslt.XsltComponent.transform(
> XsltComponent.java:119)
> >        at
> org.servicemix.components.util.TransformComponentSupport.onMessageExchange
> (TransformComponentSupport.java:47)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:423)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:400)
> >        at org.servicemix.components.vfs.FilePoller.processFile(
> FilePoller.java:187)
> >        at org.servicemix.components.vfs.FilePoller.processFileAndDelete(
> FilePoller.java:158)
> >        at org.servicemix.components.vfs.FilePoller$1.run(FilePoller.java
> :74)
> >        at org.apache.geronimo.connector.work.WorkerContext.run(
> WorkerContext.java:291)
> >        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
> >        at java.lang.Thread.run(Thread.java:595)
> >Caused by: groovy.lang.GroovyRuntimeException: Cannot read property:
> bodyText
> >        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
> >        at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java
> :726)
> >        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
> InvokerHelper.java:194)
> >        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
> ScriptBytecodeAdapter.java:274)
> >        at Script1.run(Unknown Source)
> >        at com.sun.script.groovy.GroovyScriptEngine.eval(
> GroovyScriptEngine.java:118)
> >        ... 83 more
> >javax.jbi.messaging.MessagingException: Failed to run compiledScript.
> Reason: javax.script.ScriptException
> >        at org.servicemix.components.script.ScriptComponent.process(
> ScriptComponent.java:238)
> >        at
> org.servicemix.components.script.ScriptComponent.onMessageExchange(
> ScriptComponent.java:102)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:423)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:400)
> >        at com.sirvisetti.esb.XMLDBWriter.syncBackToEsb(XMLDBWriter.java
> :196)
> >        at com.sirvisetti.esb.XMLDBWriter.process(XMLDBWriter.java:130)
> >        at org.servicemix.components.util.OutBinding.onMessageExchange(
> OutBinding.java:51)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:423)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:400)
> >        at com.sirvisetti.esb.MessageLogger.syncBackToEsb(
> MessageLogger.java:253)
> >        at com.sirvisetti.esb.MessageLogger.process(MessageLogger.java
> :181)
> >        at org.servicemix.components.util.OutBinding.onMessageExchange(
> OutBinding.java:51)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:423)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:400)
> >        at com.sirvisetti.esb.VfsFileWriter.processFile(
> VfsFileWriter.java:194)
> >        at com.sirvisetti.esb.VfsFileWriter.process(VfsFileWriter.java
> :134)
> >        at org.servicemix.components.util.OutBinding.onMessageExchange(
> OutBinding.java:51)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.send(
> DeliveryChannelImpl.java:389)
> >        at org.servicemix.components.util.PojoSupport.send(
> PojoSupport.java:213)
> >        at org.servicemix.components.xslt.XalanExtension.invoke(
> XalanExtension.java:111)
> >        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.xalan.extensions.ExtensionHandlerJavaClass.processElement(
> ExtensionHandlerJavaClass.java:515)
> >        at org.apache.xalan.templates.ElemExtensionCall.execute(
> ElemExtensionCall.java:232)
> >        at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(
> TransformerImpl.java:2411)
> >        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java
> :126)
> >        at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(
> TransformerImpl.java:2411)
> >        at
> org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(
> TransformerImpl.java:2281)
> >        at org.apache.xalan.transformer.TransformerImpl.transformNode(
> TransformerImpl.java:1367)
> >        at org.apache.xalan.transformer.TransformerImpl.transform(
> TransformerImpl.java:709)
> >        at org.apache.xalan.transformer.TransformerImpl.transform(
> TransformerImpl.java:1284)
> >        at org.apache.xalan.transformer.TransformerImpl.transform(
> TransformerImpl.java:1262)
> >        at org.servicemix.components.xslt.XsltComponent.transformContent(
> XsltComponent.java:135)
> >        at org.servicemix.components.xslt.XsltComponent.transform(
> XsltComponent.java:119)
> >        at
> org.servicemix.components.util.TransformComponentSupport.onMessageExchange
> (TransformComponentSupport.java:47)
> >        at
> org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(
> DeliveryChannelImpl.java:590)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(
> AbstractFlow.java:182)
> >        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
> >        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(
> AbstractFlow.java:124)
> >        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java
> :289)
> >        at org.servicemix.jbi.container.JBIContainer.sendExchange(
> JBIContainer.java:590)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(
> DeliveryChannelImpl.java:349)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:423)
> >        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(
> DeliveryChannelImpl.java:400)
> >        at org.servicemix.components.vfs.FilePoller.processFile(
> FilePoller.java:187)
> >        at org.servicemix.components.vfs.FilePoller.processFileAndDelete(
> FilePoller.java:158)
> >        at org.servicemix.components.vfs.FilePoller$1.run(FilePoller.java
> :74)
> >        at org.apache.geronimo.connector.work.WorkerContext.run(
> WorkerContext.java:291)
> >        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
> >        at java.lang.Thread.run(Thread.java:595)
> >Caused by: javax.script.ScriptException
> >        at com.sun.script.groovy.GroovyScriptEngine.eval(
> GroovyScriptEngine.java:121)
> >        at com.sun.script.groovy.GroovyCompiledScript.eval(
> GroovyCompiledScript.java:23)
> >        at javax.script.CompiledScript.eval(CompiledScript.java:72)
> >        at org.servicemix.components.script.ScriptComponent.runScript(
> ScriptComponent.java:281)
> >        at org.servicemix.components.script.ScriptComponent.process(
> ScriptComponent.java:223)
> >        ... 79 more
> >Caused by: groovy.lang.GroovyRuntimeException: Cannot read property:
> bodyText
> >        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
> >        at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java
> :726)
> >        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
> InvokerHelper.java:194)
> >        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
> ScriptBytecodeAdapter.java:274)
> >        at Script1.run(Unknown Source)
> >        at com.sun.script.groovy.GroovyScriptEngine.eval(
> GroovyScriptEngine.java:118)
> >        ... 83 more
> >
> >
>
>

Re: Groovy component error.

Posted by Guillaume Nodet <gu...@worldonline.fr>.
You should check that the incoming message has a valid xml content, as 
the bodyText property transforms the xml content to a string.
You may try replacing it with the 
org.apache.servicemix.components.util.TraceComponent to see what 
happens, or using the
EchoComponent in between.

Cheers,
Guillaume Nodet

uday garikapati wrote:

> Guillaume,
>
> Thanks for the response. i am attaching esb and stacktrace files.
>
> when the flow is moving from "foo:resXMLDBWriter" to 
> "foo:priOraDBWriter", the error
> is coming up. If it is directly wired to poller component it is 
> working fine.
>
> Here let me put some information about the behaviour of the other 
> components
> which are wired in the esb-config.
>
> All the components like XMLDBWriter component etc are similar to the 
> FileWriter component ,
>  but the diff is that they pushes back a message to the esb.
>
> Thanks,
> uday garikapati
>
> On 1/24/06, *Guillaume Nodet* <guillaume.nodet@worldonline.fr 
> <ma...@worldonline.fr>> wrote:
>
>     Could you please post the full stack trace and configuration file
>     please ?
>     I doubt the '[#document: null]' means that there is no document (I
>     always see that kind of string when debugging).
>
>     Cheers,
>     Guillaume Nodet
>
>
>     uday garikapati wrote:
>
>     >Hi All,
>     >
>     >I am using ServiceMix 2.1 SNAPSHOT version under linux.
>     >I have an esb configuration file in it i am using FilePoller and
>     Groovy and
>     >FileWriter components.
>     >
>     >The scenario is i am polling a particular directory and then i am
>     storing it
>     >on a location and then
>     >passing to another component and then to Groovy component and
>     then writing
>     >to some location.
>     >
>     >when the navigation is passed immediately after poller to Groovy
>     component
>     >and then to remote location
>     >is working fine. but when i change the navigation after polling
>     to two other
>     >components and then to Groovy
>     >then it is giving error for reading "inMessage.bodyText" .
>     >i am reading the xml file which is coming to Groovy component via
>     above
>     >property.
>     >
>     >The exception is
>     >
>     >Caused by: groovy.lang.GroovyRuntimeException: Cannot read property:
>     >bodyText
>     >        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
>     >        at
>     org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java :726)
>     >        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
>     >InvokerHelper.java:194)
>     >        at
>     org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
>     >ScriptBytecodeAdapter.java :274)
>     >        at Script1.run(Unknown Source)
>     >        at com.sun.script.groovy.GroovyScriptEngine.eval(
>     >GroovyScriptEngine.java:118)
>     >        ... 71 more
>     >
>     > when i read like this " inMessage.toString()" and displaying to
>     console it
>     >is howing this :
>     >
>     >  org.servicemix.jbi.messaging.NormalizedMessageImpl@efe27b{properties:
>     {
>     >org.servicemix.file.name=ftp://userme:pwdme@193.186.7.112
>     /xyz/abc/12345.xml,
>     >org.servicemix.content.document=[#document: null]}}
>     >
>     >here if we observe "org.servicemix.content.document=[#document:
>     null]}"
>     >document is null.
>     >
>     >Is this the problem ? anybody help..
>     >
>     >how can i get the content of the file ?
>     >
>     >Thanks,
>     >uday garikapati
>     >
>     >
>     >
>     >
>     >when i am using "inMessage.bodyText" property it is giving some
>     errors.
>     >
>     >
>     >
>
>
>------------------------------------------------------------------------
>
><?xml version="1.0" encoding="UTF-8"?>
><beans xmlns="http://xbean.org/schemas/spring/1.0"
> xmlns:spring="http://xbean.org/schemas/spring/1.0"
> xmlns:sm="http://servicemix.org/config/1.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xbean.org/schemas/spring/1.0 ../../conf/spring-beans.xsd
>	                    http://servicemix.org/config/1.0 ../../conf/servicemix.xsd"
> xmlns:foo="http://garikapati.com/">
>
> <!-- the JBI container 
>  * The attribute flowName="st" makes the esb config to use single thread model.
> -->
> <sm:container spring:id="jbi" useMBeanServer="true"
>  createMBeanServer="true" dumpStats="true" statsInterval="10"  rmiPort="9099" flowName="st">
>
>  <sm:activationSpecs>
>
>   <!-- ==================== COMMON ========================== -->
>   <!-- Route the event to a tracer component that just outputs the event to the console -->
>   <sm:activationSpec componentName="tracer" service="foo:tracer">
>    <sm:component>
>     <bean xmlns="http://xbean.org/schemas/spring/1.0"
>      class="org.servicemix.components.util.StreamWriterComponent" />
>    </sm:component>
>   </sm:activationSpec>
>
>   <!-- ======================= INBOUND ============================ -->
>
>   <!-- Look for files in the inbox directory -->
>    <sm:activationSpec componentName="filePoller" service="foo:filePoller" destinationService="foo:inInvTReceiptFileArchiver">
>    <sm:component>
>    <bean xmlns="http://xbean.org/schemas/spring/1.0"
>    class="org.servicemix.components.vfs.FilePoller">
>    <property name="path" value="ftp://myuser:myself@193.186.79.17/home/uday/teststore"/>
>    <property name="period" value="1000"/>
>    <property name="deleteFile" value="true"/>
>    <property name="workManager" ref="workManager"/>
>    </bean>
>    </sm:component>
>    </sm:activationSpec>
>
>   <sm:activationSpec componentName="inInvTReceiptFileArchiver" service="foo:inInvTReceiptFileArchiver"
>    destinationService="foo:resXMLDBWriter">
>    <sm:component>
>     <bean xmlns="http://xbean.org/schemas/spring/1.0"  class="com.uday.esb.XtVfsFileWriter">
>     	  <property name="path" value="ftp://svanamala:abc.123@193.186.79.2/uday/softwares/esb_archive/SATDHLITI/Response"/>
>		  <property name="marshaler">
>		      <bean class="org.servicemix.components.util.DefaultFileMarshaler">
>			       <property name="fileName">
>				         <bean class="org.servicemix.expression.JaxenStringXPathExpression">
>						     <constructor-arg value="concat(/ALS/ALSHEADER/FILEID,'.xml')" />
>				         </bean>
>			        </property> 
>		      </bean>
>           </property>  
>	  </bean>
>    </sm:component>
>   </sm:activationSpec>
>
>   <sm:activationSpec componentName="resXMLDBWriter" service="foo:resXMLDBWriter" destinationService="foo:priOraDBWriter">
>    <sm:component>
>     <bean xmlns="http://xbean.org/schemas/spring/1.0" class="com.uday.esb.XMLDBWriter">
>      <property name="driver" value="org.exist.xmldb.DatabaseImpl" />
>      <property name="xdburi" value="xmldb:exist://193.186.79.17:8080/exist/xmlrpc/db/" />
>      <property name="username" value="admin" />
>      <property name="password" value="" />
>      <property name="collection">
>       <bean class="org.servicemix.expression.JaxenStringXPathExpression">
>        <constructor-arg value="concat(substring-before(/ALSResponse/DocHeader/ClientDocID,'.'),'/Response')" />
>       </bean>
>      </property>
>      <property name="marshaler">
>       <bean class="org.servicemix.components.util.DefaultFileMarshaler">
>        <property name="fileName">
>         <bean class="org.servicemix.expression.JaxenStringXPathExpression">
>          <constructor-arg value="concat(/ALSResponse/DocHeader/ALSDocID, '.xml')" />
>         </bean>
>        </property>
>       </bean>
>      </property>
>     </bean>
>    </sm:component>
>   </sm:activationSpec>
>
>    <sm:activationSpec componentName="priOraDBWriter"
>    service="foo:priOraDBWriter" destinationService="foo:tracer">
>    <sm:component>
>     <bean xmlns="http://xbean.org/schemas/spring/1.0"
>      class="org.servicemix.components.groovy.GroovyComponent">
>      <property name="scriptText">
>       <value>
>        <![CDATA[
>				import groovy.sql.Sql
>				import java.io.*
>				import java.util.*
>				import java.sql.*
>				import java.text.*
>				import org.dom4j.Document;
>				import org.dom4j.DocumentException;
>				import org.dom4j.Node;
>				import org.dom4j.io.SAXReader;
>
>				println "Called with inbound message $inMessage"
>				
>				def sql = Sql.newInstance("jdbc:oracle:thin:@193.186.179.15:1521:madhu", "scott", "tiger", "oracle.jdbc.driver.OracleDriver")
>
>				def tempMsg = inMessage.bodyText
>				Document document = reader.read(new StringReader(tempMsg))
>				
>				def reader = new SAXReader();
>				Document document = reader.read(new StringReader(tempMsg))
>				List arList = document.selectNodes("/ALS/INVTRANS/ITEMTRANS")
>			
>				for(obj in arList)
>				{
>					Node node = (Node) obj;
>					cliOrdNum = node.selectSingleNode("CLIENTORDERNUMBER").getStringValue();
>				
>					if(cliOrdNum.contains("_"))
>					{
>						warehouse = node.selectSingleNode("WAREHOUSE").getStringValue();
>						transactiondate =node.selectSingleNode("TRANSACTIONDATE").getStringValue();
>						quantity = node.selectSingleNode("QUANTITY").getStringValue();
>						itemnumber = node.selectSingleNode("ITEMNUMBER").getStringValue();
>						cliLineNum = node.selectSingleNode("CLIENTLINENUMBER").getStringValue();
>									
>						docNum = cliOrdNum.substring(0,cliOrdNum.indexOf("_"));
>						poRevNum = cliOrdNum.substring(cliOrdNum.indexOf("_")+1,cliOrdNum.length());
>						def shipmentNum = "fooDHLPRI"+new Date().getTime()
>
>						if(warehouse == 'AOV')
>						{
>							warehouse = 'NYM'
>						}
>										
>						
>						def headersSql = sql.executeUpdate("insert into RCV_HEADERS_INTERFACE (HEADER_INTERFACE_ID,RECEIPT_SOURCE_CODE,ASN_TYPE,TRANSACTION_TYPE,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN,SHIPMENT_NUM,RECEIPT_NUM,SHIP_TO_ORGANIZATION_CODE) values(rcv_headers_interface_s.nextval,'VENDOR','RECEIVE','NEW',sysdate,-1,sysdate,-1,-1,${shipmentNum},${shipmentNum},${warehouse})")
>						
>						println "${headersSql} no of rows Inserted...........................in RCV_HEADERS_INTERFACE .........."
>
>						
>					}
>				}
>
>				
>
>
>
>				// lets output some message properties
>				outMessage.properties = [foo:"hello", someList:[1, 2, 3]]
>
>				// lets output some non-xml body
>				outMessage.bodyText = """
>				<requestId></requestId>
>				"""
>            		]]>
>       </value>
>      </property>
>     </bean>
>    </sm:component>
>   </sm:activationSpec>
>
>  </sm:activationSpecs>
>
> </sm:container>
>
> <bean id="xdbConDetails" class="com.sirvisetti.esb.XDBConnectionDetails">
>	<property name="driver" value="org.exist.xmldb.DatabaseImpl" />
>	<property name="xdburi" value="xmldb:exist://193.186.79.17:8080/exist/xmlrpc/db/"/>
>	<property name="username" value="admin" />
>	<property name="password" value="" />
> </bean>
>
> <!-- the work manager (thread pool) for this container -->
> <bean id="workManager"
>  class="org.jencks.factory.WorkManagerFactoryBean">
>  <property name="threadPoolSize" value="1" />
> </bean>
>
>
></beans>
>  
>
>------------------------------------------------------------------------
>
>
>Called with inbound message org.servicemix.jbi.messaging.NormalizedMessageImpl@1b9da92{properties: {org.servicemix.file.name=ftp://svanamala:abc.123@193.186.79.2/uday/work/smftp/archive/SATDHLITI/Response/12345.xml, org.servicemix.content.document=[#document: null]}}
>Caught: javax.script.ScriptException
>javax.script.ScriptException
>        at com.sun.script.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:121)
>        at com.sun.script.groovy.GroovyCompiledScript.eval(GroovyCompiledScript.java:23)
>        at javax.script.CompiledScript.eval(CompiledScript.java:72)
>        at org.servicemix.components.script.ScriptComponent.runScript(ScriptComponent.java:281)
>        at org.servicemix.components.script.ScriptComponent.process(ScriptComponent.java:223)
>        at org.servicemix.components.script.ScriptComponent.onMessageExchange(ScriptComponent.java:102)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:423)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:400)
>        at com.sirvisetti.esb.XMLDBWriter.syncBackToEsb(XMLDBWriter.java:196)
>        at com.sirvisetti.esb.XMLDBWriter.process(XMLDBWriter.java:130)
>        at org.servicemix.components.util.OutBinding.onMessageExchange(OutBinding.java:51)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:423)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:400)
>        at com.sirvisetti.esb.MessageLogger.syncBackToEsb(MessageLogger.java:253)
>        at com.sirvisetti.esb.MessageLogger.process(MessageLogger.java:181)
>        at org.servicemix.components.util.OutBinding.onMessageExchange(OutBinding.java:51)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:423)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:400)
>        at com.sirvisetti.esb.VfsFileWriter.processFile(VfsFileWriter.java:194)
>        at com.sirvisetti.esb.VfsFileWriter.process(VfsFileWriter.java:134)
>        at org.servicemix.components.util.OutBinding.onMessageExchange(OutBinding.java:51)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:389)
>        at org.servicemix.components.util.PojoSupport.send(PojoSupport.java:213)
>        at org.servicemix.components.xslt.XalanExtension.invoke(XalanExtension.java:111)
>        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.xalan.extensions.ExtensionHandlerJavaClass.processElement(ExtensionHandlerJavaClass.java:515)
>        at org.apache.xalan.templates.ElemExtensionCall.execute(ElemExtensionCall.java:232)
>        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
>        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:126)
>        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
>        at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
>        at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
>        at org.servicemix.components.xslt.XsltComponent.transformContent(XsltComponent.java:135)
>        at org.servicemix.components.xslt.XsltComponent.transform(XsltComponent.java:119)
>        at org.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:47)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:423)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:400)
>        at org.servicemix.components.vfs.FilePoller.processFile(FilePoller.java:187)
>        at org.servicemix.components.vfs.FilePoller.processFileAndDelete(FilePoller.java:158)
>        at org.servicemix.components.vfs.FilePoller$1.run(FilePoller.java:74)
>        at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
>        at java.lang.Thread.run(Thread.java:595)
>Caused by: groovy.lang.GroovyRuntimeException: Cannot read property: bodyText
>        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
>        at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java:726)
>        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194)
>        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:274)
>        at Script1.run(Unknown Source)
>        at com.sun.script.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:118)
>        ... 83 more
>javax.jbi.messaging.MessagingException: Failed to run compiledScript. Reason: javax.script.ScriptException
>        at org.servicemix.components.script.ScriptComponent.process(ScriptComponent.java:238)
>        at org.servicemix.components.script.ScriptComponent.onMessageExchange(ScriptComponent.java:102)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:423)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:400)
>        at com.sirvisetti.esb.XMLDBWriter.syncBackToEsb(XMLDBWriter.java:196)
>        at com.sirvisetti.esb.XMLDBWriter.process(XMLDBWriter.java:130)
>        at org.servicemix.components.util.OutBinding.onMessageExchange(OutBinding.java:51)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:423)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:400)
>        at com.sirvisetti.esb.MessageLogger.syncBackToEsb(MessageLogger.java:253)
>        at com.sirvisetti.esb.MessageLogger.process(MessageLogger.java:181)
>        at org.servicemix.components.util.OutBinding.onMessageExchange(OutBinding.java:51)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:423)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:400)
>        at com.sirvisetti.esb.VfsFileWriter.processFile(VfsFileWriter.java:194)
>        at com.sirvisetti.esb.VfsFileWriter.process(VfsFileWriter.java:134)
>        at org.servicemix.components.util.OutBinding.onMessageExchange(OutBinding.java:51)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:389)
>        at org.servicemix.components.util.PojoSupport.send(PojoSupport.java:213)
>        at org.servicemix.components.xslt.XalanExtension.invoke(XalanExtension.java:111)
>        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.xalan.extensions.ExtensionHandlerJavaClass.processElement(ExtensionHandlerJavaClass.java:515)
>        at org.apache.xalan.templates.ElemExtensionCall.execute(ElemExtensionCall.java:232)
>        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
>        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:126)
>        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
>        at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
>        at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
>        at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
>        at org.servicemix.components.xslt.XsltComponent.transformContent(XsltComponent.java:135)
>        at org.servicemix.components.xslt.XsltComponent.transform(XsltComponent.java:119)
>        at org.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:47)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:590)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:182)
>        at org.servicemix.jbi.nmr.flow.st.STFlow.doSend(STFlow.java:45)
>        at org.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:124)
>        at org.servicemix.jbi.nmr.Broker.sendExchangePacket(Broker.java:289)
>        at org.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:590)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:349)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:423)
>        at org.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:400)
>        at org.servicemix.components.vfs.FilePoller.processFile(FilePoller.java:187)
>        at org.servicemix.components.vfs.FilePoller.processFileAndDelete(FilePoller.java:158)
>        at org.servicemix.components.vfs.FilePoller$1.run(FilePoller.java:74)
>        at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
>        at java.lang.Thread.run(Thread.java:595)
>Caused by: javax.script.ScriptException
>        at com.sun.script.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:121)
>        at com.sun.script.groovy.GroovyCompiledScript.eval(GroovyCompiledScript.java:23)
>        at javax.script.CompiledScript.eval(CompiledScript.java:72)
>        at org.servicemix.components.script.ScriptComponent.runScript(ScriptComponent.java:281)
>        at org.servicemix.components.script.ScriptComponent.process(ScriptComponent.java:223)
>        ... 79 more
>Caused by: groovy.lang.GroovyRuntimeException: Cannot read property: bodyText
>        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
>        at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java:726)
>        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194)
>        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:274)
>        at Script1.run(Unknown Source)
>        at com.sun.script.groovy.GroovyScriptEngine.eval(GroovyScriptEngine.java:118)
>        ... 83 more
>  
>


Re: Groovy component error.

Posted by uday garikapati <ud...@gmail.com>.
Guillaume,

Thanks for the response. i am attaching esb and stacktrace files.

when the flow is moving from "foo:resXMLDBWriter" to "foo:priOraDBWriter",
the error
is coming up. If it is directly wired to poller component it is working
fine.

Here let me put some information about the behaviour of the other components
which are wired in the esb-config.

All the components like XMLDBWriter component etc are similar to the
FileWriter component ,
 but the diff is that they pushes back a message to the esb.

Thanks,
uday garikapati

On 1/24/06, Guillaume Nodet <gu...@worldonline.fr> wrote:
>
> Could you please post the full stack trace and configuration file please ?
> I doubt the '[#document: null]' means that there is no document (I
> always see that kind of string when debugging).
>
> Cheers,
> Guillaume Nodet
>
>
> uday garikapati wrote:
>
> >Hi All,
> >
> >I am using ServiceMix 2.1 SNAPSHOT version under linux.
> >I have an esb configuration file in it i am using FilePoller and Groovy
> and
> >FileWriter components.
> >
> >The scenario is i am polling a particular directory and then i am storing
> it
> >on a location and then
> >passing to another component and then to Groovy component and then
> writing
> >to some location.
> >
> >when the navigation is passed immediately after poller to Groovy
> component
> >and then to remote location
> >is working fine. but when i change the navigation after polling to two
> other
> >components and then to Groovy
> >then it is giving error for reading "inMessage.bodyText" .
> >i am reading the xml file which is coming to Groovy component via above
> >property.
> >
> >The exception is
> >
> >Caused by: groovy.lang.GroovyRuntimeException: Cannot read property:
> >bodyText
> >        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
> >        at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java
> :726)
> >        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
> >InvokerHelper.java:194)
> >        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
> >ScriptBytecodeAdapter.java:274)
> >        at Script1.run(Unknown Source)
> >        at com.sun.script.groovy.GroovyScriptEngine.eval(
> >GroovyScriptEngine.java:118)
> >        ... 71 more
> >
> > when i read like this "inMessage.toString()" and displaying to console
> it
> >is howing this :
> >
> >  org.servicemix.jbi.messaging.NormalizedMessageImpl@efe27b{properties: {
> >org.servicemix.file.name=ftp://userme:pwdme@193.186.7.112
> /xyz/abc/12345.xml,
> >org.servicemix.content.document=[#document: null]}}
> >
> >here if we observe "org.servicemix.content.document=[#document: null]}"
> >document is null.
> >
> >Is this the problem ? anybody help..
> >
> >how can i get the content of the file ?
> >
> >Thanks,
> >uday garikapati
> >
> >
> >
> >
> >when i am using "inMessage.bodyText" property it is giving some errors.
> >
> >
> >
>
>

Re: Groovy component error.

Posted by Guillaume Nodet <gu...@worldonline.fr>.
Could you please post the full stack trace and configuration file please ?
I doubt the '[#document: null]' means that there is no document (I 
always see that kind of string when debugging).

Cheers,
Guillaume Nodet


uday garikapati wrote:

>Hi All,
>
>I am using ServiceMix 2.1 SNAPSHOT version under linux.
>I have an esb configuration file in it i am using FilePoller and Groovy and
>FileWriter components.
>
>The scenario is i am polling a particular directory and then i am storing it
>on a location and then
>passing to another component and then to Groovy component and then writing
>to some location.
>
>when the navigation is passed immediately after poller to Groovy component
>and then to remote location
>is working fine. but when i change the navigation after polling to two other
>components and then to Groovy
>then it is giving error for reading "inMessage.bodyText" .
>i am reading the xml file which is coming to Groovy component via above
>property.
>
>The exception is
>
>Caused by: groovy.lang.GroovyRuntimeException: Cannot read property:
>bodyText
>        at groovy.lang.MetaClass.getProperty(MetaClass.java:596)
>        at org.codehaus.groovy.runtime.Invoker.getProperty(Invoker.java:726)
>        at org.codehaus.groovy.runtime.InvokerHelper.getProperty(
>InvokerHelper.java:194)
>        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(
>ScriptBytecodeAdapter.java:274)
>        at Script1.run(Unknown Source)
>        at com.sun.script.groovy.GroovyScriptEngine.eval(
>GroovyScriptEngine.java:118)
>        ... 71 more
>
> when i read like this "inMessage.toString()" and displaying to console it
>is howing this :
>
>  org.servicemix.jbi.messaging.NormalizedMessageImpl@efe27b{properties: {
>org.servicemix.file.name=ftp://userme:pwdme@193.186.7.112/xyz/abc/12345.xml,
>org.servicemix.content.document=[#document: null]}}
>
>here if we observe "org.servicemix.content.document=[#document: null]}"
>document is null.
>
>Is this the problem ? anybody help..
>
>how can i get the content of the file ?
>
>Thanks,
>uday garikapati
>
>
>
>
>when i am using "inMessage.bodyText" property it is giving some errors.
>
>  
>