[jboss-jira] [JBoss JIRA] Commented: (AS7-1324) RESTful service Servlet configuration fails with ClassCastException

Abhijit Sarkar (JIRA) jira-events at lists.jboss.org
Tue Jul 19 19:21:23 EDT 2011


    [ https://issues.jboss.org/browse/AS7-1324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615292#comment-12615292 ] 

Abhijit Sarkar commented on AS7-1324:
-------------------------------------

$ ./standalone.sh --server-config=standalone-preview.xml

========================================================

19:13:25,625 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/movieservicerestful]] (MSC service thread 1-2) Exception sending context initialized event to listener instance of class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap: java.lang.NoClassDefFoundError: javax/servlet/ServletContext

...

Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext from [Module "org.scannotation.scannotation:main" from local module loader @7cf1bb78 (roots: /home/abhijit/Workspace/jboss/modules)]
	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)

========================================================

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-war-plugin</artifactId>
  <version>2.1.1</version>
  <configuration>
    <archive>
      <manifestEntries>
        <Dependencies>org.jboss.resteasy.resteasy-jaxrs,javax.servlet.api</Dependencies>
      </manifestEntries>
    </archive>
  </configuration>
</plugin>

> RESTful service Servlet configuration fails with ClassCastException
> -------------------------------------------------------------------
>
>                 Key: AS7-1324
>                 URL: https://issues.jboss.org/browse/AS7-1324
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Web Services
>    Affects Versions: 7.0.0.Final
>         Environment: Ubuntu 11.04 64 bit, Sun Java 1.6.0_26, JBoss AS 7.0.0.Final 
>            Reporter: Abhijit Sarkar
>            Assignee: Alessio Soldano
>
> RESTful service fails to deploy with following exception when configured as a Servlet in web.xml. If not configured in web.xml, the service is unavailable on the deployed context path.
> 00:29:32,684 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/movieservicerestful].[MovieServiceRestful]] (http--127.0.0.1-9090-2) Allocate exception for servlet MovieServiceRestful: java.lang.ClassCastException: MovieServiceRestful cannot be cast to javax.servlet.Servlet
> <servlet>
>   <servlet-name>MovieServiceRestful</servlet-name>
>   <servlet-class>MovieServiceRestful</servlet-class>
> </servlet>
> <servlet-mapping>
>   <servlet-name>MovieServiceRestful</servlet-name>
>   <url-pattern>/*</url-pattern>
> </servlet-mapping>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list