我目前正在使用WebSphere7.0应用服务器上部署的EAR(带有OpenFaces web项目)体验ClassNotFoundException。EAR的部署没有任何问题,但是当我从web项目(包括在EAR中)访问一个页面时,我会得到ClassNotFoundException(如下所示)。我已经导出了EAR以确保所有内容都在那里并且包含了WAR文件。当我查看WAR文件时,未找到的类包含在WEB-INF/classes文件夹中。异常指的是web项目中的类,而不是JAR中的类。我猜我在我的项目配置中遗漏了一些东西。任何和所有的反馈都非常感谢!
[4/3/13 15:42:49:462 EDT] 0000001b Digester E org.apache.commons.digester.Digester startElement Begin event threw exception
java.lang.ClassNotFoundException: org.openfaces.demo.services.MenuItem
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:111)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:510)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
at org.apache.commons.digester.Rule.begin(Rule.java:175)
at org.apache.commons.digester.Digester.startElement(Digester.java:1453)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1296)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:340)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:307)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:212)
at org.apache.commons.digester.Digester.parse(Digester.java:1765)
at org.openfaces.demo.services.MenuService.loadMenu(MenuService.java:75)
at org.openfaces.demo.services.MenuService.<init>(MenuService.java:215)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1345)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:190)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:107)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:374)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:88)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
at org.apache.el.parser.AstValue.getValue(AstValue.java:91)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:263)
at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:100)
at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:860)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:836)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
at org.openfaces.ajax.AjaxViewRoot.encodeAll(AjaxViewRoot.java:124)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:292)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:223)
at org.openfaces.ajax.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:64)
at org.openfaces.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:413)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:114)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at org.openfaces.util.ResourceFilter.doFilter(ResourceFilter.java:99)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
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:165)
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:1604)
[4/3/13 15:42:49:587 EDT] 0000001b webapp I com.ibm.ws.webcontainer.webapp.WebApp log SRVE0296E: [OlympusAetherUIEAR#OlympusAetherUI.war][/OlympusAetherUI][Servlet.LOG]:.Error at line 26 char 12: org.openfaces.demo.services.MenuItem:.java.lang.ClassNotFoundException: org.openfaces.demo.services.MenuItem
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
at org.apache.commons.digester.Digester.startElement(Digester.java:1456)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1296)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:340)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:307)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:212)
at org.apache.commons.digester.Digester.parse(Digester.java:1765)
at org.openfaces.demo.services.MenuService.loadMenu(MenuService.java:75)
at org.openfaces.demo.services.MenuService.<init>(MenuService.java:215)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1345)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:190)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:107)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:374)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:88)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
at org.apache.el.parser.AstValue.getValue(AstValue.java:91)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:263)
at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:100)
at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:860)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:946)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:836)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
at org.openfaces.ajax.AjaxViewRoot.encodeAll(AjaxViewRoot.java:124)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:292)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:223)
at org.openfaces.ajax.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:64)
at org.openfaces.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:413)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:114)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at org.openfaces.util.ResourceFilter.doFilter(ResourceFilter.java:99)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
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:165)
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:1604)
找到了问题的源头。commons-digester.jar需要位于WEB-INF/lib中,以便能够找到MenuItem类,因为EAR类路径对web类路径没有可见性。
本文向大家介绍两种Eclipse部署动态web项目方法,包括了两种Eclipse部署动态web项目方法的使用技巧和注意事项,需要的朋友参考一下 和MyEclipse不一样,在Eclipse中做的Web项目默认是不支持将项目发布到Web服务器上的,会发布到工作空间的某个目录,因此无法在外部启动Tomcat来运行Web项目,只有打开Eclipse中的服务器,才能运行Web项目。所以要对Eclipse进
问题内容: 关于使用Maven和Eclipse创建Java Web应用程序,我有几个问题: 如何使用Maven创建带有servlet,jsp和其他类的Java Web项目? 它创建一个简单的目录结构,src-> main-> java。我在哪里以及如何放置web-inf文件夹? 我是否需要将jdbc-drivers手动添加到web-inf / lib内的文件夹中,还是可以指出依赖项? 有没有办法用
Java服务端的Web组件(JavaEE)提供动态扩展能力允许你在web容器或者应用服务器中运行你的程序,就像Servlet这个名字的意思,接收客户端的请求返回响应,在MVC架构中充当控制器的角色,Servlet的响应通过视图组件--JSP来渲染,下图展示了一个典型的MVC架构的Java应用。 WAR(web application archive)用来捆绑Web组件、编译生成的class文件以及
本文向大家介绍Docker部署web项目的实现,包括了Docker部署web项目的实现的使用技巧和注意事项,需要的朋友参考一下 上一篇已经安装好docker服务,下面继续介绍如何部署web项目 一:随便创建目录dock,准备好如下文件: 二、编写Dockerfile,通过它能快速地构建docker镜像 新增如下配置 解释: (1)FROM centos 表示从docker官方仓库中获取centos
为了实现这一点,我遵循了简单的步骤。将Tomcat和Maven与eclipse集成。1.打开eclipse。新的-
2. 项目部署 本章主要介绍如何部署Camel。 首先,介绍Vagrant这个虚拟机工具。借助Vagrant,我们可以保证本地开发及测试环境与线上环境的一致。 随后介绍slb-admin的部署。管理端本地也要安装Dengine,用以测试Nginx配置文件的语法是否正确。此外,还需要部署数据库:MySQL及MongoDB。 最后介绍Nginx服务器的部署。我们可以根据具体需求部署Nginx集群,每台