Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2982

RESTEasy: Empty cfg. param resteasy.providers produces exception

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Duplicate Issue
    • Affects Version/s: 7.1.0.Beta1
    • Fix Version/s: 7.1.0.Final
    • Component/s: REST
    • Labels:
      None

      Description

      When I use empty content for configuration parameter of RESTEasy resteasy.providers in web.xml like:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" metadata-complete="false">
       
         <servlet-mapping>
            <servlet-name>javax.ws.rs.core.Application</servlet-name>
            <url-pattern>/myjaxrs/*</url-pattern>
         </servlet-mapping>
                                                                                                                                                                                   
         <context-param>
            <param-name>resteasy.providers</param-name>
            <param-value></param-value>
         </context-param>
      </web-app>"
      

      I've got this exception:

       
      16:13:23,956 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jaxrsnoap]] (http-pjanouse.brq.redhat.com-127.0.0.1-8080-1) StandardWrapper.Throwable: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
              at java.lang.String.charAt(String.java:686) [:1.6.0_27]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:477) [jboss-modules.jar:1.1.0.CR4]
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421) [jboss-modules.jar:1.1.0.CR4]
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143) [jboss-modules.jar:1.1.0.CR4]
              at org.jboss.resteasy.spi.ResteasyDeployment.registerProvider(ResteasyDeployment.java:499) [resteasy-jaxrs-2.3.0.GA.jar:]
              at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:313) [resteasy-jaxrs-2.3.0.GA.jar:]
              at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:225) [resteasy-jaxrs-2.3.0.GA.jar:]
              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67) [resteasy-jaxrs-2.3.0.GA.jar:]
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36) [resteasy-jaxrs-2.3.0.GA.jar:]
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.5.Final.jar:]
              at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.5.Final.jar:]
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.5.Final.jar:]
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.5.Final.jar:]
              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) [jboss-as-web-7.1.0.CR1-SNAPSHOT.jar:]
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.5.Final.jar:]
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.5.Final.jar:]
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.5.Final.jar:]
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.5.Final.jar:]
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.5.Final.jar:]
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.5.Final.jar:]
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.5.Final.jar:]
              at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
      

      I think empty list of providers is also appropriate input (cfg), so AS7 should accommodate it.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  weinanli Weinan Li
                  Reporter:
                  pjanouse Pavel Janousek
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: