camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caspar MacRae (JIRA)" <>
Subject [jira] Created: (CAMEL-3341) ProxyHelper and JMS component - need to start producer or fails with NPE
Date Wed, 17 Nov 2010 12:03:24 GMT
ProxyHelper and JMS component - need to start producer or fails with NPE

                 Key: CAMEL-3341
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core, camel-jms
    Affects Versions: 2.5.0
         Environment: linux (debian) 2.6, maven 2.2.1, pax-exam 1.2.2 (using latest felix
and equinox)
            Reporter: Caspar MacRae
         Attachments: ProxyHelper.diff

I've a very simple unit test (based on that
works fine when using endpoint uri "direct:start" but fails with the following exception when
using "activemq:somequeue"

	at org.apache.camel.component.jms.JmsProducer.processInOut(
	at org.apache.camel.component.jms.JmsProducer.process(
	at org.apache.camel.util.AsyncProcessorHelper.process(
	at org.apache.camel.impl.DefaultAsyncProducer.process(
	at org.apache.camel.component.bean.CamelInvocationHandler.invoke(
	at $Proxy7.sayWordTo(Unknown Source)
	at net.earcam.cdosgi.remoteserviceadmin.CamelProxyTest.simpleArgTest(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(
	at org.junit.runners.ParentRunner$
	at org.junit.runners.ParentRunner$1.schedule(
	at org.junit.runners.ParentRunner.runChildren(
	at org.junit.runners.ParentRunner.access$000(
	at org.junit.runners.ParentRunner$2.evaluate(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(

Looks like the problem is simply that the producer isn't started so never creates a UuidGenerator
(needed for the JMS Reply-To)

org.apache.camel.component.bean.ProxyHelper - lines 45 - 51, needs to start producer (for
     * Creates a Proxy which sends PojoExchange to the endpoint.
    public static <T> T createProxy(Endpoint endpoint, ClassLoader cl, Class[] interfaces,
MethodInfoCache methodCache) throws Exception {
        return (T) createProxyObject(endpoint, endpoint.createProducer(), cl, interfaces,

As a workaround, simply create the producer, start it and use the overloaded method createProxy
that takes a producer parameter.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message