2016-01-24 2181 views
2

我在Eclipse上启动Oracle Weblogic Server 12c R2(12.2.1),它可以同步,但在下面有一些问题。我已经添加泽西图书馆1.17,不知道它是否太旧版本。但我可以找到最新的正确下载链接。Weblogic服务器和Jersey servlet问题

 一月 24, 2016 11:20:39 上午 weblogic.wsee.runtime.JMSStoreRoutableIDMapper onFailure 
     INFO: Destination Failure for weblogic.wsee.BufferedRequestQueue due to exception: While trying to lookup 'weblogic.wsee.BufferedRequestQueue' didn't find subcontext 'wsee'. Resolved 'weblogic' 
     一月 24, 2016 11:20:39 上午 weblogic.wsee.runtime.JMSStoreRoutableIDMapper onFailure 
     INFO: Destination Failure for weblogic.wsee.BufferedResponseQueue due to exception: While trying to lookup 'weblogic.wsee.BufferedResponseQueue' didn't find subcontext 'wsee'. Resolved 'weblogic' 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192509> <Changing servlet class from com.sun.jersey.spi.container.servlet.ServletContainer (web.xml) to org.glassfish.jersey.servlet.ServletContainer.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class com.sun.jersey.api.core.ResourceConfig because ApplicationPath annotation is not set on it.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class com.sun.jersey.api.core.ApplicationAdapter because ApplicationPath annotation is not set on it.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class com.sun.jersey.server.impl.application.DeferredResourceConfig because ApplicationPath annotation is not set on it.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class com.sun.jersey.api.core.ClassNamesResourceConfig because ApplicationPath annotation is not set on it.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class com.sun.jersey.api.core.DefaultResourceConfig because ApplicationPath annotation is not set on it.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class com.sun.jersey.api.core.PackagesResourceConfig because ApplicationPath annotation is not set on it.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class com.sun.jersey.api.core.servlet.WebAppResourceConfig because ApplicationPath annotation is not set on it.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class com.sun.jersey.api.core.ClasspathResourceConfig because ApplicationPath annotation is not set on it.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192510> <Cannot add Jersey servlet for application class com.sun.jersey.api.core.ScanningResourceConfig because ApplicationPath annotation is not set on it.> 
     <Jan 24, 2016 11:21:15 AM EST> <Warning> <JAXRSIntegration> <BEA-2192511> <The list of resource packages: org.codehaus.jackson.jaxrs;com.sun.jersey.server.impl.application> 

有人可以帮助弄清楚如何解决这个问题吗?

web.xml文件中:

 <?xml version="1.0" encoding="UTF-8"?> 
     <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> 
      <display-name>com.youtube.rest</display-name> 
      <welcome-file-list> 
      <welcome-file>readme.html</welcome-file> 
      <welcome-file>index.html</welcome-file> 
      <welcome-file>index.htm</welcome-file> 
      <welcome-file>index.jsp</welcome-file> 
      <welcome-file>default.html</welcome-file> 
      <welcome-file>default.htm</welcome-file> 
      <welcome-file>default.jsp</welcome-file> 
      </welcome-file-list> 

      <servlet> 
      <servlet-name>Jersey REST Service</servlet-name> 
      <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> 
      <init-param> 
       <param-name>com.sun.jersey.config.property.packages</param-name> 
       <param-value>com.youtube.rest</param-value> 
      </init-param> 
      <load-on-startup>1</load-on-startup> 
      </servlet> 
      <servlet-mapping> 
      <servlet-name>Jersey REST Service</servlet-name> 
      <url-pattern>/api/*</url-pattern> 
      </servlet-mapping> 

     </web-app> 

readme.html 
<!DOCTYPE html> 
<html> 
<head> 
<meta charset="UTF-8"> 
<title>Insert title here</title> 
</head> 
<body> 
<h1>Read Me</h1> 
</body> 
</html> 

回答

0

变化泽西版本2.x的

0

如果妳需要十个分量新泽西1.X你必须在weblogic.xml宣布这个

<wls:prefer-application-packages> 
      <wls:package-name>com.sun.jersey</wls:package-name> 
    </wls:prefer-application-packages> 
0

这些消息是在应用程序web.xml中对旧版泽西1.x组件的引用在部署时转换为泽西2.x引用时发出的。换句话说,虽然支持Jersey 1.1样式的web.xml定义,但实现升级到Jersey 2.x。

为了摆脱这些消息的,路径如下:

  • 升级你的应用程序中使用泽西2.21.0(JAX-RS 2.0参考由WLS 12C提供 实现)。根据您的WLS 12c版本,您可能必须部署 ORACLE_HOME\wlserver\common\deployable-libraries\jax-rs-2.0.war
  • 要么打包REST风格的Web服务 应用程序中使用的web.xml随着javax.ws.rs.core.Application 子类
  • 或包装RESTful Web服务应用程序中使用的web.xml 没有javax.ws.rs.core.Application子类

请参见下面的文档链接以查看详细说明:https://docs.oracle.com/middleware/1221/wls/RESTF/deploy-restful-service.htm