REST APIs Issue when Migrating from JBoss-6.1-EAP to JBoss-7.2-EAP

Posted on

Hello, we're migrating from JBoss 6.1 EAP to JBoss 7.2 EAP. After running the migration DB scripts and starting the server, we're unable to successfully execute our custom REST APIs.

  1. We were using old Resteasy jar version in JBoss 6.1 EAP. But the Resteasy version supported by JBoss 7.2 EAP is 3.6.1. What are
    the other Jars that need to be updated? We've updated the jar (jaxrs-api-1.2.1.GA.jar to jaxrs-api-2.0.jar). Is it required?

  2. We've the below code in web.xml. I.e. before migration.


    We believe that the above one needs to be commented out/removed out, as we saw a warning in the server startup that "resteasy.scan has been deprecated, Use a 3.0 servlet container and ResteasyServletInitializer". Do we need to do anything w.r.t. this?




    XyzHttpServletDispatcher does not have much customization.

  3. I tried to create a custom class (MyRestApplication) extending with an ApplicationPath ("/rest/*"), but it didn't work.

public class MyRestApplication extends Application {
private Set singletons = new HashSet();
private Set<Class<?>> empty = new HashSet>();
public MyRestApplication() {
singletons.add(new ShopResource());
public Set<Class<?>> getClasses() {
return empty;
public Set getSingletons() {
return singletons;
I ge the below exception:
07:43:30,281 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /myapp/rest/shop/v1/carts: java.lang.ClassCastException: cannot be cast to

For some trials, I didn't see any exception as above, but the REST API did not execute and returned 404 error.

Could you please help me in this.