Taariq is right, java.lang.NoSuchMethodError indicate this most of the
time..

Best,

Christian
-----------------

Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Wed, Jan 8, 2014 at 9:01 AM, Taariq Levack <taar...@gmail.com> wrote:

> You have a version mismatch, camel-core-2.12.2 is being used with
> camel-jms-2.9.2
>
> Taariq
>
>
> On Wed, Jan 8, 2014 at 8:47 AM, contactreji <contactr...@gmail.com> wrote:
>
> > Hi
> >
> > I was trying to do some encryption exercises. Once the message is
> > decrypted,
> > I am unable to store the result into a ActiveMQ Queue.
> >
> > Would be really helpful if someone can suggest a fix. The encryption and
> > decryption are successfully working.
> >
> > My Camel Routes are as follows:
> >
> > *<?xml version="1.0" encoding="UTF-8"?>
> >
> >
> > <beans xmlns="http://www.springframework.org/schema/beans";
> >         xmlns:camel="http://camel.apache.org/schema/spring";
> > xmlns:crypt="http://springcryptoutils.com/schema/crypt";
> >         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xmlns:amq="http://activemq.apache.org/schema/core";
> >         xsi:schemaLocation="
> >        http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans.xsd
> >        http://camel.apache.org/schema/spring
> > http://camel.apache.org/schema/spring/camel-spring.xsd
> >        http://activemq.apache.org/schema/core
> > http://activemq.apache.org/schema/core/activemq-core.xsd
> >        http://springcryptoutils.com/schema/crypt
> > http://springcryptoutils.com/schema/crypt.xsd";>
> >
> >
> >
> >
> >
> >         <bean id="activemq"
> > class="org.apache.activemq.camel.component.ActiveMQComponent">
> >                 <property name="brokerURL"
> > value="failover:tcp://localhost:61620" />
> >                 <property name="userName" value="admin" />
> >                 <property name="password" value="admin" />
> >         </bean>
> >
> >         <crypt:keystore id="keyStore" location="classpath:shared.jceks"
> >                 password="sharedKeystorePassword" type="JCEKS" />
> >
> >         <crypt:secretKey id="secretKey" keystore-ref="keyStore"
> >                 alias="shared" password="sharedKeyPassword" />
> >
> >         <camelContext xmlns="http://camel.apache.org/schema/spring";>
> >                 <dataFormats>
> >                         <crypto id="sharedKeyCrypto" algorithm="DES"
> > keyRef="secretKey" />
> >                 </dataFormats>
> >
> >                 <route streamCache="true">
> >                         <from uri="activemq:inputToEncrypt" />
> >                         <log message="Encrypting message" />
> >                         <marshal ref="sharedKeyCrypto" />
> >                         <log message="Message encrypted: ${body}" />
> >
> >                         <to uri="seda:decrypt" />
> >
> >                 </route>
> >
> >                 <route>
> >                         <from uri="seda:decrypt" />
> >                         <log message="Decrypting message" />
> >
> >                         <unmarshal ref="sharedKeyCrypto" />
> >                         <log message="Message decrypted: ${body}" />
> >                         <to uri="activemq:decryptedMessages" />
> >                 </route>
> >
> >         </camelContext>
> >
> > </beans>*
> >
> >
> >
> > The Exception which is thrown with stack trace is as follows
> > *
> > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> > SLF4J: Defaulting to no-operation (NOP) logger implementation
> > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
> further
> > details.
> > [INFO] Scanning for projects...
> > [INFO]
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Building ActiveMQ embedded with Camel 1.0.0-SNAPSHOT
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO]
> > [INFO] >>> camel-maven-plugin:2.10.0.redhat-60024:run (default-cli) @
> > camel-activemq >>>
> > [INFO]
> > [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
> > camel-activemq ---
> > [INFO] Using 'UTF-8' encoding to copy filtered resources.
> > [INFO] Copying 4 resources
> > [INFO]
> > [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
> > camel-activemq ---
> > [INFO] Nothing to compile - all classes are up to date
> > [INFO]
> > [INFO] --- maven-resources-plugin:2.4.3:testResources
> > (default-testResources) @ camel-activemq ---
> > [INFO] Using 'UTF-8' encoding to copy filtered resources.
> > [INFO] Copying 0 resource
> > [INFO]
> > [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile)
> @
> > camel-activemq ---
> > [INFO] Nothing to compile - all classes are up to date
> > [INFO]
> > [INFO] <<< camel-maven-plugin:2.10.0.redhat-60024:run (default-cli) @
> > camel-activemq <<<
> > [INFO]
> > [INFO] --- camel-maven-plugin:2.10.0.redhat-60024:run (default-cli) @
> > camel-activemq ---
> > [INFO] Using org.apache.camel.spring.Main to initiate a CamelContext
> > [pache.camel.spring.Main.main()] MainSupport                    INFO
> >  Apache
> > Camel 2.12.2 starting
> > [pache.camel.spring.Main.main()] ClassPathXmlApplicationContext INFO
> > Refreshing
> > org.springframework.context.support.ClassPathXmlApplicationContext@de643a
> :
> > startup date [Wed Jan 08 12:11:20 IST 2014]; root of context hierarchy
> > [pache.camel.spring.Main.main()] XmlBeanDefinitionReader        INFO
> > Loading XML bean definitions from file
> >
> >
> [C:\Users\re267981\workspace\camel-security-exchangeEncryption\target\classes\META-INF\spring\camel-context.xml]
> > [pache.camel.spring.Main.main()] DefaultListableBeanFactory     INFO
> > Pre-instantiating singletons in
> >
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@1007e44
> > :
> > defining beans
> >
> >
> [activemq,keyStore,secretKey,template,consumerTemplate,camel-1:beanPostProcessor,camel-1];
> > root of factory hierarchy
> > [pache.camel.spring.Main.main()] SpringCamelContext             INFO
> >  Apache
> > Camel 2.12.2 (CamelContext: camel-1) is starting
> > [pache.camel.spring.Main.main()] ManagedManagementStrategy      INFO  JMX
> > is
> > enabled
> > [pache.camel.spring.Main.main()] DefaultTypeConverter           INFO
> >  Loaded
> > 179 type converters
> > [pache.camel.spring.Main.main()] SedaEndpoint                   INFO
> > Endpoint Endpoint[seda://decrypt] is using shared queue: seda://decrypt
> > with
> > size: 2147483647
> > [pache.camel.spring.Main.main()] DefaultStreamCachingStrategy   INFO
> > StreamCaching in use with spool directory:
> >
> >
> C:\Users\re267981\AppData\Local\Temp\camel\camel-tmp-5b530a9c-5f14-4b36-bcd6-c5379d2fdc93
> > and rules: [Spool > 128K body size]
> > [               ActiveMQ Task-1] FailoverTransport              INFO
> > Successfully connected to tcp://localhost:61620
> > [pache.camel.spring.Main.main()] SpringCamelContext             INFO
> >  Route:
> > route1 started and consuming from: Endpoint[activemq://inputToEncrypt]
> > [pache.camel.spring.Main.main()] SpringCamelContext             INFO
> >  Route:
> > route2 started and consuming from: Endpoint[seda://decrypt]
> > [pache.camel.spring.Main.main()] SpringCamelContext             INFO
>  Total
> > 2 routes, of which 2 is started.
> > [pache.camel.spring.Main.main()] SpringCamelContext             INFO
> >  Apache
> > Camel 2.12.2 (CamelContext: camel-1) started in 0.859 seconds
> > [ - JmsConsumer[inputToEncrypt]] route1                         INFO
> > Encrypting message
> > [ - JmsConsumer[inputToEncrypt]] route1                         INFO
> > Message encrypted: ? U????# ?ts LNa!#_/ZJ???????????? ?$?>N,?]C??}??
> > [-1) thread #1 - seda://decrypt] route2                         INFO
> > Decrypting message
> > [-1) thread #1 - seda://decrypt] route2                         INFO
> > Message decrypted: This is my Sample Input Message
> > [               ActiveMQ Task-2] FailoverTransport              INFO
> > Successfully connected to tcp://localhost:61620
> > [-1) thread #1 - seda://decrypt] SedaConsumer                   WARN
>  Error
> > processing exchange. Exchange[JmsMessage[JmsMessageID:
> > ID:D-113043114-50220-1389161589019-3:2:1:1:22]]. Caused by:
> > [java.lang.NoSuchMethodError -
> >
> >
> org.apache.camel.util.ObjectHelper.notNull(Ljava/lang/Object;Ljava/lang/String;)V]
> > java.lang.NoSuchMethodError:
> >
> >
> org.apache.camel.util.ObjectHelper.notNull(Ljava/lang/Object;Ljava/lang/String;)V
> >         at
> >
> >
> org.apache.camel.component.jms.JmsBinding.makeJmsMessage(JmsBinding.java:283)[camel-jms-2.9.2.jar:2.9.2]
> >         at
> >
> >
> org.apache.camel.component.jms.JmsProducer$2.createMessage(JmsProducer.java:235)[camel-jms-2.9.2.jar:2.9.2]
> >         at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:212)[camel-jms-2.9.2.jar:2.9.2]
> >         at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:155)[camel-jms-2.9.2.jar:2.9.2]
> >         at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$3.doInJms(JmsConfiguration.java:189)[camel-jms-2.9.2.jar:2.9.2]
> >         at
> >
> >
> org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466)[spring-jms-3.0.7.RELEASE.jar:3.0.7.RELEASE]
> >         at
> >
> >
> org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:186)[camel-jms-2.9.2.jar:2.9.2]
> >         at
> >
> >
> org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:359)[camel-jms-2.9.2.jar:2.9.2]
> >         at
> >
> >
> org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:313)[camel-jms-2.9.2.jar:2.9.2]
> >         at
> >
> >
> org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:111)[camel-jms-2.9.2.jar:2.9.2]
> >         at
> >
> >
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)[camel-core-2.12.2.jar:2.12.2]
> >         at
> >
> >
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.2.jar:2.12.2]
> >         at
> >
> >
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.2.jar:2.12.2]
> >         at
> >
> >
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.2.jar:2.12.2]
> >         at
> >
> >
> org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.12.2.jar:2.12.2]
> >         at
> >
> >
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.12.2.jar:2.12.2]
> >         at
> >
> >
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.2.jar:2.12.2]
> >         at
> >
> >
> org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291)[camel-core-2.12.2.jar:2.12.2]
> >         at
> >
> >
> org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200)[camel-core-2.12.2.jar:2.12.2]
> >         at
> >
> >
> org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147)[camel-core-2.12.2.jar:2.12.2]
> >         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
> > Source)[:1.7.0_45]
> >         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> > Source)[:1.7.0_45]
> >         at java.lang.Thread.run(Unknown Source)[:1.7.0_45]
> >
> > *
> >
> >
> > Cheers
> >
> > Reji Mathews
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-Security-Framework-ActiveMQ-Store-error-tp5745719.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>

Reply via email to