eclipse 命名空间 http://xmlns.jcp.org/jsf/core 中名为 passThroughAttribute 的标签定义了一个空处理程序类
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18600101/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The tag named passThroughAttribute from namespace http://xmlns.jcp.org/jsf/core has a null handler-class defined
提问by Mahmoud Saleh
i am trying to use JSF 2.2.2 on Jboss 7.1.1.Final i followed the solution 1 in this link: http://www.mastertheboss.com/jsf/installing-jsf-22-on-jboss-as-7that is based on replacing the current jboss jsf libraries and after that i changed the faces config. but when trying to run the application i am getting the following exception:
我正在尝试在 Jboss 7.1.1.Final 上使用 JSF 2.2.2 我遵循此链接中的解决方案 1:http: //www.mastertheboss.com/jsf/installing-jsf-22-on-jboss-as-7这是基于替换当前的 jboss jsf 库,之后我更改了faces 配置。但是在尝试运行应用程序时,我收到以下异常:
22:28:56,076 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Critical error during deployment: : com.sun.faces.config.ConfigurationException: The tag named passThroughAttribute from namespace http://xmlns.jcp.org/jsf/core has a null handler-class defined
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:422) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:378) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:321) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:270) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:437) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214) [jsf-impl-2.2.2.jar:2.2.2]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]
22:28:56,080 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/motivosity]] (MSC service thread 1-1) Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: The tag named passThroughAttribute from namespace http://xmlns.jcp.org/jsf/core has a null handler-class defined
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:273) [jsf-impl-2.2.2.jar:2.2.2]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]
Caused by: com.sun.faces.config.ConfigurationException: The tag named passThroughAttribute from namespace http://xmlns.jcp.org/jsf/core has a null handler-class defined
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:422) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:378) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:321) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:270) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:437) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214) [jsf-impl-2.2.2.jar:2.2.2]
... 8 more
22:28:56,087 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Error listenerStart
22:28:56,088 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Context [/motivosity] startup failed due to previous errors
22:28:56,089 SEVERE [javax.faces] (MSC service thread 1-1) Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.
22:28:56,090 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Unexpected exception when attempting to tear down the Mojarra runtime: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1135) [jsf-api-2.2.2.jar:2.2]
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:379) [jsf-api-2.2.2.jar:2.2]
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:140) [jsf-impl-2.2.2.jar:2.2.2]
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:310) [jsf-impl-2.2.2.jar:2.2.2]
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3489) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3999) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3917) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]
22:28:56,095 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/motivosity]] (MSC service thread 1-1) Cleaning up Shiro Environment
22:28:56,099 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.web.deployment.default-host./motivosity: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./motivosity: JBAS018040: Failed to start context
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]
i removed the configuration for jsf in project facets and still get same error, please advise how can i fix that.
我在项目方面删除了 jsf 的配置,但仍然出现相同的错误,请告知我该如何解决。
UPDATE:i found out that the issue is in eclipse deploy to jboss, since i tried to install the application with maven and copied the war to deployments folder and launched standalone.batfile and the application was started successfully with no errors.
更新:我发现问题出在eclipse 部署到 jboss 中,因为我尝试使用 maven 安装应用程序并将 war 复制到部署文件夹并启动了standalone.bat文件,应用程序成功启动,没有错误。
回答by Nik?a Baldun
In Eclipse, go to Project Properties -> Project Facets -> Java Server Faces, and set type to Library Provided by Target Runtime.
在 Eclipse 中,转到 Project Properties -> Project Facets -> Java Server Faces,并将 type 设置为Library Provided by Target Runtime。
回答by Jayaram
I had the similar issue when we migrated our application, please make sure you have included jsf
jars in scope provided
like below:
当我们迁移我们的应用程序时,我遇到了类似的问题,请确保您已经包含 jsf
了scope provided
如下所示的jars :
<jsf.version>2.2.2</jsf.version>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>${jsf.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>${jsf.version}</version>
<scope>provided</scope>
</dependency>
change your project facet
(Project->Properties->Project Facets)
and make sure your jsf
is poiting to the right set of jar
改变你的project facet
(Project->Properties->Project Facets)
并确保你jsf
指向正确的一组jar
Do a clean build, hope this will resolve the above issue
做一个干净的构建,希望这能解决上述问题
回答by Linh Nguyen
I had the same problem as you. I solved it by removing this dependency in my pom.xml.
我和你有同样的问题。我通过在我的 pom.xml 中删除这个依赖来解决它。
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.2.0-m15</version>
</dependency>
This dependency is only needed when deploying on Tomcat, not on Jboss.
仅在 Tomcat 上部署时才需要此依赖项,而不是在 Jboss 上。
回答by Richard Martínez
I had same problem, I solved change this Java Server Faces, go to right click to your proyect and go to Properties->Project Facets->Java Server Faces and change
from: "Jsf 2.2 (Mojarra 2.2.0)"
to "Jsf 2.0 (Mojarra 2.0.3-FCS)"
我同样的问题,我解决了改变这种Java服务器面临,请右键单击您proyect并转到属性- >项目Facets-> Java服务器的面孔和变化
来自:“JSF 2.2(钻嘴鱼科2.2.0)”
到“JSF 2.0 (Mojarra 2.0.3-FCS)"
回答by mstiri
I had the same problem. You'd have to your project libraries and remove the Mojarra 2.2.x implementation JAR
我有同样的问题。您必须使用项目库并删除 Mojarra 2.2.x 实现 JAR
回答by Dmitriy Merkushov
In NetBeans, you'll have to uncheck "Package" option against JSF library in the Project Properties window.
在 NetBeans 中,您必须在“项目属性”窗口中针对 JSF 库取消选中“包”选项。