camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Wein (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10549) NullPointerException when trying to process response from bridged http jetty endpoint
Date Fri, 02 Dec 2016 12:19:58 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-10549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15714982#comment-15714982
] 

Frank Wein commented on CAMEL-10549:
------------------------------------

Additional comment: On http://localhost:8888 I'm running another REST webservice that is responding
to the HTTP request.

Code used to test this:
{noformat}
        getContext().addComponent("activemq",
                ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false"));

        restConfiguration().component("jetty").host("0.0.0.0").port(8080)
                .dataFormatProperty("prettyPrint", "true");

rest("/API/").get("/{ID}/").to("direct:objectGet");

from("direct:objectGet").to(ExchangePattern.InOut, "activemq:ossbss");

from("activemq:test").setHeader(Exchange.HTTP_PATH, simple("/Webservice/${header.ID}"))
        .to("jetty://http://localhost:8888?bridgeEndpoint=true").process(new Processor() {
            public void process(Exchange exchange) throws Exception {
               exchange.getIn().setBody("Changed body");
                    }
                });
{noformat}

> NullPointerException when trying to process response from bridged http jetty endpoint
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-10549
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10549
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 2.18.0
>            Reporter: Frank Wein
>
> First things first: This looks like a regression to me, with version 2.17.3 (<groupId>org.apache.camel</groupId><artifactId>camel-parent</artifactId><version>2.17.3</version>)
in my pom.xml this still worked fine. In version 2.18.0 it's broken. I could not find a similar
issue here in this bugtracker (I found something at https://issues.jboss.org/browse/ENTESB-5872,
but don't think this is related, although the stack trace is similar; fuse 6.3 does not use
Camel 2.18 AFAIK).
> With the attached code example I get an exception/stacktrace when calling the REST endpoint
(producer) via http://localhost/API/1/. With Camel 2.17.3 I get the expected response from
the processor.
> Stacktrace:
> [hread #0 - JmsConsumer[test]] EndpointMessageListener        WARN  Execution of JMS
message listener failed. Caused by: [org.apache.camel.RuntimeCamelException - java.lang.NullPointerException]
> org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
> 	at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1690)
~[camel-core-2.18.0.jar:2.18.0]
> 	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:133)
~[camel-jms-2.18.0.jar:2.18.0]
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:721)
~[spring-jms-4.3.3.RELEASE.jar:4.3.3.RELEASE]
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:681)
[spring-jms-4.3.3.RELEASE.jar:4.3.3.RELEASE]
> 	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:651)
[spring-jms-4.3.3.RELEASE.jar:4.3.3.RELEASE]
> 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:317)
[spring-jms-4.3.3.RELEASE.jar:4.3.3.RELEASE]
> 	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
[spring-jms-4.3.3.RELEASE.jar:4.3.3.RELEASE]
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1166)
[spring-jms-4.3.3.RELEASE.jar:4.3.3.RELEASE]
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1158)
[spring-jms-4.3.3.RELEASE.jar:4.3.3.RELEASE]
> 	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1055)
[spring-jms-4.3.3.RELEASE.jar:4.3.3.RELEASE]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]
> 	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
> Caused by: java.lang.NullPointerException
> 	at org.apache.activemq.camel.component.OriginalDestinationPropagateStrategy.onMessageCreated(OriginalDestinationPropagateStrategy.java:45)
~[activemq-camel-5.14.0.jar:5.14.0]
> 	at org.apache.camel.component.jms.JmsBinding.makeJmsMessage(JmsBinding.java:309) ~[camel-jms-2.18.0.jar:2.18.0]
> 	at org.apache.camel.component.jms.EndpointMessageListener$1.createMessage(EndpointMessageListener.java:371)
~[camel-jms-2.18.0.jar:2.18.0]
> 	at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:515)
~[camel-jms-2.18.0.jar:2.18.0]
> 	at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:458)
~[camel-jms-2.18.0.jar:2.18.0]
> 	at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$4.doInJms(JmsConfiguration.java:501)
~[camel-jms-2.18.0.jar:2.18.0]
> 	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:484) ~[spring-jms-4.3.3.RELEASE.jar:4.3.3.RELEASE]
> 	at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:499)
~[camel-jms-2.18.0.jar:2.18.0]
> 	at org.apache.camel.component.jms.EndpointMessageListener.sendReply(EndpointMessageListener.java:369)
~[camel-jms-2.18.0.jar:2.18.0]
> 	at org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:222)
~[camel-jms-2.18.0.jar:2.18.0]
> 	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:116)
~[camel-jms-2.18.0.jar:2.18.0]
> 	... 11 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message