search cancel

Web service custom Restful Webservices no longer working. The ResourceConfig instance does not contain any root resource classes

book

Article ID: 214800

calendar_today

Updated On:

Products

CA Identity Manager

Issue/Introduction

Our custom Restful Webservices are no longer working in 14.3+.  They   Restful Webservices

When we use same existing web.xml  with below configuration , environment is not coming up , getting error

configuration below :


  <servlet>
   <servlet-name>jersey-serlvet</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>com.pepsico.arfw.rest</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
 </servlet>

Error message:

2021-03-02 07:53:23,778 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "iam_im.ear")]) - failure description: {
    "WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"iam_im.ear\".\"user_console.war\".undertow-deployment" => "com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
    Caused by: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes."},
    "WFLYCTL0412: Required services that are not installed:" => [
        "jboss.naming.context.java.comp.iam_im.iam_im_identityminder_ejb.RuntimeStatusDetailEJB",
        "jboss.deployment.subunit.\"iam_im.ear\".\"redirect.war\".deploymentCompleteService",
        "jboss.deployment.subunit.\"iam_im.ear\".\"iam_im_identityminder_ejb.jar\".deploymentCompleteService",
        "jboss.naming.context.java.comp.iam_im.iam_im_identityminder_ejb.ServerCommandsEJB",
        "jboss.deployment.subunit.\"iam_im.ear\".\"management_console.war\".beanmanager",
        "jboss.deployment.subunit.\"iam_im.ear\".\"iam_im_identityminder_ejb.jar\".beanmanager",
        "jboss.deployment.subunit.\"iam_im.ear\".\"redirect.war\".beanmanager",
        "jboss.deployment.subunit.\"iam_im.ear\".\"manage_redirect.war\".deploymentCompleteService",
        "jboss.naming.context.java.comp.iam_im.iam_im_identityminder_ejb.SubscriberMessageEJB",
        "jboss.deployment.subunit.\"iam_im.ear\".\"management_console.war\".deploymentCompleteService",
        "jboss.deployment.subunit.\"iam_im.ear\".\"manage_redirect.war\".beanmanager",
        "jboss.naming.context.java.comp.iam_im.iam_im_identityminder_ejb.WorkFlowCallBackEJB"
 
When we change configurations to jersey 2 , Environment is coming up , but getting error 404 when try to access 

configuration below :

 <servlet>
   <servlet-name>jersey-serlvet</servlet-name>
   <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
   <init-param>
   <param-name>jersey.config.server.provider.packages</param-name>
    <param-value>com.pepsico.arfw.rest</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
 </servlet>

Environment

Release : 14.3

Component : IdentityMinder(Identity Manager)

Resolution

Restful Webservices are not supposed to be created by our customers within our EAR. Customers are free to use the supported product customizations (as per our documentation) and deploy them to the respective folders like custom folder. We do not support Custom restful web services.  The documentation does not have any references for the same.

Your team was able to find a way to create custom web services which worked fine in 14.2. Since we do not support custom web services, we cannot guarantee to it to work in 14.3 and higher versions.

Since custom web services are not supported, we provide best effort support. Our recommendations are below.  It is based on the JEE application server container specification standards to avoid class loading conflicts between the application server and the applications (modules).  

 

1) Create a custom restful Webservice jar and deploy it along with its dependent jars into user_console.war/WEB-INF/lib folder and test all the service.  Test it to make sure it is working from user_console.war/WEB-INF/lib location.

2) Please Create a war file which includes your services as well as its dependency and deploy it under im_iam.ear folder. 

 

For further assistance with your customizations and working with 14.3 and above please continue to work with your Broadcom Account team and if needed engage with our Services teams and partners.