javax.faces.view.facelets.TagException:标记库支持命名空间:http://xmlns.oracle.com/adf/faces/rich,但没有为name定义标记:button

时间:2015-03-20 01:33:30

标签: jsf tomcat7 tomcat6 jsf-2.2 oracle-adf

我配置了Tomcat环境,并成功将ADF Essentials部署到使用Jdeveloper11.1.2.4开发的Tomcat6.x上。

现在我正在尝试使用Jdeveloper12c在Tomcat 6.x和Tomcat 7.X上开发一个示例ADF Web应用程序(其中只包含一个带有按钮的页面)。在两台服务器上都出现以下异常

type Exception report

message /M.jsf @15,81 <af:button> Tag Library supports namespace: http://xmlns.oracle.com/adf/faces/rich, but no tag was defined for name: button

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: /M.jsf @15,81 <af:button> Tag Library supports namespace: http://xmlns.oracle.com/adf/faces/rich, but no tag was defined for name: button
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:514)
    oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:65)
    oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
    org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

javax.faces.view.facelets.TagException: /M.jsf @15,81 <af:button> Tag Library supports namespace: http://xmlns.oracle.com/adf/faces/rich, but no tag was defined for name: button
    com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:291)
    com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:232)
    com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
    com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
    com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:766)
    com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:355)
    com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2778)
    com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
    com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
    com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
    com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
    com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
    com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
    javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
    com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:392)
    com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:368)
    com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:124)
    com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:297)
    com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100(DefaultFaceletFactory.java:92)
    com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:162)
    com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:160)
    com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:83)
    com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:78)
    com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
    java.util.concurrent.FutureTask.run(FutureTask.java:262)
    com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:114)
    com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:119)
    com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:62)
    com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:248)
    com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:193)
    com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:741)
    org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.buildView(ViewDeclarationLanguageFactoryImpl.java:341)
    oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:990)
    oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:342)
    oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:236)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
    oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:65)
    oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
    org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
    org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
    org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

在此之后我从该页面删除了按钮,并添加了<af:outputText value="outputText1" id="ot1"/>。现在,此页面已在Tomcat7.x上成功运行。

请帮帮我。事先提前了。

1 个答案:

答案 0 :(得分:0)

如果您使用的是JDeveloper 11.1.x.x,则没有任何名为button的按钮,它可以被称为af:commandButton或af:goButton。

在12c中这两个按钮已被替换为af:按钮,它可以充当af:commandButton或af:goButton,具体取决于它的属性。由于您从12c降级到11g,您需要处理这些并使用等效按钮。另外af:commandButton和af:goButton在12c中工作以实现向后兼容性,所以你可以将它们与12c一起使用,尽管不推荐使用。