Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-531

JBoss 6.0.0.Final: EJBs in a WAR don't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 2.1.0.GA
    • None
    • None

    Description

      Accessing a JAX-RS resource with the @Stateless annotation in the web module fails with the following exception:

      javax.naming.NameNotFoundException: local not bound
      org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
      org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
      org.jnp.server.NamingServer.getObject(NamingServer.java:785)
      org.jnp.server.NamingServer.lookup(NamingServer.java:443)
      org.jnp.server.NamingServer.lookup(NamingServer.java:399)
      org.jnp.server.NamingServer.lookup(NamingServer.java:399)
      org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
      org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
      javax.naming.InitialContext.lookup(InitialContext.java:392)
      org.jboss.resteasy.plugins.server.resourcefactory.JndiComponentResourceFactory.createResource(JndiComponentResourceFactory.java:53)
      org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:205)
      org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:503)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:480)
      org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:139)
      org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:211)
      org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:59)

      The bean:

      import javax.ejb.Stateless;
      import javax.ws.rs.GET;
      import javax.ws.rs.Path;
      import javax.ws.rs.Produces;
      import javax.ws.rs.core.Context;
      import javax.ws.rs.core.SecurityContext;

      @Produces("application/xml")
      @Path("foo")
      @Stateless
      public class Iets {

      @GET
      @Path("bar")
      public String getTest()

      { return "<test>test</test>"; }

      }

      Because it's a Java EE 6 environment, I did not configure anything in web.xml.

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            henk53_jira henk de boer (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: