WebSphere Application Server & Liberty

 View Only
Expand all | Collapse all

WebSphere Application Server v9.0.x adminconsole failed to start with "java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more" error

  • 1.  WebSphere Application Server v9.0.x adminconsole failed to start with "java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more" error

    Posted Fri February 09, 2024 08:32 AM

    I am running WAS Base v9.0.x. I recently deployed a new application and restarted the application server. The server started but the adminconsole failed to start.
    Also, the new applications and none of the existing applications started. I see the following error in the SystemOut.log:
    -------
    SRVE0293E: [Servlet Error]-[GenericServletWrapper]: java.lang.NoClassDefFoundError: org.apache.jasper.runtime.JspApplicationContextImpl (initialization failure)
        at java.lang.J9VMInternals.initializationAlreadyFailed(J9VMInternals.java:95)
        at org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:267)
        at com.ibm._jsp._heartbeat._jspInit(_heartbeat.java:56)
        at com.ibm.ws.jsp.runtime.HttpJspBase.init(HttpJspBase.java:77)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:342)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:169)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:634)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
        at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
        at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:220)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1134)
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:966)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:289)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
    Caused by: javax.el.ELException: Unable to find ExpressionFactory of type: # Licensed to the Apache Software Foundation (ASF) under one or more
        at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:181)
        at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:105)
        at org.apache.jasper.runtime.JspApplicationContextImpl.<clinit>(JspApplicationContextImpl.java:58)
        at org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:267)
        at com.ibm.ws.cdi.web.impl.AbstractServletInitializer.onStartup(AbstractServletInitializer.java:104)
        at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:653)
        at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:437)
        at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
        at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
        at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
        at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
        at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
        at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1249)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1591)
        at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:708)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:1162)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:801)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2325)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5536)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5662)
        at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2330)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
        at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
        at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
    Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more
        at java.net.URLClassLoader.findClass(URLClassLoader.java:610)
        at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:259)
        at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:942)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:887)
        at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:149)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:870)
        at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:67)
        at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:63)
        at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:615)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:870)
        at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:647)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:870)
        at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:174)
    ----------------



    ------------------------------
    Marcio D'Amico
    ------------------------------


  • 2.  RE: WebSphere Application Server v9.0.x adminconsole failed to start with "java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more" error
    Best Answer

    Posted Fri February 09, 2024 08:34 AM
    Edited by Marcio D'Amico Fri February 09, 2024 08:36 AM
    This is a known issue when using 3rd party EL parser in your application, which conflicts with the WAS default one in the javax.j2ee.el.jar: under your WAS_INSTALL_ROOT/plugins/javax.j2ee.el.jar. 
    Please refer to the following link for the bug details:
    https://bz.apache.org/bugzilla/show_bug.cgi?id=64097
    caused by the META-INF/services/javax.el.ExpressionFactory class inside the tomcat-embed-el-xx.xx.xx.jar, which has this following line as starting point:
    -------
    # Licensed to the Apache Software Foundation (ASF) under one or more
    # contributor license agreements. See the NOTICE file distributed with
    # this work for additional information regarding copyright ownership.
    # The ASF licenses this file to You under the Apache License, Version 2.0
    # (the "License"); you may not use this file except in compliance with
    # the License. You may obtain a copy of the License at
    #
    # http://www.apache.org/licenses/LICENSE-2.0 [http://www.apache.org/licenses/LICENSE-2.0]
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    -------
    So when the code tries to instantiate the ExpressionFactory, it mistakenly tried to find the first line and caused the error. Could you please check your application and see if it has any tomcat-embed-el-xx.xx.xx.jar in the lib folder of the application?
    There are two solutions here:
    (1) Remove the tomcat-embed-el-xx.xx.xx.jar from your application and use WAS default one.
    (2) Upgrade your tomcat-embed-el-x.xx.xx.jar which fixes the issue inside the ExpressionFactory class.
     



    ------------------------------
    GEETA NADELLA
    ------------------------------