简体   繁体   English

RestEasy简单配置中的ClassNotFoundException

[英]ClassNotFoundException in RestEasy simple configuration

I am using resteasy and have the following configuration in my web.xml. 我正在使用resteasy,并且在我的web.xml中具有以下配置。 It keeps throwing 它不断抛出

[[/EJBWebClient]] Exception sending context initialized event to listener instance of class [[/EJBWebClient]]将上下文初始化事件发送到类的侦听器实例的异常

org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
java.lang.RuntimeException: java.lang.ClassNotFoundException: com.test.PersonRestController


context-param>
    <param-name>resteasy.resources</param-name>
    <param-value>com.test.PersonRestController</param-value>
</context-param>

<listener>
    <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
<servlet>
    <servlet-name>resteasy-servlet</servlet-name>
    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>resteasy-servlet</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

What could be the problem here? 这可能是什么问题? Im deploying it in jboss 4.0.5...Please help 我正在jboss 4.0.5中部署它...请帮助

Are you sure you packaged your class file for com.test.PersonRestController with your archive (ear or war)? 您确定已将com.test.PersonRestController的类文件与归档文件(耳朵或战争)打包在一起了吗?

The classfiles should be stored under 该类文件应存储在

WEB-INF/classes

Your file should be saved as follows 您的文件应保存如下

WEB-INF/classes/com/test/PersonRestController.class

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM