camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] Created: (CAMEL-3572) Camel transport for cxf does not forward exception to camel exchange
Date Fri, 21 Jan 2011 10:41:44 GMT
Camel transport for cxf does not forward exception to camel exchange

                 Key: CAMEL-3572
             Project: Camel
          Issue Type: Bug
          Components: camel-cxf
            Reporter: Christian Schneider
             Fix For: 2.6.0

I encountered a problem that happens if you run a route like

Behind the direct endpoint there is a cxf jax-rs endpoint that is secured by spring-security.
If spring security denies access based on method annotations it throws an AccessDeniedException.
As JAX-RS does not handle it the exception hits the CamelDestination. There it is only logged
and swallowed. As the client then gets no error it tries to handle the reponse with jaxb which
fails. (See below)

21.01.2011 11:19:51 org.apache.cxf.jaxrs.provider.AbstractJAXBProvider handleJAXBException
WARNUNG: javax.xml.bind.UnmarshalException
 - with linked exception:
[com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]]
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(
	at org.apache.cxf.jaxrs.provider.JAXBElementProvider.unmarshalFromInputStream(
	at org.apache.cxf.jaxrs.provider.JAXBElementProvider.doUnmarshal(
	at org.apache.cxf.jaxrs.provider.JAXBElementProvider.readFrom(
	at org.apache.cxf.jaxrs.client.AbstractClient.readBody(
	at org.apache.cxf.jaxrs.client.ClientProxyImpl.handleResponse(
	at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(
	at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(
	at $Proxy18.getUsers(Unknown Source)
	at client.RESTClient.sayHelloAsUser(
	at client.RESTClient.main(
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(
	... 11 more

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

View raw message