Resteasy in seam application is not working

588 Views Asked by At

I get the following error when running tomcat with seam 2.1.2 (old I know), but I'm trying to get the rest services working with it:

Apr 18, 2018 7:06:11 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class [org.jboss.seam.servlet.SeamListener] java.lang.VerifyError: (class: org/jboss/seam/resteasy/ResteasyBootstrap_$$_javassist_seam_0, method: _d27sessionWillPassivate signature: (Ljavax/servlet/http/HttpSessionEvent;)V) Illegal use of nonvirtual function call at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Unknown Source) at java.lang.Class.getField0(Unknown Source) at java.lang.Class.getField(Unknown Source) at org.jboss.seam.util.ProxyFactory.setField(ProxyFactory.java:363) at org.jboss.seam.util.ProxyFactory.createClass3(ProxyFactory.java:352) at org.jboss.seam.util.ProxyFactory.createClass2(ProxyFactory.java:325) at org.jboss.seam.util.ProxyFactory.createClass(ProxyFactory.java:284) at org.jboss.seam.Component.createProxyFactory(Component.java:2426) at org.jboss.seam.Component.getProxyFactory(Component.java:1513) at org.jboss.seam.Component.wrap(Component.java:1504) at org.jboss.seam.Component.instantiateJavaBean(Component.java:1442) at org.jboss.seam.Component.instantiate(Component.java:1359) at org.jboss.seam.Component.newInstance(Component.java:2122) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:113) at org.jboss.seam.init.Initialization.init(Initialization.java:740) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4637) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5099) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415) at java.util.concurrent.FutureTask.run(Unknown Source) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(Unknown Source) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415) at java.util.concurrent.FutureTask.run(Unknown Source)

When I remove the resteasy jars I get the following error:

Caused by: java.lang.NoClassDefFoundError: org/jboss/resteasy/specimpl/UriInfoImpl at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.getDeclaredMethods(Unknown Source) at org.jboss.seam.Component.initMembers(Component.java:550) at org.jboss.seam.Component.(Component.java:244) at org.jboss.seam.Component.(Component.java:205) at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1186)

So I guess I need to know the exact dependencies ?

This is the jars list:

jars list

1

There are 1 best solutions below

0
user2304483 On

I've solved the problem by downgrade from tomcat 9 to tomcat 7 and by using the original jars came with the seam package.