glassfish
  1. glassfish
  2. GLASSFISH-17828

Applib Classloader does not load dependent classes

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      GlassFish 3.1.1, RHEL6 (2.6.32-131.0.15.el6.x86_64) , JDK 1.7.0 (build 1.7.0-b147)

      Description

      WebApplication which is not self-contained.
      Libraries are put into <domain-dir>/lib/applibs directory
      Library 'A' referencs classes from library 'B', library 'B' references classes from library 'C' ; all libs receide in <domain-dir>/lib/applibs directory

      WebApp is deployed with

      --libraries 'A','B','C'

      When accessing the WebApp an internal server error occurs.

      server.log shows

      [#|2011-11-24T10:12:41.859+0100|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=110406;_ThreadName=Thread-2;|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
      java.lang.NoClassDefFoundError: org/test/util/RBLoader
      at org.superloader.SuperLoader.load(SuperLoader.java:16)
      at org.apache.jsp.index_jsp._jspService(index_jsp.java:67)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
      at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.ClassNotFoundException: org.test.util.RBLoader
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at com.sun.enterprise.v3.server.AppLibClassLoaderServiceImpl$URLClassFinder.findClass(AppLibClassLoaderServiceImpl.java:158)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      ... 33 more

      #]

      Using GlassFish 2.1.1 this has not been an issue leveraging the 'shared chain class loader' (http://docs.oracle.com/cd/E19316-01/820-4336/6nfqd2b1t/index.html).

      This makes migration from GF 2.1.1 to GF 3.1.1 very hard ....

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            shreedhar_ganapathy
            Reporter:
            bthalmayr
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: