gpt4 book ai didi

java - GateIn快速入门: can't deploy JSF2 HelloWorld example

转载 作者:行者123 更新时间:2023-12-01 14:17:16 28 4
gpt4 key购买 nike

我从 jboss.org/gatein 网站获得了这个示例,我只是用

打包了它
mvn package 

所有 Maven 阶段均成功。我将jsf2-hello-world-portlet.war复制到

gatein\server\default\deploy

在 server.log 中我看到以下输出:

2013-08-02 16:01:40,661 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) deploy, ctxPath=/jsf2-hello-world-portlet
2013-08-02 16:01:40,859 ERROR [org.gatein.pc.portlet.impl.container.LifeCycle] (HDScanner) Cannot start object: org.gatein.pc.portlet.container.PortletInitializationException: Portlet class not found javax.portlet.faces.GenericFacesPortlet
at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:277) [:2.3.1-Beta02]
at org.gatein.pc.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:76) [:2.3.1-Beta02]
at org.gatein.pc.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:93) [:2.3.1-Beta02]
...

Caused by: java.lang.ClassNotFoundException: javax.portlet.faces.GenericFacesPortlet
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) [:1.7.0_13]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [:1.7.0_13]
... 89 more

2013-08-02 16:01:41,059 ERROR [org.gatein.pc.portlet.impl.container.LifeCycle] (HDScanner) Cannot start object: org.gatein.pc.portlet.container.PortletInitializationException: Portlet class not found javax.portlet.faces.GenericFacesPortlet
at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:277) [:2.3.1-Beta02]
at org.gatein.pc.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:76) [:2.3.1-Beta02]
...

Caused by: java.lang.ClassNotFoundException: javax.portlet.faces.GenericFacesPortlet
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) [:1.7.0_13]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [:1.7.0_13]
... 89 more

2013-08-02 16:01:41,244 INFO [javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) Initializing Mojarra 2.0.3 ( b05) for context '/jsf2-hello-world-portlet'
2013-08-02 16:02:57,976 INFO [javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) Unsanitized stacktrace from failed start...: com.sun.faces.config.ConfigurationException: java.lang.ClassNotFoundException: org.ajax4jsf.webapp.taglib.EmptyHandler
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass(FaceletTaglibConfigProcessor.java:432) [:1.2_15-20100816-SNAPSHOT]
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:367) [:1.2_15-20100816-SNAPSHOT]
...
Caused by: java.lang.ClassNotFoundException: org.ajax4jsf.webapp.taglib.EmptyHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) [:1.7.0_13]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [:1.7.0_13]
... 80 more

2013-08-02 16:02:58,147 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jsf2-hello-world-portlet]] (HDScanner) Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossMojarra20ConfigureListener: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org.ajax4jsf.webapp.taglib.EmptyHandler
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:351) [:1.2_15-20100816-SNAPSHOT]
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:220) [:1.2_15-20100816-SNAPSHOT]
...
Caused by: java.lang.ClassNotFoundException: org.ajax4jsf.webapp.taglib.EmptyHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:366) [:1.7.0_13]
at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [:1.7.0_13]
... 76 more

2013-08-02 16:02:58,273 ERROR [org.apache.catalina.core.StandardContext] (HDScanner) Error listenerStart
2013-08-02 16:02:58,274 ERROR [org.apache.catalina.core.StandardContext] (HDScanner) Context [/jsf2-hello-world-portlet] startup failed due to previous errors
2013-08-02 16:02:58,278 WARN [org.exoplatform.portal.resource.MainResourceResolver] (HDScanner) Cannot find servlet context module
2013-08-02 16:02:58,278 WARN [org.exoplatform.portal.resource.MainResourceResolver] (HDScanner) Cannot find servlet context module
2013-08-02 16:02:58,279 WARN [org.exoplatform.portal.resource.MainResourceResolver] (HDScanner) Cannot find servlet context module
2013-08-02 16:02:58,280 WARN [org.exoplatform.portal.resource.MainResourceResolver] (HDScanner) Cannot find servlet context module
2013-08-02 16:02:58,286 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (HDScanner) Unexpected exception when attempting to tear down the Mojarra runtime: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:800) [:1.2_15-20100816-SNAPSHOT]
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:302) [:1.2_15-20100816-SNAPSHOT]
...

2013-08-02 16:02:58,433 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Start: name=jboss.web.deployment:war=/jsf2-hello-world-portlet state=Create mode=Manual requiredState=Installed: org.jboss.deployers.spi.DeploymentException: URL file:/D:/java/GateIn-3.2.0.Final-jbossas6/server/default/tmp/vfs/automountdd006d65fe966d21/jsf2-hello-world-portlet.war-b2279a82cf9db53d/ deployment failed
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:325) [:6.0.0.Final]
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146) [:6.0.0.Final]
...

2013-08-02 16:02:58,795 WARN [org.jboss.profileservice.deployment.hotdeploy.HDScanner] (HDScanner) Scan failed: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS IN ERROR:
Deployment "jboss.web.deployment:war=/jsf2-hello-world-portlet" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/D:/java/GateIn-3.2.0.Final-jbossas6/server/default/tmp/vfs/automountdd006d65fe966d21/jsf2-hello-world-portlet.war-b2279a82cf9db53d/ deployment failed

at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.0.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]
...

请注意,同一 GateIn Quickstarts 中的“simplest-hello-world-portlet”部署成功(我可以使用它添加到页面),并且我自己的示例 portlet 部署成功,但是当我将其添加到新门户时页面,它给我写的是“Portlet 错误”而不是 Portlet 的内容。

我正在使用 JBoss GateIn 3.2.0。

最佳答案

JSF 库丢失。它们必须添加到服务器的库或 web 应用程序的库中(只需删除 pom.xml 中的“provided”范围)。

请注意,快速入门仅使用 Gatein 3.6 和 JBoss AS 7 进行了测试,如所述 here 。使用此配置,它可以正常工作,开箱即用。

关于java - GateIn快速入门: can't deploy JSF2 HelloWorld example,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18017839/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com