Hello,

I'm currently facing some serious problems deploying a CXF web application
on Equinox. I once had a working configuration for development in my IDE but
deployment is giving me some headaches.

Here are the versions:

- Equinox 3.4
- CXF Bundle 2.1.2
- Java 1.6.0_11
- Spring-DM 1.1.0
- Spring Framework 2.5.5.A


I've got jaxb-api.jar (2.1) in my lib/endorsed directory to solve the problem 
with
"com.sun.xml.bind.namespacePrefixMapper" property.

If I deploy and start the web application, Spring Web Extender will pick it up 
properly.
Unfortunately I always get a JAXBException. I also tried to replace the JAXB 
bundles
from Servicemix by the ones from SpringSource Repository (Impl Version 2.1.7, 
Api Version 2.1).
but this didn't solve the issue.

Does anyone know of a solution to this problem? Maybe a working framework 
configuration?

I would really appreciate someone attending to this issue.

Best regards,

Fabian



The stack trace reads as follows:

------------------- START ------------------------

Caused by: javax.xml.bind.JAXBException: Provider 
com.sun.xml.bind.v2.ContextFactory not found
 - with linked exception:
[java.security.PrivilegedActionException: java.lang.ClassNotFoundException: 
com.sun.xml.bind.v2.ContextFactory]
        at javax.xml.bind.ContextFinder.loadClass(ContextFinder.java:192)
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:115)
        ... 49 more
Caused by: java.security.PrivilegedActionException: 
java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.xml.bind.ContextFinder.loadClass(ContextFinder.java:175)
        ... 50 more
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
        at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481)
        at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397)
        at 
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385)
        at 
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at javax.xml.bind.ContextFinder$1.run(ContextFinder.java:180)
        at javax.xml.bind.ContextFinder$1.run(ContextFinder.java:176)
        ... 52 more
-------------------- END ------------------------



The following bundles are activated:

------------------- START ------------------------

id      State       Bundle
0       ACTIVE      org.eclipse.osgi_3.4.2.R34x_v20080826-1230
1       ACTIVE      org.eclipse.equinox.common_3.4.0.v20080421-2006
2       ACTIVE      org.apache.neethi_2.0.4
3       ACTIVE      org.springframework.beans_2.5.5.A
4       ACTIVE      org.apache.ws.commons.axiom.axiom-api_1.2.7
5       ACTIVE      org.springframework.aop_2.5.5.A
6       ACTIVE      com.springsource.org.objectweb.asm_2.2.3
7       ACTIVE      org.apache.ws.commons.axiom.axiom-impl_1.2.7
8       ACTIVE      org.springframework.web_2.5.5.A
9       ACTIVE      org.apache.servicemix.bundles.xmlresolver_1.2.0.1
10      RESOLVED    org.springframework.osgi.log4j.config_1.0.0
                    Master=19
11      ACTIVE      com.springsource.org.apache.commons.logging_1.1.1
12      ACTIVE      org.apache.ws.commons.schema_1.4.2
13      ACTIVE      org.apache.servicemix.bundles.wsdl4j_1.6.1.1
14      ACTIVE      com.springsource.org.aopalliance_1.0.0
15      ACTIVE      org.springframework.context_2.5.5.A
16      ACTIVE      org.springframework.core_2.5.5.A
17      ACTIVE      org.apache.geronimo.specs.geronimo-javamail_1.4_spec_1.3.0
18      ACTIVE      org.apache.geronimo.specs.geronimo-servlet_2.5_spec_1.2.0
19      ACTIVE      org.springframework.osgi.log4j.osgi_1.2.15.SNAPSHOT
                    Fragments=10
20      ACTIVE      org.apache.geronimo.specs.geronimo-activation_1.1_spec_1.0.2
21      ACTIVE      org.apache.geronimo.specs.geronimo-annotation_1.0_spec_1.1.1
22      ACTIVE      
org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec_1.1.2
23      ACTIVE      org.apache.geronimo.specs.geronimo-stax-api_1.0_spec_1.0.1
24      ACTIVE      org.apache.geronimo.specs.geronimo-jaxws_2.1_spec_1.0.0
25      ACTIVE      org.apache.cxf.cxf-bundle_2.1.2
26      ACTIVE      org.springframework.bundle.osgi.extensions.annotations_1.1.0
27      ACTIVE      org.springframework.bundle.osgi.core_1.1.0
28      ACTIVE      org.springframework.bundle.osgi.extender_1.1.0
29      ACTIVE      org.springframework.bundle.osgi.io_1.1.0
30      ACTIVE      org.springframework.bundle.osgi.web_1.1.0
31      ACTIVE      org.springframework.bundle.osgi.web.extender_1.1.0
32      ACTIVE      org.springframework.osgi.catalina.osgi_5.5.23.SNAPSHOT
33      ACTIVE      org.springframework.osgi.catalina.start.osgi_1.0.0.SNAPSHOT
34      ACTIVE      org.springframework.osgi.jstl.osgi_1.1.2.SNAPSHOT
35      ACTIVE      org.springframework.web.servlet_2.5.5.A
36      ACTIVE      com.springsource.javax.servlet.jsp_2.1.0
37      ACTIVE      com.springsource.javax.el_1.0.0
38      ACTIVE      org.springframework.context.support_2.5.5.A
39      ACTIVE      org.springframework.osgi.jasper.osgi_5.5.23.SNAPSHOT
40      ACTIVE      org.apache.servicemix.bundles.jaxb-impl_2.1.6.1
41      ACTIVE      org.apache.servicemix.specs.jaxb-api-2.1_1.0.0

