dev@glassfish.java.net

Re: Provider org.apache.jasper.runtime.TldScanner could not be instantiated: java.lang.Error: WebappClassLoader WebappClassLoader

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 06 Aug 2009 18:13:41 -0700

Hi Amy,

I've fixed the classloader issue, see

  https://glassfish.dev.java.net/issues/show_bug.cgi?id=9061
  ("org.apache.jasper.runtime.TldScanner could not be instantiated")

for commit details.

As for this NPE:

  java.lang.NullPointerException
        at
org.apache.jasper.runtime.TldScanner.onStartup(TldScanner.java:206)

it is caused if there is no registration for the JspServlet (I've
already asked Kin-man to
have TldScanner throw a ServletException in this case, instead of
causing a NPE).

The above exception only occurs when running EmbeddedTest. In embedded
mode, the default-web.xml (which declares the JspServlet) currently is
not being processed,
which means there won't be any registration for the JspServlet on any
web context.


Jan

On 08/06/09 11:11, Amy Roh wrote:
> I am seeing this regression in v3/distribution/web (also in console
> output from gf-trunk-build-continuous hudson job). I wasn't getting
> this with a build from earlier this week. Any idea?
>
> SEVERE: PWC1240: Container
> StandardEngine[com.sun.appserv].StandardHost[server].StandardContext[]
> has not been started
> java.util.ServiceConfigurationError:
> javax.servlet.ServletContainerInitializer: Provider
> org.apache.jasper.runtime.TldScanner could not be instantiated:
> java.lang.Error: WebappClassLoader WebappClassLoader
> delegate: false
> repositories:
> ----------> Parent Classloader:
> sun.misc.Launcher$AppClassLoader_at_e47858e
> not yet started or already stopped
> at java.util.ServiceLoader.fail(ServiceLoader.java:207)
> at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
> at
> org.glassfish.web.loader.ServletContainerInitializerUtil.getInterestList(ServletContainerInitializerUtil.java:143)
>
> at com.sun.enterprise.web.WebModule.start(WebModule.java:504)
> at
> org.apache.catalina.core.ContainerBase.startChildren(ContainerBase.java:1523)
>
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1190)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:975)
> at
> org.apache.catalina.core.ContainerBase.startChildren(ContainerBase.java:1523)
>
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1190)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:529)
> at org.apache.catalina.startup.Embedded.start(Embedded.java:946)
> at
> com.sun.enterprise.web.WebContainer.postConstruct(WebContainer.java:547)
> at
> com.sun.hk2.component.AbstractWombImpl.inject(AbstractWombImpl.java:174)
> at
> com.sun.hk2.component.ConstructorWomb$1.run(ConstructorWomb.java:89)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> com.sun.hk2.component.ConstructorWomb.initialize(ConstructorWomb.java:86)
> at
> com.sun.hk2.component.AbstractWombImpl.get(AbstractWombImpl.java:77)
> at
> com.sun.hk2.component.SingletonInhabitant.get(SingletonInhabitant.java:58)
>
> at com.sun.hk2.component.LazyInhabitant.get(LazyInhabitant.java:107)
> at
> com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:60)
>
> at
> org.glassfish.internal.data.EngineInfo.getContainer(EngineInfo.java:78)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.startContainers(ApplicationLifecycle.java:657)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:418)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:235)
>
> at
> org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:182)
>
> at
> org.glassfish.distributions.test.EmbeddedTest.testWeb(EmbeddedTest.java:186)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>
> at
> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>
> at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>
> at
> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>
> at
> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
> at
> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
>
> at
> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>
> at
> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>
> at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>
> at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
>
> at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
>
> at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)
>
> Caused by: java.lang.Error: WebappClassLoader WebappClassLoader
> delegate: false
> repositories:
> ----------> Parent Classloader:
> sun.misc.Launcher$AppClassLoader_at_e47858e
> not yet started or already stopped
> at
> org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1395)
>
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:247)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
> ... 49 more
> DOL Loading time15
> classLoader = WebappClassLoader
> delegate: false
> repositories:
> ----------> Parent Classloader:
> org.glassfish.internal.api.DelegatingClassLoader_at_5a716968
>
> SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7_at_5b466c9d
> Aug 6, 2009 11:00:37 AM com.sun.ejb.containers.BaseContainer
> initializeHome
> INFO: Portable JNDI names for EJB SampleEjb :
> [java:global/test-classes/SampleEjb!org.glassfish.distributions.test.ejb.SampleEjb,
> java:global/test-classes/SampleEjb]
> Aug 6, 2009 11:00:38 AM org.apache.catalina.core.StandardContext
> callServletContainerInitializers
> WARNING: PWC1420: Error invoking ServletContainerInitializer
> org.apache.jasper.runtime.TldScanner
> java.lang.NullPointerException
> at
> org.apache.jasper.runtime.TldScanner.onStartup(TldScanner.java:206)
> at
> org.apache.catalina.core.StandardContext.callServletContainerInitializers(StandardContext.java:5367)
>
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:5267)
> at com.sun.enterprise.web.WebModule.start(WebModule.java:509)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:928)
>
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:912)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:694)
> at
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1796)
> at
> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1485)
> at
> com.sun.enterprise.web.WebApplication.start(WebApplication.java:93)
> at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
> at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:223)
> at
> org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:193)
>
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:295)
>
> at
> org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:182)
>
> at
> org.glassfish.distributions.test.EmbeddedTest.testWeb(EmbeddedTest.java:186)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
>
> at
> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
>
> at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>
> at
> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
>
> at
> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
> at
> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
>
> at
> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
>
> at
> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
>
> at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
>
> at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
> at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
>
> at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
>
> at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)
>
> Aug 6, 2009 11:00:38 AM com.sun.enterprise.web.WebApplication start
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>