我尝试了JSF2.0、Spring Securty3与Jdeveloper和Weblogic server 10.3.5的示例。我有这些例外
java.lang.noClassDeffounderror:javax/faces/context/facesContext at org.springframework.web.jsf.el.springbeanfaceselresolver.getWebApplicationContext(springbeanfaceselresolver.java:90)at org.springframework.web.jsf.el.springbeanfaceselresolver.getbeanFactory(springbeanfaceselresolver.jave:90)at 176)在com.sun.faces.el.demuxcompositeelresolver.getValue(demuxcompositeelresolver.java:203)在org.jboss.el.parser.astidentifier.getValue(astidentifier.java:44)在org.jboss.el.parser.astvalue.java:63)在org.jboss.el.valueexpressionimpl.getValue(astvalue.java:186)在:148)在com.sun.faces.facelets.compiler.textinstruction.write(TextInstruction.java:85)在com.sun.faces.facelets.compiler.uiInstructions.encodeBegin(UIInstructions.java:82)在com.sun.faces.facelets.compiler.uileaf.encodeAll(UILEAF.java:183)在javax.faces.component.uicomponent.encodeAll(UIcomponent.java:1655)在javax.faces.component.uicomponent.encodeAll view.multiviewHandler.renderView(MultiviewHandler.java:131)在com.sun.faces.lifecycle.renderResponsePhase.execute(RenderResponsePhase.java:121)在com.sun.faces.lifecycle.phase.dophase(Phase.java:101)在com.sun.faces.lifecycle.phase.dophase(Phase.java:101)在com.sun.faces.lifecycle.java:139)在weblog上的ic.servlet.internal.stubsecurityhelper.invokeservlet(stubsecurityhelper.java:125)在weblogic.servlet.internal.tailfilter.doFilter(tailfilter.java:26)在weblogic.servlet.internal.filterchainimpl.doFilter(filterchainimpl.java:56)在oracle.security.jps.ee.http.jpsabsFilter$1在java.security.jps.util.jpsSubject.doasPrivileged(原生方法)在oracle.security.jps.eee.jps.ee在.util.jpsplatformutil.runjaasMode(jpsplatformutil.java:413)在oracle.security.jps.ee.http.jpsfilter.runjaasMode(jpsabsfilter.java:94)在oracle.security.jps.ee.http.jpsfilter.doFilter(jpsfilter.java:161)在oracle.security.jps.ee.http.jpsfilter.java:161)在doFilter(dmsservletfilter.java:136),weblogic.servlet.internal.filterChainimpl.doFilter(filterChainimpl.java:56),weblogic.servlet.internal.re在weblogic.servlet.internal.filterChainimpl.doFilter(filterChainimpl.java:56)在weblogic.servlet.internal.webappServletContext$servletInvocationAction.wraprun(webappServletContext.java:3715)在weblogic.servlet.internal.webappServletContext$servletInvocationAction.run(webappServletContext.java:3681)在.runas(SecurityManager.java:120)在weblogic.servlet.internal.webappServletContext.securedExecute(webappServletContext.java:2277)在weblogic.servlet.internal.webappServletContext.execute(webappServletContext.java:2183)在weblogic.servlet.internal.webappServletContext.execute(webappServletContext.java:2183)在
请帮帮我.
最后,我得到了解决办法。这是因为,WebLogic的classloading问题。我在项目中创建了weblogic.xml。之后,我写了
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>.