You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jose Correia2 <co...@gmail.com> on 2017/05/24 14:24:18 UTC

Camel-Beanio not finding Bean Class

Hi all,

I'm using apache-servicemix-7.0.0, and using camel-beanio with it (2.16.4).

So I have defined a route that calls beanio to parse a file.

However the Class that the records map to is in an external jar.

I have tried to wrap this external jar using:

https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/Deploying_into_the_Container/files/UrlHandlers-Wrap.html

and it makes it available.

But when I deploy my camel blueprint.xml it still throws:

"2017-05-24 15:57:51,566 | ERROR | mix-7.0.0/deploy | BlueprintCamelContext           
| 40 - org.apache.camel.
camel-blueprint - 2.16.4 | Error occurred during starting Camel:
CamelContext(_context1) due Invalid record 'r
ecord', in stream 'REALITY_FILE': Invalid bean class
'za.co.sci.core.shared.RealityFileRecordModel'
org.beanio.BeanIOConfigurationException: Invalid record 'record', in stream
'REALITY_FILE': Invalid bean class
 'za.co.sci.core.shared.RealityFileRecordModel'
        at
org.beanio.internal.compiler.ProcessorSupport.process(ProcessorSupport.java:93)[232:org.beanio:2.1.
0]
....
...
Caused by: java.lang.ClassNotFoundException:
za.co.sci.core.shared.RealityFileRecordModel not found by ESB-POC
 [257]
        at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1
574)[org.apache.felix.framework-5.6.1.jar:]

"

Any ideas how to make camel route find this class?

My blue print attached, and camel mapping xml attached:  REALITY_FILE.xml
<http://camel.465427.n5.nabble.com/file/n5800359/REALITY_FILE.xml>  

blueprint_-_Copy.xml
<http://camel.465427.n5.nabble.com/file/n5800359/blueprint_-_Copy.xml>  

Thanks
Jose



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Beanio-not-finding-Bean-Class-tp5800359.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-Beanio not finding Bean Class

Posted by Jose Correia2 <co...@gmail.com>.
Thanks Claus, I tried that and unfortunately same scenario still occurring
after I turned it on and removed my deploy and re-deployed it.

Regards,
Jose



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Beanio-not-finding-Bean-Class-tp5800359p5800619.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-Beanio not finding Bean Class

Posted by Claus Ibsen <cl...@gmail.com>.
You can try turn on dynamic import on camel-beanio, there is a
dev:dynamic-import command in karaf I think

On Wed, May 24, 2017 at 4:24 PM, Jose Correia2 <co...@gmail.com> wrote:
> Hi all,
>
> I'm using apache-servicemix-7.0.0, and using camel-beanio with it (2.16.4).
>
> So I have defined a route that calls beanio to parse a file.
>
> However the Class that the records map to is in an external jar.
>
> I have tried to wrap this external jar using:
>
> https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/Deploying_into_the_Container/files/UrlHandlers-Wrap.html
>
> and it makes it available.
>
> But when I deploy my camel blueprint.xml it still throws:
>
> "2017-05-24 15:57:51,566 | ERROR | mix-7.0.0/deploy | BlueprintCamelContext
> | 40 - org.apache.camel.
> camel-blueprint - 2.16.4 | Error occurred during starting Camel:
> CamelContext(_context1) due Invalid record 'r
> ecord', in stream 'REALITY_FILE': Invalid bean class
> 'za.co.sci.core.shared.RealityFileRecordModel'
> org.beanio.BeanIOConfigurationException: Invalid record 'record', in stream
> 'REALITY_FILE': Invalid bean class
>  'za.co.sci.core.shared.RealityFileRecordModel'
>         at
> org.beanio.internal.compiler.ProcessorSupport.process(ProcessorSupport.java:93)[232:org.beanio:2.1.
> 0]
> ....
> ...
> Caused by: java.lang.ClassNotFoundException:
> za.co.sci.core.shared.RealityFileRecordModel not found by ESB-POC
>  [257]
>         at
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1
> 574)[org.apache.felix.framework-5.6.1.jar:]
>
> "
>
> Any ideas how to make camel route find this class?
>
> My blue print attached, and camel mapping xml attached:  REALITY_FILE.xml
> <http://camel.465427.n5.nabble.com/file/n5800359/REALITY_FILE.xml>
>
> blueprint_-_Copy.xml
> <http://camel.465427.n5.nabble.com/file/n5800359/blueprint_-_Copy.xml>
>
> Thanks
> Jose
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Beanio-not-finding-Bean-Class-tp5800359.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2