关于org / hibernate / validator / ValidationMessages,我得到奇怪的NoClassDefFoundError错误,尽管接口在classpath中。 我在jboss 7.0.1上部署了ear,我也使用了jboss-seam 2.3.0.Final。 这是堆栈跟踪
12:51:01,441 WARN [org.jboss.modules] (http--127.0.0.1-8080-1) Failed to define class org/hibernate/validator/ValidationMessages in Module "deployment.MCMS-ear.ear.MCMS.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/hibernate/validator/ValidationMessages (Module "deployment.MCMS-ear.ear.MCMS.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:588)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2289) [:1.6.0_31]
at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1364) [:1.6.0_31]
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1328) [:1.6.0_31]
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1282) [:1.6.0_31]
at java.util.ResourceBundle.findBundle(ResourceBundle.java:1282) [:1.6.0_31]
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1224) [:1.6.0_31]
at java.util.ResourceBundle.getBundle(ResourceBundle.java:952) [:1.6.0_31]
at org.jboss.seam.core.ResourceLoader.loadBundle(ResourceLoader.java:74) [jboss-seam.jar:]
at org.jboss.seam.core.SeamResourceBundle.loadBundlesForCurrentLocale(SeamResourceBundle.java:99) [jboss-seam.jar:]
at org.jboss.seam.core.SeamResourceBundle.getBundlesForCurrentLocale(SeamResourceBundle.java:78) [jboss-seam.jar:]
at org.jboss.seam.core.SeamResourceBundle.handleGetObject(SeamResourceBundle.java:142) [jboss-seam.jar:]
at java.util.ResourceBundle.getObject(ResourceBundle.java:368) [:1.6.0_31]
at java.util.ResourceBundle.getString(ResourceBundle.java:334) [:1.6.0_31]
at com.sun.faces.application.resource.ResourceManager.getLocalePrefix(ResourceManager.java:460) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at com.sun.faces.application.resource.ResourceManager.findResource(ResourceManager.java:162) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at com.sun.faces.application.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:143) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at org.richfaces.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:267) [richfaces-core-impl-4.2.2.Final.jar:]
at org.richfaces.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:275) [richfaces-core-impl-4.2.2.Final.jar:]
at com.sun.faces.renderkit.html_basic.ScriptRenderer.encodeEnd(ScriptRenderer.java:102) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at org.richfaces.component.UITransient.encodeEnd(UITransient.java:236) [richfaces-core-impl-4.2.2.Final.jar:]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.richfaces.renderkit.html.ResourceRenderer.encodeResource(ResourceRenderer.java:33) [richfaces-core-impl-4.2.2.Final.jar:]
at org.richfaces.renderkit.html.ResourceLibraryRenderer.encodeEnd(ResourceLibraryRenderer.java:75) [richfaces-core-impl-4.2.2.Final.jar:]
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:883) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at com.sun.faces.renderkit.html_basic.HeadRenderer.encodeHeadResources(HeadRenderer.java:105) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at com.sun.faces.renderkit.html_basic.HeadRenderer.encodeBegin(HeadRenderer.java:80) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:828) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1650) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:88) [jboss-seam.jar:]
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.0.4-b09-jbossorg-4.jar:2.0.4-b09-jbossorg-4]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:]
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:]
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:388) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.1.Final.jar:7.0.1.Final]
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49) [jboss-as-jpa-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.1.Final]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_31]
Caused by: java.lang.NoClassDefFoundError: IllegalName: org/hibernate/validator/ValidationMessages
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:476) [:1.6.0_31]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625) [:1.6.0_31]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_31]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_31]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
... 75 more
答案 0 :(得分:0)
之后我做了很多改动,异常消失了,所以我还是不知道原因......