Hi See also the FAQ http://camel.apache.org/how-do-i-use-a-big-uber-jar.html
2011/6/16 Alp Timurhan Çevik <[email protected]>: > Found the problem... > > We are using maven shade plugin to get a fat jar. During fat jar generation, > the files within the META-INF are overriden by the same named files, one of > which is TypeConverter. > > The camel-core TypeConverter overrides the camel-cxf type converter, and > > org.apache.camel.converter > > org.apache.camel.component.bean > > org.apache.camel.component.file > > including one overrides the > > org.apache.camel.component.cxf.converter > > one. > > The result was, instead of using cxf typeconverters, camel was using > standart simple string converter, which converts using to string method, > producing an invalid xml. Introducing the cxf ones back solved the problem. > > > So combining them together > > > org.apache.camel.converter > org.apache.camel.component.bean > org.apache.camel.component.file > org.apache.camel.component.cxf.converter > > within the META-INF/services/org/apache/camel/TypeConverter did the trick. > Could be done manually, but the best way is using transformers within the > shade artifact such as > > <transformer > implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> > <resource>META-INF/services/org/apache/camel/TypeConverter</resource> > </transformer> > > Best wishes, > Alp > > > 2011/6/16 Alp Timurhan Çevik <[email protected]> > >> urgent help needed :) >> >> I am experiencing this very weird behaviour regarding convertbodyto. >> >> I am using xsl to transform some legacy web service calls through cxf >> component (payload) and transforming them using xsl such as: >> >> <camel:route id="..."> >> <camel:from ref="v1" /> >> <convertBodyTo type="java.lang.String" /> >> <camel:to uri="file://first.log"/> >> <camel:to uri="xslt://a.xsl" /> >> <camel:to ref="v2" /> >> <camel:to uri="b.xsl" /> >> </camel:route> >> >> this worked quite well in eclipse, but after having it built with hudson >> using maven, the same route produced content not allowed in prolog message. >> Looking at the first.log files, I noticed the working one has >> <anyxmltag>sdlkjlkj</anyxmltag> >> >> whereas the maven built one has >> >> org.apache.camel.component.cxf.CxfPayload headers: []body: [ [ >> >> prior to <anyxmltag>sdlkjlkj</anyxmltag> >> >> which I think is causing the problem. >> >> What could be the problem ? old dependencies etc. ? xml configuration files >> ? Any idea ? >> >> Thanks a lot, >> Alp >> >> >> >> >> >> >> >> > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
