[jboss-jira] [JBoss JIRA] Issue Comment Edited: (AS7-1323) @Resource injection on WebServiceContext fails

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


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

Abhijit Sarkar edited comment on AS7-1323 at 7/19/11 9:09 PM:
--------------------------------------------------------------

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

{code}

21:01:09,038 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/movieservicerestful]] (MSC service thread 1-3) Exception sending context initialized event to listener instance of class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap: java.lang.NoClassDefFoundError: javax/servlet/ServletContext
	at org.scannotation.WarUrlFinder.findWebInfClassesPath(WarUrlFinder.java:56) [scannotation-1.0.2.jar:]
	at org.jboss.resteasy.plugins.server.servlet.ListenerBootstrap.getScanningUrls(ListenerBootstrap.java:64) [resteasy-jaxrs-2.2.1.GA.jar:]	

21:01:09,044 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Error listenerStart
21:01:09,045 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-3) Context [/movieservicerestful] startup failed due to previous errors
21:01:09,045 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/movieservicerestful]] (MSC service thread 1-3) Exception sending context destroyed event to listener instance of class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap: java.lang.NullPointerException
	at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextDestroyed(ResteasyBootstrap.java:37) [resteasy-jaxrs-2.2.1.GA.jar:]

{code}

{code:xml}
<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 export service,javax.servlet.api export service,org.scannotation.scannotation export service</Dependencies>
      </manifestEntries>
    </archive>
  </configuration>
</plugin>
{code}

      was (Author: Abhi0123):
    $ ./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>
  
> @Resource injection on WebServiceContext fails
> ----------------------------------------------
>
>                 Key: AS7-1323
>                 URL: https://issues.jboss.org/browse/AS7-1323
>             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
>
> 00:20:55,004 WARN  [org.jboss.as.ee.component.ResourceInjectionAnnotationParsingProcessor] (MSC service thread 1-4) Can't handle @Resource for ENC name: MovieServiceRestful/wsCtx on class MovieServiceRestful since it's missing a "lookup" (or "mappedName") value and isn't of any known type.
> @WebServiceProvider
> @BindingType(value = HTTPBinding.HTTP_BINDING)
> public class MovieServiceRestful implements Provider<Source> {
>     @Resource
>     protected WebServiceContext wsCtx;
>     ...
> }

--
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