camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-4299) The cxfbean-component no longer works in OSGI (failure to auto create and NullPointerException)
Date Tue, 09 Aug 2011 14:30:27 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-4299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Willem Jiang resolved CAMEL-4299.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9.0
                   2.8.1

> The cxfbean-component no longer works in OSGI (failure to auto create and NullPointerException)
> -----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-4299
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4299
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf, osgi
>    Affects Versions: 2.8.0
>         Environment: Karaf 2.2.0 (with a jre.properties modified to work with cxf)
>            Reporter: Jonas Bengtsson
>            Assignee: Willem Jiang
>             Fix For: 2.8.1, 2.9.0
>
>
> Camel fails to auto create the cxfbean-component. I have tried both with blueprint and
Spring-DM. For Spring-DM i get the following error:
> Cannot auto create component: cxfbean
> My Spring XML-file:
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring"
> 	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">
> 	<camel:camelContext>
> 		<camel:route>
> 			<camel:from uri="jetty:http://0.0.0.0:8080?matchOnUriPrefix=true" />
> 			<camel:to uri="cxfbean:myBean" />
> 		</camel:route>
> 	</camel:camelContext>
> 	<bean id="myBean" class="mypackage.MyJaxRsAnnotatedBean" />
> </beans>
> {code}
> I have both the camel-cxf and camel-cxf-transport bundles installed and it seems that
both of them  have a ComponentResolver for cxfbean published in the OSGI-registry. I can get
my bundle to start if I create the cxfbean-component explicity in my Spring- or blueprint-XML
file:
> {code}
> <bean id="cxfbean" class="org.apache.camel.component.cxf.cxfbean.CxfBeanComponent"
/>
> {code}
> But then I will get a NullPointerException when I visit a URL handled by my JAXRS-annotated
bean:
> java.lang.NullPointerException
> 	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:96)
> 	at org.apache.camel.component.cxf.cxfbean.CxfBeanDestination.process(CxfBeanDestination.java:83)
> 	at org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:102)
> 	at org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:72)
> 	at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> 	at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:114)
> 	at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:286)
> 	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
> 	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
> 	at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)
> 	at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305)
> 	at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
> 	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
> 	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
> 	at org.apache.camel.component.jetty.CamelContinuationServlet.service(CamelContinuationServlet.java:109)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1352)
> 	at org.eclipse.jetty.servlets.MultiPartFilter.doFilter(MultiPartFilter.java:97)
> 	at org.apache.camel.component.jetty.CamelMultipartFilter.doFilter(CamelMultipartFilter.java:41)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:476)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:346)
> 	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)
> 	at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)
> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)
> 	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)
> 	at java.lang.Thread.run(Thread.java:680)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message