Re: NoClassDefFoundError for unrelated classes
Hi Thanks for reporting. I created an entry in FAQ http://cwiki.apache.org/confluence/display/CAMEL/Why+do+Camel+throw+so+many+NoClassDefFoundException+on+startup On Fri, Feb 27, 2009 at 11:26 PM, Bob Pollack robert_h_poll...@yahoo.com wrote: Just FYI, this behavior was probably triggered by your query string (?period=6). I have written a long post on this problem, at http://www.nabble.com/More-info-on-class-not-found-exception-tt22086106.html#a22086106, which I can't seem to post to this mailing list. I'll add your workaround (don't use the big jar) to this post. Several people have posted this problem, in various forms. Perhaps the Camel documentation should include a caution about what you can expect to see with the big jar. From: skappel skap...@finobra.com To: camel-u...@activemq.apache.org Sent: Friday, February 27, 2009 12:17:51 PM Subject: Re: NoClassDefFoundError for unrelated classes Solution: do not use the apache-camel jar. Use camel-core and only the jars used in the application. These warning still appear: WARNING: Could not find class 'org/apache/activemq/camel/converter/InvokeJmsMessageListenerTest.class' WARNING: Could not find class 'org/apache/activemq/camel/converter/InvokeMessageListenerTest.class' This is caused by activemq-all-5.1.0.jar. Both classes have a space between Listener and Test, causing a mismatch. skappel wrote: The Timer or Quartz components and DSL as in: from(timer://foo?period=6) appear to generate NoClassDefFoundError and ClassNotFound exceptions for unrelated components, such as Scala, Mina, Http,etc. There are also many warnings with org.apache.camel.util.ResolverUtil addIfMatching. The timers do function, and the exceptions and warnings go away if parameters in the URI are removed. How do you make this Camel happy? -- View this message in context: http://www.nabble.com/NoClassDefFoundError-for-unrelated-classes-tp22239685p22250210.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/
Re: NoClassDefFoundError for unrelated classes
2009/2/27 skappel skap...@finobra.com: The Timer or Quartz components and DSL as in: from(timer://foo?period=6) appear to generate NoClassDefFoundError and ClassNotFound exceptions for unrelated components, such as Scala, Mina, Http,etc. There are also many warnings with org.apache.camel.util.ResolverUtil addIfMatching. The timers do function, and the exceptions and warnings go away if parameters in the URI are removed. How do you make this Camel happy? BTW you often get warnings when using the big uber apache-camel. If you use the individual modules from maven/ivy such as camel-quartz or camel-mina, they know their exact dependencies so you don't get ClassNotFound exceptions. If you don't use maven or ivy and want to know the dependencies of each module you want to use you can use the generated maven site to view them... http://camel.apache.org/maven/ e.g. http://camel.apache.org/maven/camel-mina/dependencies.html http://camel.apache.org/maven/camel-quartz/dependencies.html Though using your IDE/maven/ivy to resolve them removes all the manual error prone work; particularly as these dependencies typically change version with each release. -- James --- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/
Re: NoClassDefFoundError for unrelated classes
Hi Ah yeah the uber .jar I forgot about that one. Imagine how big your classpath would be if you had to add all the .jars for all components they use :) On Fri, Feb 27, 2009 at 11:21 AM, James Strachan james.strac...@gmail.com wrote: 2009/2/27 skappel skap...@finobra.com: The Timer or Quartz components and DSL as in: from(timer://foo?period=6) appear to generate NoClassDefFoundError and ClassNotFound exceptions for unrelated components, such as Scala, Mina, Http,etc. There are also many warnings with org.apache.camel.util.ResolverUtil addIfMatching. The timers do function, and the exceptions and warnings go away if parameters in the URI are removed. How do you make this Camel happy? BTW you often get warnings when using the big uber apache-camel. If you use the individual modules from maven/ivy such as camel-quartz or camel-mina, they know their exact dependencies so you don't get ClassNotFound exceptions. If you don't use maven or ivy and want to know the dependencies of each module you want to use you can use the generated maven site to view them... http://camel.apache.org/maven/ e.g. http://camel.apache.org/maven/camel-mina/dependencies.html http://camel.apache.org/maven/camel-quartz/dependencies.html Though using your IDE/maven/ivy to resolve them removes all the manual error prone work; particularly as these dependencies typically change version with each release. -- James --- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/ -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/
Re: NoClassDefFoundError for unrelated classes
Just FYI, this behavior was probably triggered by your query string (?period=6). I have written a long post on this problem, at http://www.nabble.com/More-info-on-class-not-found-exception-tt22086106.html#a22086106, which I can't seem to post to this mailing list. I'll add your workaround (don't use the big jar) to this post. Several people have posted this problem, in various forms. Perhaps the Camel documentation should include a caution about what you can expect to see with the big jar. From: skappel skap...@finobra.com To: camel-u...@activemq.apache.org Sent: Friday, February 27, 2009 12:17:51 PM Subject: Re: NoClassDefFoundError for unrelated classes Solution: do not use the apache-camel jar. Use camel-core and only the jars used in the application. These warning still appear: WARNING: Could not find class 'org/apache/activemq/camel/converter/InvokeJmsMessageListenerTest.class' WARNING: Could not find class 'org/apache/activemq/camel/converter/InvokeMessageListenerTest.class' This is caused by activemq-all-5.1.0.jar. Both classes have a space between Listener and Test, causing a mismatch. skappel wrote: The Timer or Quartz components and DSL as in: from(timer://foo?period=6) appear to generate NoClassDefFoundError and ClassNotFound exceptions for unrelated components, such as Scala, Mina, Http,etc. There are also many warnings with org.apache.camel.util.ResolverUtil addIfMatching. The timers do function, and the exceptions and warnings go away if parameters in the URI are removed. How do you make this Camel happy? -- View this message in context: http://www.nabble.com/NoClassDefFoundError-for-unrelated-classes-tp22239685p22250210.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
NoClassDefFoundError for unrelated classes
The Timer or Quartz components and DSL as in: from(timer://foo?period=6) appear to generate NoClassDefFoundError and ClassNotFound exceptions for unrelated components, such as Scala, Mina, Http,etc. There are also many warnings with org.apache.camel.util.ResolverUtil addIfMatching. The timers do function, and the exceptions and warnings go away if parameters in the URI are removed. How do you make this Camel happy? -- View this message in context: http://www.nabble.com/NoClassDefFoundError-for-unrelated-classes-tp22239685p22239685.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
Re: NoClassDefFoundError for unrelated classes
On Fri, Feb 27, 2009 at 6:07 AM, skappel skap...@finobra.com wrote: The Timer or Quartz components and DSL as in: from(timer://foo?period=6) appear to generate NoClassDefFoundError and ClassNotFound exceptions for unrelated components, such as Scala, Mina, Http,etc. There are also many warnings with org.apache.camel.util.ResolverUtil addIfMatching. The timers do function, and the exceptions and warnings go away if parameters in the URI are removed. How do you make this Camel happy? Hi At what level do they occur in the log? It should be DEBUG/TRACE. It would help a lot of you provided the stacktraces. What version are you using. And which classes do you have in classpath. And does it only occur at initialization or at every time event? But its odd that they go away with or without parameters? Can you show an example with warnings And an example without warnings. And which classes do you have on the classpath, or what are you maven deps. -- View this message in context: http://www.nabble.com/NoClassDefFoundError-for-unrelated-classes-tp22239685p22239685.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/