user1663023
user1663023

Reputation:

Tomcat 7.0.30 does not work with Resteasy 2.3.4

I created a small web application with resteasy 2.3.4 Final, and I deployed it to Tomcat 7.0.30. I got the following error message when tomcat starts:

...
INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
Sep 11, 2012 9:28:08 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter org.jboss.resteasy.plugins.server.servlet.Filter30Dispatcher
java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
...

My web.xml is as follows:

<context-param>
    <param-name>resteasy.servlet.mapping.prefix</param-name>
    <param-value>/services</param-value>
</context-param>

<context-param>
    <param-name>resteasy.scan.resources</param-name>
    <param-value>true</param-value>
</context-param>

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

<servlet-mapping>
    <servlet-name>Resteasy</servlet-name>
    <url-pattern>/services/*</url-pattern>
</servlet-mapping>

Upvotes: 5

Views: 5563

Answers (2)

Ahmed Samir
Ahmed Samir

Reputation: 127

that happen to me either but with tomcat 7.0.52 and resteasy-cdi-3.0.6.Final i removed the resteasy-cdi-3.0.6.Final form the library package and it deployed well

Upvotes: 2

user1663023
user1663023

Reputation:

Problem solved by removing the resteasy-cdi-2.3.4.Final.jar.

Upvotes: 6

Related Questions