cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Cxf-bundle-jaxRS, Jetty8 and Osgi leads to ClassNotfoundException
Date Tue, 20 Dec 2011 22:33:33 GMT
Hi
On 20/12/11 20:32, Tcharl wrote:
> Hi,
>
> I'm trying to make cxf-jaxrs, jetty8 and spring working in an osgi
> environment.
>
> Here's my spring conf:
> <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:jaxrs="http://cxf.apache.org/jaxrs"
> 	xmlns:context="http://www.springframework.org/schema/context"
> 	xmlns:osgi="http://www.springframework.org/schema/osgi"
> xmlns:cxf="http://cxf.apache.org/core"
> 	xsi:schemaLocation="
> 	http://cxf.apache.org/core
>        http://cxf.apache.org/schemas/core.xsd
> 	http://www.springframework.org/schema/osgi
>         http://www.springframework.org/schema/osgi/spring-osgi.xsd
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://www.springframework.org/schema/context
> http://www.springframework.org/schema/context/spring-context.xsd
> http://cxf.apache.org/jaxrs
> http://cxf.apache.org/schemas/jaxrs.xsd">
> 	<bean id="placeholderConfig"
> 	
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> 		<property name="location" value="classpath:server.properties">
> 		</property>
> 	</bean>
> 	<import resource="classpath:META-INF/cxf/cxf.xml"/>
> 	<import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
> 	<osgi:reference id="valuesTestDao"
> interface="net.osgiliath.dao.ValuesTestDao" />
>
> 	<context:annotation-config />
> 	<context:component-scan base-package="net.osgiliath.ws.server.internal" />
> 	<jaxrs:server id="ValuesTestServer"
> 		address="http://${ws.server.url}:8080/${ws.context.url}/">
> 		<jaxrs:features>
> 			<cxf:logging></cxf:logging>
> 		</jaxrs:features>
> 		<jaxrs:serviceBeans>
> 			<ref bean="valuesTestWsServer" />
> 		</jaxrs:serviceBeans>
> 		<jaxrs:providers>
> 			<ref bean="jaxbProvider" />
> 		</jaxrs:providers>
> 		<jaxrs:extensionMappings>
> 			<entry key="json" value="application/json" />
> 			<entry key="xml" value="application/xml" />
> 		</jaxrs:extensionMappings>
> 		<jaxrs:languageMappings>
> 			<entry key="en" value="en-gb" />
> 		</jaxrs:languageMappings>
> 	</jaxrs:server>
> 	<bean id="jaxbProvider"
> class="net.osgiliath.test.CustomJaxBElementProvider">
> 		<property name="marshallerProperties">
> 			<map>
> 				<entry key="jaxb.formatted.output">
> 					<value type="java.lang.Boolean">true</value>
> 				</entry>
> 			</map>
> 		</property>
> 	</bean>
> </beans>
> </code>
>
> This leads me to this exception when I launch equinox console:
> Caused by: java.lang.ClassNotFoundException:
> org.eclipse.jetty.util.component.Container$Listener
>          at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
>          at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
>          at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
>          at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
>
> Do you have a key?
>

Is it org.eclipse.jetty.util.component.Container$Listener that is 
missing ? cxf bundles do not get jetty embedded so you may need to add 
jetty bundles separately, sorry if I did not understand the question

Sergey

> Regards, Charlie
>
> cmordant1@gmail.com
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Cxf-bundle-jaxRS-Jetty8-and-Osgi-leads-to-ClassNotfoundException-tp5090005p5090005.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

Mime
View raw message