-------------------- END ------------------------

MANIFEST.MF of web application:

------------------- START ------------------------

Manifest-Version: 1.0
Built-By: fdankof
Tool: Bnd-0.0.238
Bundle-Name: Spring OSGi Bundle
Created-By: Apache Maven Bundle Plugin
Build-Jdk: 1.6.0_03
Bundle-Version: 0.1
Bnd-LastModified: 1231854281167
Bundle-ManifestVersion: 2
Bundle-Classpath: ., /WEB-INF/classes
Import-Package: com.sun.xml.bind.v2,
 com.sun.xml.bind.v2.bytecode,
 com.sun.xml.bind.v2.model.annotation,
 com.sun.xml.bind.v2.model.core,
 com.sun.xml.bind.v2.model.impl,
 com.sun.xml.bind.v2.model.nav,
 com.sun.xml.bind.v2.model.runtime,
 com.sun.xml.bind.v2.runtime,
 com.sun.xml.bind.v2.runtime.output,
 com.sun.xml.bind.v2.runtime.property,
 com.sun.xml.bind.v2.runtime.reflect,
 com.sun.xml.bind.v2.runtime.reflect.opt,
 com.sun.xml.bind.v2.runtime.unmarshaller,
 com.sun.xml.bind.v2.schemagen,
 com.sun.xml.bind.v2.schemagen.episode,
 com.sun.xml.bind.v2.schemagen.xmlschema,
 com.sun.xml.bind.v2.util,
 javax.servlet.http;version="2.5.0",
 javax.servlet.jsp;version="2.1.0",
 javax.servlet.jsp.jstl.core;version="1.1.2",
 javax.servlet.jsp.jstl.fmt;version="1.1.2",
 javax.servlet.jsp.jstl.tlv;version="1.1.2",
 javax.wsdl;version="1.2.0",
 org.aopalliance.aop;version="1.0.0",
 org.springframework.aop;version="2.5.5.A",
 org.springframework.aop.framework;version="2.5.5.A",
 org.springframework.aop.scope;version="2.5.5.A",
 org.springframework.beans.factory.config;version="2.5.5.A",
 org.springframework.osgi.web.context.support;version="1.1.0",
 org.springframework.stereotype;version="2.5.5.A",
 org.springframework.web.bind.annotation;version="2.5.5.A",
 org.springframework.web.context;version="2.5.5.A",
 org.springframework.web.context.request;version="2.5.5.A",
 org.springframework.web.servlet;version="2.5.5.A",
 org.springframework.web.servlet.view;version="2.5.5.A"
Bundle-SymbolicName: CXFTest
Require-Bundle: org.apache.cxf.cxf-bundle;bundle-version="2.1.2"

-------------------- END ------------------------

beans.xml:

------------------- START ------------------------

<?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:osgi="http://www.springframework.org/schema/osgi";
 xmlns:cxf="http://cxf.apache.org/core"; 
xmlns:jaxws="http://cxf.apache.org/jaxws";
 xmlns:aop="http://www.springframework.org/schema/aop";
 xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
                      http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi.xsd
                      http://cxf.apache.org/core 
http://cxf.apache.org/schemas/core.xsd
                      http://cxf.apache.org/jaxws 
http://cxf.apache.org/schemas/jaxws.xsd
                      http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd";>
 

    <!-- Load CXF modules from cxf.jar -->
 <import resource="classpath:META-INF/cxf/cxf.xml" />
 <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
 <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

 
 <bean id="CXFTest"
  class="test.cxf.impl.CXFTestImpl">
 </bean>
 
 <jaxws:endpoint id="CXFTestService"
  implementorClass="test.cxf.impl.CXFTestImpl"
  implementor="#CXFTest" address="/CXFTest"> 
 </jaxws:endpoint>
</beans>

-------------------- END ------------------------


Reply via email to