I have just extracted a minimal example which demonstrates the issue: import org.apache.camel.CamelContext; import org.apache.camel.component.jms.JmsComponent; import org.apache.camel.impl.DefaultCamelContext;
import javax.jms.TopicConnectionFactory; import javax.naming.Context; import javax.naming.InitialContext; import java.util.Hashtable; public class DemonstrateBug { public static void main(String[] args) throws Exception { final CamelContext context = new DefaultCamelContext(); final Hashtable<String,String> env = new Hashtable<String,String>(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.tibco.tibjms.naming.TibjmsInitialContextFactory"); env.put(Context.PROVIDER_URL, "tcp://myjmsserver:65000"); env.put(Context.SECURITY_PRINCIPAL, "myprincipal"); env.put(Context.SECURITY_CREDENTIALS, "mycredentials"); final Context jndiContext = new InitialContext(env); final TopicConnectionFactory topicConnectionFactory = (TopicConnectionFactory) jndiContext.lookup("mytopicfactory"); context.addComponent("tibco", JmsComponent.jmsComponentAutoAcknowledge(topicConnectionFactory)); } } Compile this class with everything from the camel 2.4.0 lib directory (including the optional stuff) plus tibjms.jar, ojdbc14.jar and junit-4.4.jar (these are the same versions of the same jars I am using with 2.3.0 which don't contain any reference to Spring classes or jars). The last line of code throws: Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/transaction/PlatformTransactionManager at DemonstrateBug.main(DemonstrateBug.java:22) On Mon, Jul 19, 2010 at 10:20 PM, Ron Smith <ronsmit...@gmail.com> wrote: > I just double checked my classpath and rebuilt everything from scratch. > Definitely nothing from Spring 2.x included. > > > On Mon, Jul 19, 2010 at 8:52 PM, Willem Jiang <willem.ji...@gmail.com>wrote: > >> Hi, >> >> Camel 2.4.0 uses Spring 3.0.3 by default, please make sure your class path >> doesn't have any Spring 2.x jars. >> >> >> Willem >> ---------------------------------- >> Apache Camel, Apache CXF committer >> Open Source Integration http://www.fusesource.com >> Blog http://willemjiang.blogspot.com >> Tiwtter http://twitter.com/willemjiang >> >> Ron Smith wrote: >> >>> After moving from camel 2.3.0 to 2.4.0 I am getting the error: >>> >>> java.lang.ClassNotFoundException: >>> org.springframework.transaction.PlatformTransactionManager >>> >>> when I execute: >>> >>> context.addComponent("myjms", >>> JmsComponent.jmsComponentAutoAcknowledge(topicConnectionFactory)); >>> >>> I am including every JAR in the lib directory including the optional >>> ones. >>> This is code that was working in 2.3.0. >>> >>> >> >