5 Replies Latest reply on Sep 6, 2011 8:36 AM by Jing Yang

    Cannot read entries in url: bundleresource:

    Jing Yang Newbie

      The camel route works OK but there is  the following exception during it is initially invoked.

       

      My bean "Transmitter47001" try to send the message by producerTemplate.

       

      This bean functionality is as  expected.

       

       

      How to avoid these annoying exception?

       

       

       

       

      14:18:10,919 | DEBUG |  #15 - Multicast | DefaultPackageScanClassResolver  | .DefaultPackageScanClassResolver  312 | 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-15 | Cannot read entries in url: bundleresource://68.fwk20201168/org/apache/camel/component/bean/

      java.io.FileNotFoundException: \org\apache\camel\component\bean (The system cannot find the path specified)

           at java.io.FileInputStream.open(Native Method)[:1.6.0_26]

           at java.io.FileInputStream.(CamelConverter.java:37)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.ExchangeImpl.getConverter(ExchangeImpl.java:468)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.ExchangeImpl.convert(ExchangeImpl.java:460)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.ExchangeImpl.getProperty(ExchangeImpl.java:200)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.jbi.runtime.impl.EndpointImpl.process(EndpointImpl.java:43)[91:org.apache.servicemix.jbi.runtime:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.executors.impl.ExecutorImpl.execute(ExecutorImpl.java:52)[79:servicemix-utils:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.ChannelImpl.deliver(ChannelImpl.java:213)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.StraightThroughFlow.dispatch(StraightThroughFlow.java:55)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.FlowRegistryImpl.internalDispatch(FlowRegistryImpl.java:134)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.FlowRegistryImpl.dispatch(FlowRegistryImpl.java:105)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.ChannelImpl.dispatch(ChannelImpl.java:286)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.nmr.core.ChannelImpl.send(ChannelImpl.java:117)[81:org.apache.servicemix.nmr.core:1.4.0.fuse-01-15]

           at org.apache.servicemix.jbi.runtime.impl.DeliveryChannelImpl.send(DeliveryChannelImpl.java:178)[91:org.apache.servicemix.jbi.runtime:1.4.0.fuse-01-15]

           at org.apache.servicemix.common.EndpointDeliveryChannel.send(EndpointDeliveryChannel.java:89)[90:servicemix-common:2011.01.0.fuse-01-15]

           at org.apache.servicemix.common.endpoints.SimpleEndpoint.send(SimpleEndpoint.java:70)[90:servicemix-common:2011.01.0.fuse-01-15]

           at org.apache.servicemix.camel.CamelConsumerEndpoint.process(CamelConsumerEndpoint.java:109)[161:servicemix-camel:2011.01.0.fuse-01-15]

           at org.apache.servicemix.camel.JbiEndpoint$JbiProducer$2.call(JbiEndpoint.java:131)[161:servicemix-camel:2011.01.0.fuse-01-15]

           at org.apache.servicemix.camel.JbiEndpoint$JbiProducer$2.call(JbiEndpoint.java:128)[161:servicemix-camel:2011.01.0.fuse-01-15]

           at org.apache.servicemix.camel.JbiBinding.runWithCamelContextClassLoader(JbiBinding.java:116)[161:servicemix-camel:2011.01.0.fuse-01-15]

           at org.apache.servicemix.camel.JbiEndpoint$JbiProducer.process(JbiEndpoint.java:128)[161:servicemix-camel:2011.01.0.fuse-01-15]

           at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:63)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:333)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:303)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:208)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:303)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:171)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:114)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:118)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:135)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:283)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at mil.army.pmbc.cs.esb.msg.transmit.Transmitter47001.transmit(Transmitter47001.java:81)[221:common-msg:13.0.0]

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_26]

           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)[:1.6.0_26]

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)[:1.6.0_26]

           at java.lang.reflect.Method.invoke(Unknown Source)[:1.6.0_26]

           at org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:322)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:224)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:167)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:74)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:102)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:72)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.interceptor.HandleFaultInterceptor.process(HandleFaultInterceptor.java:42)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.interceptor.HandleFaultInterceptor.process(HandleFaultInterceptor.java:42)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:716)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.MulticastProcessor.access$100(MulticastProcessor.java:78)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:282)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:274)[68:org.apache.camel.camel-core:2.6.0.fuse-01-15]

           at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)[:1.6.0_26]

           at java.util.concurrent.FutureTask.run(Unknown Source)[:1.6.0_26]

           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)[:1.6.0_26]

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.6.0_26]

           at java.lang.Thread.run(Unknown Source)[:1.6.0_26]

        • 1. Re: Cannot read entries in url: bundleresource:
          Freeman(Yue) Fang Master

          Hi,

           

          You need post your camel router here and elaborate how you package your bundle, e.g. you use JBI packaging or OSGi packaging?

           

          Freeman

          • 2. Re: Cannot read entries in url: bundleresource:
            Jing Yang Newbie

            SMX 4.3.0, camel 2.6.0 and OSGI bundle are used.

             

            Here are  the (1) simplified router and  (2) the bean "Transmitter47001" which triggers the exception(see previous one for detailed exception).

             

            (1) simplified router

             

                 

                 <cxf:cxfEndpoint id="cmpwebEndpoint"

                 address="$"      serviceName="s:CMPWebService"      xmlns:s="http://server.websrv.ssm.army.mil"      serviceClass="mil.army.ssm.websrv.server.CMPWebServicePortType"      wsdlURL="wsdl/CMPWebSrv.wsdl"/> <camel:camelContext  id="camel" errorHandlerRef="defaultEH" xmlns="http://camel.apache.org/schema/spring">      <template id="producerTemplate"/>      <!-- this is the default error handler -->      <errorHandler id="defaultEH">             <redeliveryPolicy maximumRedeliveries="2" retryAttemptedLogLevel="WARN" redeliveryDelay="1000"/>      </errorHandler>     <onException>           <exception>mil.army.pmbc.cs.esb.msg.vmf.VMFEncodeException</exception>           <exception>mil.army.pmbc.cs.esb.msg.transmit.TransmitException</exception>           <exception>mil.army.pmbc.cs.esb.msg.mail.EmailSenderException</exception>           <handled><constant>true</constant></handled>          <to uri="sendXMLFailureResponse"/>    </onException>    <onException>           <exception>mil.army.pmbc.cs.esb.msg.address.AddressManagerException</exception>          <redeliveryPolicy maximumRedeliveries="3" redeliveryDelay="3000"/>           <handled><constant>true</constant></handled>         <to uri="sendXMLFailureResponse"/>            </onException>        <route id="outbound-msg-websvc">       <from uri="cxf:bean:cmpwebEndpoint"/>       <choice>                <when>                   <simple>${in.header.operationName} == 'SendXml47001'</simple>                          <inOut uri="direct:sendXML"/>                </when>                       </choice>               </route>    <route id="outbound-sendMsg-XML" handleFault="true">                         <from uri="direct:sendXML"/>               <bean ref="addressManager" method="c2rSend"/>               <choice>                    <when>                         <simple>${in.header.addressType} == 'urn-email'</simple>                         <multicast strategyRef="multiReply"  parallelProcessing="true" >                         <pipeline>                                    <inOut uri="vmfEncoder"/>                               <inOut uri="transmitBom"/>                                <inOut uri="dbInjector"/>                                <inOut uri="outboundStatusHandler"/>                          </pipeline>                        <pipeline>                             <bean ref="mailSender" method="handler"/>                               <inOut uri="outboundStatusHandler"/>                       </pipeline>                           </multicast>                    </when>                    <when>                         <simple>${in.header.addressType} == 'urn'</simple>                         <inOut uri="vmfEncoder"/>                        <inOut uri="transmitBom"/>                        <inOut uri="dbInjector"/>                            <inOut uri="outboundStatusHandler"/>                    </when>                    <when>                         <simple>${in.header.addressType} == 'email'</simple>                         <inOut uri="mailSender"/>                         <inOut uri="dbInjector"/>                         <inOut uri="outboundStatusHandler"/>                    </when>               </choice>         </route>         </camel:camelContext>           <bean id="addressManager" class="mil.army.pmbc.cs.esb.msg.address.AddressManager" init-method="init">       <property name="config" ref="commonConfig"/>   </bean>   <bean id="vmfEncoder" class="mil.army.pmbc.cs.esb.msg.vmf.VMFEncoderProcessor">   </bean>       <bean id="mailQuery" class="mil.army.pmbc.cs.esb.msg.mail.CMPC2RMail_Query" init-method="init">          <property name="config" ref="commonConfig"/>   </bean>        <bean id="transmitBom" class="mil.army.pmbc.cs.esb.msg.transmit.Transmitter47001">               <property name="template" ref="producerTemplate"/>               <property name="config" ref="commonConfig"/>   </bean>     <bean id="commonConfig" class="mil.army.pmbc.cs.esb.msg.config.CommonConfig">               <property name="msgWebSrvAddress" value="$"/>

                          <property name="commonMailBoxFetchTime" value="$"/> 

                      <property name="transmitbomEndpoint" value="$"/>

                      <property name="mailServerName" value="$"/>

                      <property name="commonMailBoxUserName" value="$"/>

                      <property name="commonMailBoxUserPassword" value="$"/>         

                      <property name="mailSessionDebug" value="$"/>

                      <property name="MSGSTORE_DB_IP" value="$"/>

                       <property name="MSGSTORE_DB_PORT" value="$"/>

                       <property name="MSGSTORE_DB_USERNAME" value="$"/>

                       <property name="MSGSTORE_DB_PASSWORD" value="$"/>

                       <property name="MSGSTORE_DB_NAME" value="$"/>

                      <property name="csvmSubdomainName" value="$"/>

                      <property name="mailServerDomainName" value="$"/>

                       <property name="mailFunctionalityEnable" value="$"/>         

                       <property name="mailUseTLS" value="$"/> 

                       <property name="STATUS_PUBLISHED" value="$"/>      

              "strMsgBase64"</MsgBytes>" +

                           " </esb:transmitBomMsg>" +

                           "   </soapenv:Body>" +

                           " </soapenv:Envelope>");

                       return request.toString();

                 }

                  

                  

                 /**

                   

            • For testing purposes.

                   

            • Transmits the bytes of a bom file

                   

            • @param args

                   

            • @throws Exception

                  */

                 public static void main(String args[]) throws Exception

                 {

                      //Load the bytes

                      String strFile = "c:
            CmpTest
            K05.17.bom";

                      byte[] msgBytes = cmp.common.FileUtil.readBytes(strFile);

                       

                      Transmitter47001 transmitter = new Transmitter47001();

             

                      String strRequest = transmitter.prepareTransmitBomSoapRequest(msgBytes);

                       

                      System.out.println("Request:\n" + strRequest);

                 }

                       

            }

            • 3. Re: Cannot read entries in url: bundleresource:
              Claus Ibsen Master

              Have you tried restarting the ESB server?

               

              And can you list which camel bundles you have installed?

              osgi:list | grep camel

               

              Make sure camel-spring is installed.

               

              Did you upgrade the ESB from a previous version?

              Did it used to work before, or does it fail all the time?

               

              There is a newer release of Fuse ESB 4.3 you could consider to download and use

              http://fusesource.com/downloads/

               

              The issues seems that Camel tries to discover type converters as if it was not running in OSGi, eg it uses DefaultPackageScanClassResolver, where as there is a OSGi specific version of that, it ought to use.

              • 4. Re: Cannot read entries in url: bundleresource:
                Willem Jiang Master

                It's a debug message, the exception is thrown when camel can't load the url as a string.

                 

                I just checked the code of DefaultPackageScanClassResolver, it can't handle the bundleresource url, so you can ignore this message.

                 

                Willem