Weblogic上的Apache Chemistry

时间:2017-04-16 18:24:33

标签: jax-rs weblogic apache-chemistry

我正在尝试在Weblogic中运行我的应用程序,但每次我尝试获取会话时都会因此错误而失败:

 "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."

帮助:(我该怎么设置?:

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

在Tomcat中运行相同的部署我没有错误,

这是我的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>

编辑1:

这是我的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 个答案:

答案 0 :(得分:1)

更新到OpenCMIS 1.1.0并且不设置JAX-WS实现会话参数。

如果这没有帮助,请将JAX-WS实施会话参数设置为cxf

答案 1 :(得分:0)

对FlorianMüller的评论, 我找到了答案here添加了 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>