1 Reply Latest reply on Jun 7, 2016 1:42 AM by asafe11

    j boss 5.1 java.lang.NoClassDefFoundError: [Ljavax/servlet/DispatcherType;

    asafe11

      Hello

      i have a web project with Rest servoces(Jersey 2), in java.

      everything works fine on Tomcat 8, while tried to deploy on Jboss 5.1

      i get the above Exception. I work in Eclipse and i guess the problem

      rise because Jboss 5.1 works with web module 2.5.

      any suggestion to solve this issue?

      or should i download another version of Jboss?

      Thanks,

      Asaf

        • 1. Re: j boss 5.1 java.lang.NoClassDefFoundError: [Ljavax/servlet/DispatcherType;
          asafe11

          Ok so i found that what cause the problem is the xml file and more specificaly the filter inside it:

          <filter>

              <display-name>SessionFilter</display-name>

              <filter-name>SessionFilter</filter-name>

              <filter-class>webServices.SessionFilter</filter-class>

            </filter>

            <filter-mapping>

              <filter-name>SessionFilter</filter-name>

              <url-pattern>/rest/*</url-pattern>

            </filter-mapping>

           

          so when i delete it i got another Exception and when i deleted the jar javax.servlet.api 3 all is working well the question now is how can i add the filter to run on jboss,

          just to mention the SessionFilter.jave class has compilation error when i delete this jar. any suggestions?