In ACTIVEMQ_HOME/lib/optional there was the apache-camel-1.5.0.jar file. I removed it and things look much better. Only thing is that I am getting this warning from the DefaultConverter
WARN DefaultTypeConverter - Overriding type converter from: StaticMethodTypeConverter: public static java.lang.String org.apache.camel.converter.IOConverter.toString(javax.xml.transform.Source) throws javax.xml.transform.TransformerException,java.io.IOException to: InstanceMethodTypeConverter: public java.lang.String org.apache.camel.converter.jaxp.XmlConverter.toString(javax.xml.transform.Source) throws javax.xml.transform.TransformerException Thank you, Claus! Joe Claus Ibsen-2 wrote: > > On Mon, Mar 23, 2009 at 3:07 PM, Joe Fernandez > <[email protected]> wrote: >> >> I am using NetBeans 6.5 to build the jar file that contains my Route(s). >> I >> then deploy the jar file to $ACTIVEMQ_HOME/lib/optional. >> >> My Route package is com.foo.bar.myroutes, and so I add the following to >> the >> activemq xml cfg file. >> >> <camelContext id="camel" >> xmlns="http://activemq.apache.org/camel/schema/spring"> >> <package>com.foo.bar.myroutes</package> >> </camelContext> >> >> I then run activemq and it is during AMQ's startup that Camel hurls all >> these exceptions. Again, everything is fine as long as I don't add the >> 'size' parameter to my seda endpoint. >> >> I have added a couple of other jar files to $ACTIVEMQ_HOME/lib/optional, >> but >> they're not Camel-related. For example, I am using the JUEL. >> >> Thanks! >> Joe > Are you sure you do not have any camel-spring-integration.jar on the > classpath? > > This is the ERROR you get when Camel uses the type converter to > convert 10000 as a String to an Integer. > And this triggers Camel to initialize its type converter registry and > it has build in classpath discovery. > eg it will look in your classpath for classes that has the @Converter > annotation. And somehow it finds the > org.apache.camel.component.spring.integration.converter.SpringIntegrationConverter > class and then you get this ERROR since the actual spring integration > framework .jar is not in the classpath. > > Make sure you do not have the big .jar, eg camel.jar in the classpath. > > > > java.lang.NoClassDefFoundError: > org/springframework/integration/message/Message > >> >> >> >> Claus Ibsen-2 wrote: >>> >>> On Mon, Mar 23, 2009 at 2:02 PM, Joe Fernandez >>> <[email protected]> wrote: >>>> >>>> Thanks for the quick response. >>>> >>>> My maven project calls out the following Camel jar files, which are >>>> also >>>> found in ACTIVEMQ_HOME/lib >>>> >>>> camel-core-1.5.0, camel-spring-1.5.0, and camel-jms-1.5.0 >>>> >>>> Should this be okay? >>> Yeah that is fine with only these 3 camel .jars. >>> >>> But you better double check your classpath when you run your project >>> as could have other non wanted .jars in there, eg. such as >>> camel-spring-integration.jar. >>> >>> If your project is maven based, then you can run: >>> mvn dependency:list >>> >>> To see which .jars get pulled in. >>> >>> You also need the activemq-camel.jar in the class path to integrate >>> AMQ with Camel properly. >>> And make sure you use the AMQ component with Camel for JMS messaging >>> and not the generic JMS component. >>> http://camel.apache.org/activemq.html >>> >>> >>> BTW: How do you run your project? >>> >>> >>>> >>>> Joe >>>> >>>> >>>> >>>> Claus Ibsen-2 wrote: >>>>> >>>>> Hi >>>>> >>>>> Which camel jar(s) are you using? >>>>> - maven >>>>> - the big camel.jar >>>>> - or many smaller .jars >>>>> >>>>> The exception is looking for Spring Integration Framework. >>>>> If you use the big camel .jar then it will look for all sorts of 3rd >>>>> party frameworks when starting up as the type converters can convert >>>>> to said framework. See FAQ: >>>>> http://camel.apache.org/why-do-camel-throw-so-many-noclassdeffoundexception-on-startup.html >>>>> >>>>> It is discouraged to use the single big .jar file, but instead use >>>>> what you need. >>>>> camel-core.jar, camel-spring.jar etc. >>>>> >>>>> The size parameter should be okay. >>>>> >>>>> >>>>> On Mon, Mar 23, 2009 at 1:30 PM, Joe Fernandez >>>>> <[email protected]> wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> I am using Camel 1.5 and embedding Routes within ActiveMQ 5.2. When I >>>>>> assign >>>>>> one of my Routes a seda endpoint with a size parameter, Camel hurls >>>>>> lots >>>>>> and >>>>>> lots of exceptions. It appears to be searching for a suitable type >>>>>> converter >>>>>> (String to Integer) w/out any luck. ActiveMQ does start, but my Route >>>>>> doesn't work properly. All I have to do is take out the size >>>>>> parameter >>>>>> and >>>>>> everything is cool. >>>>>> >>>>>> Below is an example of a Route that results in the exceptions and one >>>>>> of >>>>>> the >>>>>> exceptions. I checked JIRA, but couldn't find a similar scenario. Am >>>>>> I >>>>>> doing >>>>>> something wrong? >>>>>> >>>>>> Thanks - Joe >>>>>> >>>>>> public void configure() { >>>>>> from("seda:foo").to("seda:bar?size=10000"); >>>>>> from("seda:bar").to("mock:end:"); >>>>>> } >>>>>> >>>>>> java.lang.NoClassDefFoundError: >>>>>> org/springframework/integration/message/Message >>>>>> at java.lang.Class.getDeclaredMethods0(Native Method) >>>>>> at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) >>>>>> at java.lang.Class.getDeclaredMethods(Class.java:1763) >>>>>> at >>>>>> org.apache.camel.impl.converter.AnnotationTypeConverterLoader.loadConverterMethods(AnnotationTypeConverterLoader.java:138) >>>>>> at >>>>>> org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:72) >>>>>> at >>>>>> org.apache.camel.impl.converter.DefaultTypeConverter.checkLoaded(DefaultTypeConverter.java:246) >>>>>> at >>>>>> org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:89) >>>>>> at >>>>>> org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:65) >>>>>> at >>>>>> org.apache.camel.util.CamelContextHelper.convertTo(CamelContextHelper.java:118) >>>>>> at >>>>>> org.apache.camel.impl.DefaultComponent.convertTo(DefaultComponent.java:208) >>>>>> at >>>>>> org.apache.camel.impl.DefaultComponent.getAndRemoveParameter(DefaultComponent.java:288) >>>>>> at >>>>>> org.apache.camel.component.seda.SedaComponent.createQueue(SedaComponent.java:36) >>>>>> at >>>>>> org.apache.camel.component.seda.SedaEndpoint.<init>(SedaEndpoint.java:49) >>>>>> at >>>>>> org.apache.camel.component.seda.SedaComponent.createEndpoint(SedaComponent.java:42) >>>>>> at >>>>>> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:81) >>>>>> at >>>>>> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:330) >>>>>> at >>>>>> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:53) >>>>>> at >>>>>> org.apache.camel.model.RouteType.resolveEndpoint(RouteType.java:99) >>>>>> at >>>>>> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106) >>>>>> at >>>>>> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112) >>>>>> at >>>>>> org.apache.camel.model.ToType.resolveEndpoint(ToType.java:83) >>>>>> at >>>>>> org.apache.camel.model.ToType.createProcessor(ToType.java:77) >>>>>> at >>>>>> org.apache.camel.model.ProcessorType.createOutputsProcessor(ProcessorType.java:1706) >>>>>> at >>>>>> org.apache.camel.model.ProcessorType.createOutputsProcessor(ProcessorType.java:95) >>>>>> at >>>>>> org.apache.camel.model.InterceptorRef.createProcessor(InterceptorRef.java:66) >>>>>> at >>>>>> org.apache.camel.model.ProcessorType.makeProcessor(ProcessorType.java:1590) >>>>>> at >>>>>> org.apache.camel.model.ProcessorType.addRoutes(ProcessorType.java:99) >>>>>> at >>>>>> org.apache.camel.model.RouteType.addRoutes(RouteType.java:220) >>>>>> at >>>>>> org.apache.camel.model.RouteType.addRoutes(RouteType.java:89) >>>>>> at >>>>>> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:639) >>>>>> at >>>>>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:631) >>>>>> at >>>>>> org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:167) >>>>>> at >>>>>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:162) >>>>>> at >>>>>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47) >>>>>> at >>>>>> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:97) >>>>>> at >>>>>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:116) >>>>>> at >>>>>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78) >>>>>> at >>>>>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) >>>>>> at >>>>>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76) >>>>>> at >>>>>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:275) >>>>>> at >>>>>> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:737) >>>>>> at >>>>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:384) >>>>>> at >>>>>> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64) >>>>>> at >>>>>> org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52) >>>>>> -- >>>>>> View this message in context: >>>>>> http://www.nabble.com/Exceptions-thrown-when-seda-given-a-size-parameter-tp22659205p22659205.html >>>>>> Sent from the Camel - Users (activemq) mailing list archive at >>>>>> Nabble.com. >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Claus Ibsen >>>>> Apache Camel Committer >>>>> >>>>> Open Source Integration: http://fusesource.com >>>>> Blog: http://davsclaus.blogspot.com/ >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Exceptions-thrown-when-seda-given-a-size-parameter-tp22659205p22659695.html >>>> Sent from the Camel - Users (activemq) mailing list archive at >>>> Nabble.com. >>>> >>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> Apache Camel Committer >>> >>> Open Source Integration: http://fusesource.com >>> Blog: http://davsclaus.blogspot.com/ >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Exceptions-thrown-when-seda-given-a-size-parameter-tp22659205p22660826.html >> Sent from the Camel - Users (activemq) mailing list archive at >> Nabble.com. >> >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > > -- View this message in context: http://www.nabble.com/Exceptions-thrown-when-seda-given-a-size-parameter-tp22659205p22662343.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
