且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

泽西岛资源.class加载

更新时间:2022-10-19 15:58:19

罗希特(Rohit)的博客文章中概述了有关特定版本的WebSphere的各种球衣问题的问题,您能看看有没有什么帮助您的?>

http://wasdynacache.blogspot.com/2011/08/jax-rs-implementations-in-websphere.html

I have the Jersey resource classes bundled within a larger WAR as JAR file which is now residing underneath WEB-INF/lib folder on Websphere Application Server. I have the correct web.xml entry(WEB-INF/web.xml) but still on the server, the scan appears to be not able to lookup the Resource classes which are bundled as a JAR. I was looking at a few threads, and the suggestion was to not bundle Resources as a JAR but instead load the classes seperately underneath /WEB-INF/classes.

<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>blah.blah.blah</param-value>
 </init-param>
 </servlet>

com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes..at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:1064)


There are issues outlined in the blog post from Rohit here on various jersey issues with specific versions of WebSphere, can you please see if anything there helps you?

http://wasdynacache.blogspot.com/2011/08/jax-rs-implementations-in-websphere.html