1 2 Previous Next 17 Replies Latest reply on Nov 15, 2011 3:18 AM by davsclaus Go to original post
      • 15. Re: Camel exception in Exchange using OSGi:  but OK if run in Camel Context
        davsclaus

        This is now fixed in the next Fuse ESB releases.

         

        As a workaround in your environment you would need to uninstall the hapi 0.5.1 bundle, and then install this bundle instead

         

        osgi:install -s mvn:ca.uhn.hapi/hapi-osgi-base/1.2

        • 16. Re: Camel exception in Exchange using OSGi:  but OK if run in Camel Context
          sandy2011

          Thanks Claus, that works fine.

          But there is another issue at different section of the Route.

          FYI:This works fine when run as a Camel Context!!!

           

          Section of Route after Parsing the HL7, Inserting to Database is fine.

          Next section Fetching records from dbase and converting to XML seems to be issue

          -


                                String InsertStmt = "Insert into HL7_MSH_Ver23 values (" ColumnNames.toString()")";                  

                                exchange.getIn().setBody(constant(InsertStmt));

                       }

                  })   

                       .to("jdbc:testdb")

                            .setBody(constant("select top 10 * from HL7_MSH_Ver23"))

                       .to("jdbc:testdb")

                            .marshal(xstream)     

                       .to("file:D:/ServiceMixSandpit/datatransfer/HL7_JDBC/FromDB?fileName=dbout-$.xml")

                   .otherwise()

                        .marshal(hl7)

                        .to("file:D:/ServiceMixSandpit/datatransfer/HL7_JDBC/Others")

                             .end()

                             .setBody(constant("MSA|AA|"))

                           .convertBodyTo(String.class)

                           .marshal();

          -


          Exception:

          -


          Date_TimeofMessage=20111021090729.271, Receiving_Application=null, Character_Set=ASCII, Message_Control_ID=634547848495993671,... ] using session: (SOCKET, R: /151.46.220.183:4116, L: /151.46.220.183:61610, S: /151.46.220.183:61610)

          10:43:35,640 | DEBUG | - MinaThreadPool | MinaConsumer                     | 127 - org.apache.camel.camel-mina - 2.7.1.fuse-00-43 | Closing session as an exception was thrown from MINA

          10:43:35,640 | WARN  | - MinaThreadPool | MinaConsumer$ReceiveHandler      | 122 - org.apache.servicemix.bundles.mina - 1.1.7.3 | /151.46.220.183:4116 Unexpected exception from exceptionCaught handler.

          org.apache.camel.CamelException: org.apache.mina.filter.codec.ProtocolEncoderException: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [{Message_Type=ADT, Sending_Application=GENDAPRO, Accept_Ack_Type=NE, Sending_Facility=III, Country_Code=, Date_TimeofMessage=20111021090729.271, Receiving_Application=null, Character_Set=ASCII, Message_Control_ID=634547848495993671, Receiving_Facility=null, Security=null, Processing_ID=T, Application_ack=AL, Sequence_Number=null, Version_ID=2.3, Continuation_Pointer=null}, {Message_Type=ADT, Sending_Application=GENDAPRO, Accept_Ack_Type=NE, Sending_Facility=III, Country_Code=, Date_TimeofMessage=20111021090729.271, Receiving_Application=null, Character_Set=ASCII, Message_Control_ID=634547848495993671, Receiving_Facility=null, Security=null, Processing_ID=T, Application_ack=AL, Sequence_Number=null, Version_ID=2.3, Continuation_Pointer=null}, {Message_Type=ADT, Sending_Application=GENDAPRO, Accept_Ack_Type=NE, Sending_Facility=III, Country_Code=, Date_TimeofMessage=20111021090729.271, Receiving_Application=null, Character_Set=ASCII, Message_Control_ID=634547848495993671,... ]

               at org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.exceptionCaught(MinaConsumer.java:95)[127:org.apache.camel.camel-mina:2.7.1.fuse-00-43]

               at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.exceptionCaught(AbstractIoFilterChain.java:564)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:224)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_27]

               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_27]

               at java.lang.Thread.run(Thread.java:662)[:1.6.0_27]

          Caused by: org.apache.mina.filter.codec.ProtocolEncoderException: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [{Message_Type=ADT, Sending_Application=GENDAPRO, Accept_Ack_Type=NE, Sending_Facility=III, Country_Code=, Date_TimeofMessage=20111021090729.271, Receiving_Application=null, Character_Set=ASCII, Message_Control_ID=634547848495993671, Receiving_Facility=null, Security=null, Processing_ID=T, Application_ack=AL, Sequence_Number=null, Version_ID=2.3, Continuation_Pointer=null}, {Message_Type=ADT, Sending_Application=GENDAPRO, Accept_Ack_Type=NE, Sending_Facility=III, Country_Code=, Date_TimeofMessage=20111021090729.271, Receiving_Application=null, Character_Set=ASCII, Message_Control_ID=634547848495993671, Receiving_Facility=null, Security=null, Processing_ID=T, Application_ack=AL, Sequence_Number=null, Version_ID=2.3, Continuation_Pointer=null}, {Message_Type=ADT, Sending_Application=GENDAPRO, Accept_Ack_Type=NE, Sending_Facility=III, Country_Code=, Date_TimeofMessage=20111021090729.271, Receiving_Application=null, Character_Set=ASCII, Message_Control_ID=634547848495993671,... ]

          *     at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:224)[122:org.apache.servicemix.bundles.mina:1.1.7.3]*

          *     at* org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:361)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain.access$1300(AbstractIoFilterChain.java:53)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterWrite(AbstractIoFilterChain.java:659)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.filter.executor.ExecutorFilter.filterWrite(ExecutorFilter.java:236)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:361)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain.access$1300(AbstractIoFilterChain.java:53)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.filterWrite(AbstractIoFilterChain.java:659)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.filterWrite(AbstractIoFilterChain.java:587)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain.callPreviousFilterWrite(AbstractIoFilterChain.java:361)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain.fireFilterWrite(AbstractIoFilterChain.java:355)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.transport.socket.nio.SocketSessionImpl.write0(SocketSessionImpl.java:166)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:177)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:168)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.camel.component.mina.MinaHelper.writeBody(MinaHelper.java:48)[127:org.apache.camel.camel-mina:2.7.1.fuse-00-43]

               at org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.messageReceived(MinaConsumer.java:156)[127:org.apache.camel.camel-mina:2.7.1.fuse-00-43]

               at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)[122:org.apache.servicemix.bundles.mina:1.1.7.3]

               ... 4 more

          Caused by: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message:

          • 17. Re: Camel exception in Exchange using OSGi:  but OK if run in Camel Context
            davsclaus

            I suggest to make the Camel route simpler, until you hit a situation where it works. Then you know which part makes problems when running in OSGi. There may be some odd combination that causes this problem with OSGi.

            1 2 Previous Next