Hi Claus, thanks for your reply and your input. I'll try to come up with a solution, maybe a quick workaround to start with, and post my findings.
Maruan Sahyoun Am 15.09.2012 um 08:32 schrieb Claus Ibsen <[email protected]>: > On Fri, Sep 14, 2012 at 9:41 AM, Maruan Sahyoun <[email protected]> > wrote: >> I should have mentioned that I did as you suggested using features:install >> for camel and camel-fop (as well as camel-blueprint etc.) >> > > Yeah I am not sure what to do than other than digging into it, there > may be some of the OSGi bundles that needs to have their MANIFEST.MF > files tweaked to get them working properly. > > But also the FOP library itself may do some class-loading tricks that > don't work well with OSGi. And then its often harder to get working. > > Another approach that people have done is to put together an uber JAR > with all the smaller JARs and then deploy that (for example with wrap) > then that seems to work. Although that goes against the idea of OSGi > modularity and bundles a bit. > > And possibly there may be FAB which could make it work. For example > people using Hibernate get this working much easier with FAB; > Hibernate being one of the toughest piece to get working with OSGi. > http://www.davsclaus.com/2012/08/osgi-deployment-made-easy-with-fab.html > > At the Apache communities we love help and contributions, so if you > got the need and time for FOP, then we would love help with getting > the camel-fop feature to run out of the box in the Apache products. > >> >> >> Am 14.09.2012 um 09:36 schrieb Claus Ibsen: >> >>> Hi >>> >>> If you use Karaf / SMX then there is a camel-fop feature you can use >>> to install. That is the recommended approach for installing Camel >>> components. >>> >>> features:install camel >>> features:install camel-fop >>> >>> Though the camel-fop feature may not yet 100% work. As you say below, >>> classloading from non-OSGi friendly JARs is not easy to get working >>> seamless with OSGi. >>> >>> >>> On Fri, Sep 14, 2012 at 9:32 AM, Maruan Sahyoun <[email protected]> >>> wrote: >>>> I installed the dependencies via osgi:install from that repository which >>>> enabled the Camel route to deploy (defined via Blueprint xml). But when I >>>> tried to submit data I got the error >>>> >>>> java.lang.UnsupportedOperationException: Don't know how to handle >>>> "application/pdf" as an output format. Neither an FOEventHandler, nor a >>>> Renderer could be found for this output format. >>>> at >>>> org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:361)[72:org.apache.servicemix.bundles.fop:1.0.0.2] >>>> >>>> So I think it doesn't find the Renderers. As far as I understand the >>>> mechanism fop is using for getting it's renderers it depends on Java class >>>> loading. >>>> >>>> Maruan >>>> >>>> >>>> Am 14.09.2012 um 09:24 schrieb Claus Ibsen: >>>> >>>>> On Fri, Sep 14, 2012 at 9:19 AM, Maruan Sahyoun <[email protected]> >>>>> wrote: >>>>>> OK - some further testing shows that camel-fop works fine if you run >>>>>> camel standalone. So the issue is when running inside an OSGI container. >>>>>> I'll do some more investigation. Is there someone around using camel-fop >>>>>> inside Karaf or ServiceMix? Any hints? >>>>>> >>>>>> Thanks for all the help so far. I'm very glad that I found Camel - nice >>>>>> piece of software and very helpful community. >>>>>> >>>>> >>>>> I think some of the FOP JARs and its dependencies is being created as >>>>> OSGi wrapped bundles, which will get published to the maven repo at >>>>> http://repo2.maven.org/maven2/org/apache/servicemix/bundles/ >>>>> >>>>> >>>>> >>>>>> Maruan Sahyoun >>>>>> >>>>>> >>>>>> Am 10.09.2012 um 13:12 schrieb Charles Moulliard: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> Have you deployed the bundle of Apache XMLGraphics ? >>>>>>> >>>>>>> Regards, >>>>>>> >>>>>>> Charles >>>>>>> >>>>>>> On Mon, Sep 10, 2012 at 10:38 AM, Maruan Sahyoun >>>>>>> <[email protected]>wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I'm trying to use camel-fop from within Apache Karaf. But I'm getting >>>>>>>> an >>>>>>>> error message about a missing class >>>>>>>> Caused by: java.lang.NoClassDefFoundError: >>>>>>>> org/apache/xmlgraphics/image/loader/ImageContext >>>>>>>> >>>>>>>> Apache Karaf is 2.29 >>>>>>>> Apache Camel is 2.10.0 (I also tried 2.10.1) >>>>>>>> >>>>>>>> features installed are camel-core, camel-blueprint, camel-fop >>>>>>>> >>>>>>>> Did anyone experience the same issue? >>>>>>>> >>>>>>>> Thanks for your help >>>>>>>> >>>>>>>> Maureen >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Charles Moulliard >>>>>>> Apache Committer / Sr. Pr. Consultant at FuseSource.com >>>>>>> Twitter : @cmoulliard >>>>>>> Blog : http://cmoulliard.blogspot.com >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Claus Ibsen >>>>> ----------------- >>>>> FuseSource >>>>> Email: [email protected] >>>>> Web: http://fusesource.com >>>>> Twitter: davsclaus, fusenews >>>>> Blog: http://davsclaus.com >>>>> Author of Camel in Action: http://www.manning.com/ibsen >>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> ----------------- >>> FuseSource >>> Email: [email protected] >>> Web: http://fusesource.com >>> Twitter: davsclaus, fusenews >>> Blog: http://davsclaus.com >>> Author of Camel in Action: http://www.manning.com/ibsen >> > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: [email protected] > Web: http://fusesource.com > Twitter: davsclaus, fusenews > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen
