java.lang.NoClassDefFoundError: org/ajax4jsf/resource/InternetResourceBuilder
我的应用程序使用JSF 2和Richfaces 3.3.3,Mojarra 2.0.2在Glassfish 3.1上工作正常,但是每当我在Tomcat 7.0.10上移植时,每次我遇到一个或另一个问题时。 它始于无法检测jsf_core.tld,然后是一些JSF渲染问题,最后是这个问题。 最后,我发现了一些我在这里提到的,我找不到解决方案的方法。
Mar 31, 2011 8:57:52 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org/ajax4jsf/resource/InternetResourceBuilder
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:294)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4651)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5154)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5149)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org/ajax4jsf/resource/InternetResourceBuilder
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
... 8 more
Caused by: java.lang.NoClassDefFoundError: org/ajax4jsf/resource/InternetResourceBuilder
at org.ajax4jsf.renderkit.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:586)
at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:472)
at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:796)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:294)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:213)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:338)
... 9 more
My application, which uses JSF 2 and Richfaces 3.3.3, and mojarra 2.0.2 works fine on Glassfish 3.1 , but whenever i port it on Tomcat 7.0.10, every time i get one or the other problem.
It started with failure to detect jsf_core.tld , followed by some JSF rendering issue and finally this one.
Lastly i found some which i m mentioning here and which i cannot find a way around to fix.
Mar 31, 2011 8:57:52 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org/ajax4jsf/resource/InternetResourceBuilder
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:294)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4651)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5154)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5149)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org/ajax4jsf/resource/InternetResourceBuilder
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:226)
... 8 more
Caused by: java.lang.NoClassDefFoundError: org/ajax4jsf/resource/InternetResourceBuilder
at org.ajax4jsf.renderkit.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:586)
at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:472)
at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:796)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:294)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:213)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:338)
... 9 more
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您在运行时类路径中拥有 RichFaces impl JAR 文件,但没有 RichFaces API JAR。
堆栈跟踪证明了这一点:
at org.ajax4jsf.renderkit.ChameleonRenderKitFactory
行表明该特定类已成功加载并执行(否则它不会显示为at xxx
在堆栈跟踪中)。此类是 RichFaces impl JAR 文件的一部分。InternetResourceBuilder
又是 RichFaces API JAR 文件的一部分。这显然在运行时类路径中缺失。至少,这正是异常告诉我们的。You've the RichFaces impl JAR file, but not the RichFaces API JAR in the runtime classpath.
The stacktrace is evidence of this:
The
at org.ajax4jsf.renderkit.ChameleonRenderKitFactory
line indicates that this particular class was successfully loaded and executed (otherwise it wouldn't have shown up as anat xxx
in the stacktrace at all). This class is part of RichFaces impl JAR file. TheInternetResourceBuilder
is in turn part of the RichFaces API JAR file. This is apparently missing in the runtime classpath. At least, that's just exactly what the exception is telling us.从例外情况来看,似乎找不到 Richfaces。将 jar 放入类路径中(对于 Tomcat WEB-INF/lib 或 WEB-INF/classes),然后重试。
From the exception it seems that Richfaces cannot be found. Put the jar in your classpath (for Tomcat WEB-INF/lib or WEB-INF/classes) and try again.