4 Replies Latest reply on Feb 11, 2010 7:58 AM by jaikiran

    Server class overriding without WAR Isolation

    osnetwork

      Hello everybody,

       

      I have a problem accessing an EAR from a WAR, when the WAR is isolated.
      The structure is like that:
      EAR (EJBs, WAR, etc...)
      WAR (RESTeasy, EJB Remote interface)

       

      Unfortunately, due to RESTeasy, I need to deploy the WAR as isolated because there are some conflicts with some jars.

       

      ERROR [STDERR] SLF4J: Class path contains multiple SLF4J bindings.
      ERROR [STDERR] SLF4J: Found binding in [...../slf4j-simple-1.5.8.jar/org/slf4j/impl/StaticLoggerBinder.class]
      ERROR [STDERR] SLF4J: Found binding in [..../org/slf4j/impl/StaticLoggerBinder.class]
      ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      ERROR [STDERR] 1596 [HDScanner] INFO org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap - Adding scanned @Provider: org.codehaus.jackson.jaxrs.JacksonJsonProvider
      ERROR [STDERR] 1610 [HDScanner] INFO org.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap - Adding scanned resource: com.os.ggGate.service.UserResourceImpl

       

      So, to isolate my WAR I have put that in jboss-web.xml

       

      <class-loading java2ClassLoadingCompliance="false">
          <loader-repository> 
              com.test.isolated:loader=isolated.war
          </loader-repository> 
      </class-loading>

       

      RESTeasy in that way works fine. But when I try to look up for the Remote EJB I get this error:

       

      java
      (TestBeanRemote) context.lookup("test/TestBean/remote");

      log
      23:59:24,544 ERROR [STDERR] javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@c305a8]

       

      Due to the fact that I can access those Remote EJBs from a remote Swing application I think that the problem might be in the isolation.

      Is it possible that isolating a WAR then it can't lookup for EJBs that are deployed in another EAR (not isolated)?

       

      Is there a way to force a server class overloading without actually isolating the WAR?

       

      Thanks in advance,

      Luca