Weblogic 12c 版本,servlet 预加载失败
Weblogic 12c versions, servlet failed to preload
我挠头了大约一天,非常感谢任何帮助。
- 使用 Weblogic 12c 版本 12.2.1 和 Jersey 1.19 一切正常
- 使用 Weblogic 12c 版本 12.1.3 我收到此错误:
Servlet:"ServletAdaptor" failed to preload on startup in Web application: "PapWeb".java.lang.ArrayIndexOutOfBoundsException:
65281
编辑:当 运行 12.1.3 服务器时,我也看到了这个相关的(?)警告:
The application is using ServletContainerInitializer class
com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer
that is loaded
from:file:/D:/servers/wls12130/oracle_common/modules/jersey-servlet-1.18.jar.
This initializer overrides the one available in the system.
WEB_INF/lib 包括那些罐子:
- 球衣-1.19
- 球衣核心-1.19
jersey-multipart-1.19
我的 web.xml 有:
<servlet>
<servlet-name>ServletAdaptor</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>gr.modas.core.bussiness.services</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.server.provider.packages</param-name>
<param-value>gr.modas.core.bussiness.services</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
<param-value>gr.modas.core.bussiness.services.PapyrosRequestFilter</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ServletAdaptor</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
下面的代码(在 weblogic.xml 中)解决了这个问题...
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<container-descriptor>
<prefer-web-inf-classes>**true**</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
我挠头了大约一天,非常感谢任何帮助。
- 使用 Weblogic 12c 版本 12.2.1 和 Jersey 1.19 一切正常
- 使用 Weblogic 12c 版本 12.1.3 我收到此错误:
Servlet:"ServletAdaptor" failed to preload on startup in Web application: "PapWeb".java.lang.ArrayIndexOutOfBoundsException: 65281
编辑:当 运行 12.1.3 服务器时,我也看到了这个相关的(?)警告:
The application is using ServletContainerInitializer class com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer that is loaded from:file:/D:/servers/wls12130/oracle_common/modules/jersey-servlet-1.18.jar. This initializer overrides the one available in the system.
WEB_INF/lib 包括那些罐子:
- 球衣-1.19
- 球衣核心-1.19
jersey-multipart-1.19
我的 web.xml 有:
<servlet> <servlet-name>ServletAdaptor</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>gr.modas.core.bussiness.services</param-value> </init-param> <init-param> <param-name>com.sun.jersey.config.server.provider.packages</param-name> <param-value>gr.modas.core.bussiness.services</param-value> </init-param> <init-param> <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name> <param-value>gr.modas.core.bussiness.services.PapyrosRequestFilter</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>ServletAdaptor</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping>
下面的代码(在 weblogic.xml 中)解决了这个问题...
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<container-descriptor>
<prefer-web-inf-classes>**true**</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>