Hi,
On 04/01/12 16:19, ChrisBarsouk wrote:
Thank you for your response.
I debugged into the problem and it turns out the reason was a
ClassNotFoundException which was nastily cut from the stack trace. I had to
add the org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl to my MANIFEST.MF.
Which class was missing ? I'm not sure having to import
RuntimeDelegateImpl is really needed, may be you need to get a
ServiceMix jsr311-api-1.1.1 bundle added ?
After some more selfmade issues it suddenly worked although I didn't change
much. Again after many tries it turned out that 2 HttpServiceContexts were
started. First the CXFServlet from my com.cbs.ui.rest bundle and then
another Servlet from the org.apache.cxf.bundle-jaxrs and only if my bundle
is registering its servlet last the service works.
Is it somehow possible to get a custom servlet context registered before
the default one is registered, as part of the cxf bundle registration ?
Sorry if I miss something...
I still do not understand
how this can work if it has no knowledge of my ManagerService bean.
I suppose you were using a '/cbs_rest' context which is handled by the
registration below ?
I thought: 2 servlets is one too many and killed this part (my servlet):
<osgi:service interface="javax.servlet.Servlet">
<osgi:service-properties>
<entry key="filterMappingUrlPattern" value="/cbs_rest/*" />
<entry key="alias" value="/cbs_rest/*" />
<entry key="servlet-name" value="CXFServlet" />
<entry key="debug" value="2" />
</osgi:service-properties>
<bean class="org.apache.cxf.transport.servlet.CXFServlet"></bean>
</osgi:service>
and I had also found out that the servlet from the
org.apache.cxf.bundle-jaxrs is found under the path /cfx.
This alias is configurable, "org.apache.cxf.osgi" is the persistent id.
For example, we use '/services' by default.
Now I get the
response: No service was found. And the server logs: Can't find the the
request for http://localhost:8080/cxf/managerservice/sites's Observer
What CXF version are you using ? You may need to import an http-osgi
transport, but this is not needed with the latest CXFs
Another thing I still do not understand is how the alias and the
filterMappingUrlPattern can be set for the jaxrs:server element.
I've actually never used filterMappingUrlPattern, well, I guess I did a
couple of times but only when restricting the filter mappings in
web.xml, how does it work in your original configuration ?
Cheers, Sergey
I hope you see more light than I do.
Chris
--
View this message in context:
http://cxf.547215.n5.nabble.com/Exception-on-bean-configuration-tp5094705p5119703.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com