gpt4 book ai didi

maven - java.lang.NoSuchMethodError : org. apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar 错误

转载 作者:行者123 更新时间:2023-12-01 09:06:38 25 4
gpt4 key购买 nike

当我尝试使用 Maven 构建我的第一个项目时,出现以下异常

SEVERE: Critical error during deployment: 
java.lang.NoSuchMethodError: org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V
at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
at com.sun.faces.config.DbfFactory.initStatics(DbfFactory.java:248)
at com.sun.faces.config.DbfFactory.<clinit>(DbfFactory.java:208)
at com.sun.faces.config.ConfigManager$ParseTask.<init>(ConfigManager.java:893)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:653)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
25/09/2011 02:40:15 م 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: java.lang.NoSuchMethodError: org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NoSuchMethodError: org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar([Lorg/apache/xerces/xni/parser/XMLInputSource;)V
at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:594)
at com.sun.faces.config.DbfFactory.initStatics(DbfFactory.java:248)
at com.sun.faces.config.DbfFactory.<clinit>(DbfFactory.java:208)
at com.sun.faces.config.ConfigManager$ParseTask.<init>(ConfigManager.java:893)
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:653)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:322)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
... 15 more
25/09/2011 02:40:15 م org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
25/09/2011 02:40:15 م org.apache.catalina.core.StandardContext start
SEVERE: Context [/spring_faces] startup failed due to previous errors
25/09/2011 02:40:16 م org.icefaces.impl.push.servlet.ICEpushResourceHandler notifyContextShutdown
INFO: MainServlet not found in application scope: java.lang.NullPointerException
25/09/2011 02:40:16 م com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: 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:894)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:319)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:112)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:325)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4011)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4615)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4512)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
25/09/2011 02:40:16 م org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
25/09/2011 02:40:16 م org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: A web application registered the JBDC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
25/09/2011 02:40:16 م org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [null] (value [javax.faces.context.FacesContext$1@678fb397]) and a value of type [com.sun.faces.config.InitFacesContext] (value [com.sun.faces.config.InitFacesContext@b57b39f]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.

最佳答案

显然,stacktrace 与 maven 无关。相反,它是部署 Web 应用程序的错误。

引自this可能相关的讨论主题。

You're probably picking up an incompatible mix of classes from Xerces 2.8.1 and some old version of Xerces (something prior to 2.7.0) which is somewhere on your classpath or perhaps in the endorsed directory of your JDK 1.4 installation.

关于maven - java.lang.NoSuchMethodError : org. apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7545340/

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