3

将 tomahawk-1.1.11.jar 文件添加到我的 Web 应用程序的 WEB-INF/lib 并收到错误消息:

Exception sending context initialized event to listener instance of class    
com.sun.faces.config.ConfigureListener:   
java.lang.RuntimeException:java.lang.LinkageError: Failed to link 
org/apache/myfaces/custom/aliasbean/AliasBeanTagHandler

Caused by: java.lang.ClassNotFoundException: com.sun.facelets.tag.jsf.ComponentHandler 
from [Module "deployment.appFramework.war:main" from Service Module Loader]

有什么想法可能是错的吗?

堆栈跟踪:

10:44:14,813 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].
[/appFramework]] (MSC service thread 1-7) Exception sending context initialized event 
to listener instance of class 
com.sun.faces.config.ConfigureListener:java.lang.RuntimeException: 
java.lang.LinkageError: Failed to link org/apache/myfaces/custom/aliasbean
/AliasBeanTagHandler (Module "deployment.appFramework.war:main" from Service Module 
Loader)
at 
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292) 
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at 
org.apache.catalina.core.StandardContext.contextListenerStart
(StandardContext.java:3368)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) 
[jbossweb-7.0.1
.Final.jar:7.0.2.Final]
at   
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) 
[jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService
(ServiceControllerImpl.java:1824)
at 
org.jboss.msc.service.ServiceControllerImpl$StartTask.run
(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_30]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)   
[:1.6.0_30]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]
Caused by: java.lang.LinkageError: Failed to link org/apache/myfaces/custom/aliasbean
/AliasBeanTagHandler (Module "deployment.NAISFramework.war:main" from Service Module 
Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
at org.jboss.modules.Module.loadModuleClass(Module.java:590)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
at  
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked
(ConcurrentClassLoader.java:361)
at  
org.jboss.modules.ConcurrentClassLoader.performLoadClass
(ConcurrentClassLoader.java:310)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
at com.sun.faces.util.Util.loadClass(Util.java:332) 
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at 
com.sun.faces.config.processor.AbstractConfigProcessor.loadClass
(AbstractConfigProcessor.java:311) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at 
com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processComponent
(FaceletTaglibConfigProcessor.java:568) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-
SNAPSHOT]
at  
com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags
(FaceletTaglibConfigProcessor.java:361) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-
SNAPSHOT]
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary
(FaceletTaglibConfigProcessor.java:314) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-
SNAPSHOT]
at   
com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process
(FaceletTaglibConfigProcessor.java:263) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-
SNAPSHOT]
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:363)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at    
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225) 
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
... 8 more
Caused by: java.lang.NoClassDefFoundError: com/sun/facelets/tag/jsf/ComponentHandler
    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_30]
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_30]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_30]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)   
[:1.6.0_30]
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
    ... 23 more
Caused by: java.lang.ClassNotFoundException: 
com.sun.facelets.tag.jsf.ComponentHandler from [Module
"deployment.appFramework.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked
(ConcurrentClassLoader.java:361)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked
(ConcurrentClassLoader.java:333)
    at   
org.jboss.modules.ConcurrentClassLoader.performLoadClass
(ConcurrentClassLoader.java:310)
    at    
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
    ... 28 more

10:44:14,907 ERROR [org.apache.catalina.core.StandardContext] 
(MSC service thread 1-7)   Error listenerStart
10:44:14,907 ERROR [org.apache.catalina.core.StandardContext] 
(MSC service thread 1-7)   Context [/appFramework] startup failed due to previous 
errors
10:44:14,907 INFO  [javax.enterprise.resource.webcontainer.jsf.lifecycle] (MSC   
service   
thread 1-7) JSF1027: [null] The ELResolvers for JSF were not registered with the JSP 
container.

10:44:14,922 INFO  [org.jboss.web] (MSC service thread 1-7) registering web context: 
/appFramework
10:44:14,922 INFO  [org.jboss.as] (MSC service thread 1-5) JBoss AS 7.0.2.Final "Arc" 
started in 287
50ms - Started 454 of 511 services (57 services are passive or on-demand)
10:44:14,969 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2)   
Deployed "appFramework.war"
4

1 回答 1

5

Tomahawk 1.1.11有两种版本:

此异常表明您正在尝试在仅支持 JSF 2.0 的环境中安装“Tomahawk 1.1.11 for JSF 1.2”。删除那些错误的 Tomahawk JAR,下载正确的 Tomahawk 版本,然后将其 JAR 放入其中/WEB-INF/lib

于 2012-04-24T12:46:46.390 回答