我已经将portlet项目转换为maven并创建了它的war文件。当我部署war文件时,它在websphere门户控制台中不会产生任何错误,但是在SystemOut.log文件中会产生以下错误日志-----

[8/29/17 18:01:45:380 IST] 00006095 jsp           W com.ibm.ws.jsp.taglib.TldParser endElement JSPG0235E: The JSP container failed to loa
d the TagExtraInfo class [org.apache.taglibs.standard.tei.XmlTransformTEI]  from META-INF/x-1_0-rt.tld
[8/29/17 18:01:45:381 IST] 00006095 jsp           W com.ibm.ws.jsp.taglib.TldParser endElement JSPG0235E: The JSP container failed to loa
d the TagExtraInfo class [org.apache.taglibs.standard.tei.XmlParseTEI]  from META-INF/x-1_0.tld
[8/29/17 18:01:45:381 IST] 00006095 jsp           W com.ibm.ws.jsp.taglib.TldParser endElement JSPG0235E: The JSP container failed to loa
d the TagExtraInfo class [org.apache.taglibs.standard.tei.XmlTransformTEI]  from META-INF/x-1_0.tld
[8/29/17 18:01:45:381 IST] 00006095 jsp           W com.ibm.ws.jsp.taglib.TldParser endElement JSPG0235E: The JSP container failed to loa
d the TagExtraInfo class [org.apache.taglibs.standard.tei.XmlParseTEI]  from META-INF/x.tld
[8/29/17 18:01:45:382 IST] 00006095 jsp           W com.ibm.ws.jsp.taglib.TldParser endElement JSPG0235E: The JSP container failed to loa
d the TagExtraInfo class [org.apache.taglibs.standard.tei.XmlTransformTEI]  from META-INF/x.tld
[8/29/17 18:01:45:418 IST] 00006095 webapp        E com.ibm.ws.webcontainer.webapp.WebApp commonInitializationFinally CWSRV0266E: Error o
ccured while initializing servlets: {0}
                                 javax.servlet.UnavailableException: CWSRV0201E: Servlet [com.bluestar.servlet.InitializationServlet]: no
t a servlet class
        at com.ibm.ws.webcontainer.servlet.ServletWrapper$1.run(ServletWrapper.java:1501)
        at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:1475)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1354)
        at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:614)
        at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:584)
        at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:425)
        at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
        at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
        at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
        at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
        at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
        at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
        at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1379)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2189)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:446)
        at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:389)
    at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:117)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:664)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5474)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5600)
        at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:678)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:622)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1269)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:87)
        at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:291)
        at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1260)
        at java.security.AccessController.doPrivileged(AccessController.java:300)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1254)
        at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1092)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813)
        at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
        at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
        at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
        at com.ibm.ws.management.application.AppManagementImpl._startApplication(AppManagementImpl.java:1482)
        at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1371)
        at com.ibm.ws.management.application.AppManagementImpl.startApplication(AppManagementImpl.java:1320)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:87)
        at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:618)
        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:291)
        at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1260)
        at java.security.AccessController.doPrivileged(AccessController.java:300)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1254)
        at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1092)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813)
        at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
        at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
        at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
        at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
        at sun.reflect.GeneratedMethodAccessor327.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at com.ibm.ws.management.connector.soap.SOAPConnector.invoke(SOAPConnector.java:488)
        at com.ibm.ws.management.connector.soap.SOAPConnector.service(SOAPConnector.java:322)
        at com.ibm.ws.management.connector.soap.SOAPConnection.handleRequest(SOAPConnection.java:65)
        at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:733)
        at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:522)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)

[8/29/17 18:01:45:419 IST] 00006095 webcontainer  I com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication CWSRV0250I: Web Module CMSMaterialRequestPortlet has been bound to default_host[*:10012,*:80,*:10014,*:10028,*:10029,*:443,*:10039,*:10042,*:10041].
[8/29/17 18:01:45:448 IST] 00006095 ApplicationMg A   CWWSR0221I: Application started: PA_CMSMaterialRequest
[8/29/17 18:01:45:448 IST] 00006095 CompositionUn A   CWWSR0191I: Composition unit WebSphere:cuname=PA_CMSMaterialRequest in BLA WebSphere:blaname=PA_CMSMaterialRequest started.
[8/29/17 18:03:00:842 IST] 000000f4 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper init Uncaught.init.exception.thrown.by.servlet
[8/29/17 18:03:00:848 IST] 000000f4 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper init Uncaught.init.exception.thrown.by.servlet


