Apache Chemistry on Weblogic

1k Views Asked by At

I'm trying to run my app in Weblogic but everytime I'm trying to get a session it fails with this error:

 "Message": "SPI cannot be initialized: Could not detect JAX-WS implementation! Use session parameter org.apache.chemistry.opencmis.binding.webservices.jaxws.impl to specify one.",
 "LocalizedMessage": "SPI cannot be initialized: Could not detect JAX-WS implementation! Use session parameter org.apache.chemistry.opencmis.binding.webservices.jaxws.impl to specify one."

help :( how should I set??:

        parameter_.put(SessionParameter.WEBSERVICES_JAXWS_IMPL, "");

running that same deploy in Tomcat I have no error,

this is my pom.xml:

<dependencies>

    <!-- JAX-RS -->
    <!--<dependency> commented or not it's the same result...
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.0.1</version>
    </dependency> -->

    <!-- Jersey -->

    <dependency>
        <groupId>org.glassfish.jersey.containers</groupId>
        <artifactId>jersey-container-servlet</artifactId>
        <version>2.25.1</version>
    </dependency>

    <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-server</artifactId>
        <version>2.25.1</version>
    </dependency>

    <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-client</artifactId>
        <version>2.25.1</version>
    </dependency>

    <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-common</artifactId>
        <version>2.25.1</version>
    </dependency>

    <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-multipart</artifactId>
        <version>2.25.1</version>
    </dependency>

    <!-- Apache Chemistry -->

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-commons-api</artifactId>
        <version>0.14.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-client-impl</artifactId>
        <version>0.14.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-commons-impl</artifactId>
        <version>0.14.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-client-bindings</artifactId>
        <version>0.14.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.chemistry.opencmis</groupId>
        <artifactId>chemistry-opencmis-client-api</artifactId>
        <version>0.14.0</version>
    </dependency>

EDIT 1:

this is my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    id="WebApp_ID" version="2.5">
<display-name>CmisIntegration</display-name>

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>

<servlet>
    <servlet-name>jersey-serlvet</servlet-name>
    <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
    <init-param>
        <param-name>jersey.config.server.provider.packages</param-name>
        <param-value>mx.com.ecmsolutions.cmis.restws</param-value>
    </init-param>
    <init-param>
        <param-name>jersey.config.server.provider.classnames</param-name>
        <param-value>org.glassfish.jersey.media.multipart.MultiPartFeature</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
    <servlet-name>jersey-serlvet</servlet-name>
    <url-pattern>/rest/*</url-pattern>
</servlet-mapping>

2

There are 2 best solutions below

2
Florian Müller On

Update to OpenCMIS 1.1.0 and do not set the JAX-WS implementation session parameter.

If that doesn't help, set the JAX-WS implementation session parameter to cxf.

0
Alfredo M On

Aditionally to Florian Müller comment, I found the answer here adding this weblogic.xml

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
<container-descriptor>
<prefer-application-resources> 
     <resource-name>META-INF/services/javax.xml.ws.spi.Provider</resource-name> 
   </prefer-application-resources> 
 </container-descriptor>
</weblogic-web-app>