当我将此portlet分配给websphere门户中的页面并试图显示portlet gui时,它将显示消息“ Portlet不可用”。原始war文件是使用ant创建的,并且已成功部署。我通过在门户网站服务器中部署此原始war文件进行了测试,它工作正常。

以下是更改类加载器后得到的一些异常代码-----
[9/8/17 1:57:53:969 IST] 0000019d AdminHelper A CWWMN1010I:试图停止PA_CMSMaterialRequest应用程序。 (用户标识= defaultWIMFileBasedRealm / wasadmin)
[9/8/17 1:57:53:970 IST] 0000019d CompositionUn A CWWSR0192I:在BLA中停止合成单元WebSphere:cuname = PA_CMSMaterialRequest WebSphere:blaname = PA_CMSMaterialRequest。
[9/8/17 1:57:53:975 IST] 0000019d ApplicationMg A CWWSR0217I:正在停止应用程序:PA_CMSMaterialRequest
[9/8/17 1:57:54:036 IST] 0000019d webapp我com.ibm.ws.webcontainer.webapp.WebApp日志CWSRV0292I:Servlet消息-[PA_CMSMaterialRequest#CMSMRMSP-0.0.1-SN.war] :。关闭Spring根WebApplicationContext
[9/8/17 1:57:54:722 IST] 0000019d ApplicationMg A CWWSR0220I:应用程序已停止:PA_CMSMaterialRequest
[9/8/17 1:57:56:776 IST] 0000019d CompositionUn A CWWSR0193I:BLA中的组合单元WebSphere:cuname = PA_CMSMaterialRequest已停止:WebSphere:blaname = PA_CMSMaterialRequest已停止。
[9/8/17 1:58:18:601 IST] 0000066b AdminHelper A CWWMN1008I:尝试启动PA_CMSMaterialRequest应用程序。 (用户标识= defaultWIMFileBasedRealm / wasadmin)
[9/8/17 1:58:18:664 IST] 0000066b CompositionUn A CWWSR0190I:在BLA中启动组合单元WebSphere:cuname = PA_CMSMaterialRequest WebSphere:blaname = PA_CMSMaterialRequest。
[9/8/17 1:58:18:690 IST] 0000066b ApplicationMg A CWWSR0200I:启动应用程序:PA_CMSMaterialRequest
[9/8/17 1:58:18:690 IST] 0000066b ApplicationMg A CWWSR0204I:应用程序:PA_CMSMaterialRequest应用程序构建级别:未知
[9/8/17 1:58:21:625 IST] 0000066b webapp我com.ibm.ws.webcontainer.webapp.WebGroupImpl WebGroup CWSRV0169I:正在加载Web模块:CMSMaterialRequestPortlet。
[9/8/17 1:58:21:675 IST] 0000066b WASSessionCor I SessionContextRegistry getSessionContext CWSEN0176I:将为应用程序密钥default_host / wps / PA_CMSMaterialRequest创建一个新的会话上下文
[9/8/17 1:58:21:694 IST] 0000066b MBeanDescript I CWWMN1216I:从访问检查中排除了Portlet mbean中的一个或多个方法。
[9/8/17 1:58:21:703 IST] 0000066b MBeanDescript I CWWMN1216I:从访问检查中排除了PortletApplication mbean中的一个或多个方法。
[9/8/17 1:58:22:099 IST] 0000066b webapp我com.ibm.ws.webcontainer.webapp.WebApp日志CWSRV0292I:Servlet消息-[PA_CMSMaterialRequest#CMSMRMSP-0.0.1-SN.war] :。初始化Spring根WebApplicationContext
[9/8/17 1:58:22:100 IST] 0000066b ContextLoader I org.springframework.web.context.ContextLoader initWebApplicationContext根WebApplicationContext:初始化已开始
[9/8/17 1:58:22:245 IST] 0000066b XmlWebApplica I org.springframework.context.support.AbstractApplicationContext prepareRefresh刷新根WebApplicationContext:启动日期[Fri Sep 08 01:58:22 IST 2017];上下文层次结构的根
[9/8/17 1:58:22:467 IST] 0000066b XmlBeanDefini I org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions从ServletContext资源[/WEB-INF/applicationContext.xml]加载XML bean定义。
[9/8/17 1:58:22:645 IST] 0000066b ContextLoader E org.springframework.web.context.ContextLoader initWebApplicationContext上下文初始化失败
                                 java.lang.NoClassDefFoundError:org.springframework.expression.ExpressionParser
    在java.lang.J9VMInternals.verifyImpl(本机方法)
    在java.lang.J9VMInternals.verify(J9VMInternals.java:94)
    在java.lang.J9VMInternals.initialize(J9VMInternals.java:171)
    在org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:481)
    在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:398)
    在org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)
    在org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)
    在org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    在com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1686)
    在com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:414)
    在com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
    在com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
    在com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
    在com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
    在com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426)
    在com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)
    在com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177)
    在com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
    在com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
    在com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
    在com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776)
    在com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1379)
    在com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2189)
    在com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:446)
    在com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
    在com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:389)
    在com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access $ 500(CompositionUnitMgrImpl.java:117)
    在com.ibm.ws.runtime.component.CompositionUnitMgrImpl $ 1.run(CompositionUnitMgrImpl.java:664)
    在com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5474)
    在com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5600)
    在com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    在com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:678)处
    在com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:622)
    在com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1269)
    在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处
    在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
    在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    在java.lang.reflect.Method.invoke(Method.java:618)
    在sun.reflect.misc.Trampoline.invoke(MethodUtil.java:87)
    在sun.reflect.GeneratedMethodAccessor36.invoke(未知来源)
    在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    在java.lang.reflect.Method.invoke(Method.java:618)
    在sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:291)
    在javax.management.modelmbean.RequiredModelMBean $ 4.run(RequiredModelMBean.java:1260)
    在java.security.AccessController.doPrivileged(AccessController.java:300)
    在java.security.ProtectionDomain $ 1.doIntersectionPrivilege(ProtectionDomain.java:87)
    在javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1254)
    在javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1092)
    在com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831)
    在com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813)
    在com.ibm.ws.management.AdminServiceImpl $ 1.run(AdminServiceImpl.java:1335)
    在com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    在com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
    在com.ibm.ws.management.commands.AdminServiceCommands $ InvokeCmd.execute(AdminServiceCommands.java:251)
    在com.ibm.ws.console.core.mbean.MBeanHelper.invoke(MBeanHelper.java:241)
    在com.ibm.ws.console.appdeployment.ApplicationDeploymentCollectionAction.execute(ApplicationDeploymentCollectionAction.java:578)
    在org.apache.struts.action.RequestProcessor.processActionPerform(未知来源)
    在org.apache.struts.action.RequestProcessor.process(未知来源)
    在org.apache.struts.action.ActionServlet.process(未知来源)
    在org.apache.struts.action.ActionServlet.doPost(未知来源)
    在javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
    在javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    在com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
    在com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
    在com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    在com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    在com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
    在com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:79)
    在com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
    在com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
    在com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1385)
    在com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:194)
    在org.apache.struts.action.RequestProcessor.doForward(未知来源)
    在org.apache.struts.tiles.TilesRequestProcessor.doForward(未知来源)
    在org.apache.struts.action.RequestProcessor.processForwardConfig(未知来源)
    在org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(未知来源)
    在org.apache.struts.action.RequestProcessor.process(未知来源)
    在org.apache.struts.action.ActionServlet.process(未知来源)
    在org.apache.struts.action.ActionServlet.doPost(未知来源)
    在javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
    在javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    在com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
    在com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
    在com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    在com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    在com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
    在com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
    在com.ibm.ws.console.core.servlet.WSCUrlFilter.setUpCommandAssistance(WSCUrlFilter.java:955)
    在com.ibm.ws.console.core.servlet.WSCUrlFilter.continueStoringTaskState(WSCUrlFilter.java:504)
    在com.ibm.ws.console.core.servlet.WSCUrlFilter.doFilter(WSCUrlFilter.java:325)
    在com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
    在com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
    在com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960)
    在com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064)
    在com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3837)
    在com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
    在com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:981)
    在com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)

最佳答案

“不是Servlet类”消息几乎总是表示打包问题,其中应用程序在PARENT_LAST类加载器中包括自己的Servlet API副本。启动Web应用程序时,服务器的Web容器将从应用程序中加载Servlet类。 Web容器链接到服务器的Java EE API中打包的Servlet版本,而应用程序类则链接到与其一起打包的Servlet版本。 JVM认为由单独的类装入器装入的类是不兼容的(无论它们的实际字节码如何),因此导致的转换失败。

解决方案是将Web模块的类加载器切换为PARENT_FIRST,或者从应用程序中删除Servlet API(实际上是任何Java EE API,除非您明确使用自己的版本)。两种解决方案都应消除此问题。

关于java - 在将Maven War部署到Websphere Portal时收到“不是servlet类”错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/45986611/

10-08 21:22