项目

一般

简介

V10控制台访问不了报java.lang.NoClassDefFoundError: Could not initialize class com.sun.org.apache.xerces.internal.impl.xs.SchemaGrammar

由 吕 鹏钦 在 超过 2 年 之前添加

问题描述:报错如下

[2022-05-08T10:35:13] [] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=121 _ThreadName=ApusicLogManager] [timeMillis: 1651977313797] [levelValue: 1000] [[
  Exception during lifecycle processing
java.lang.NoClassDefFoundError: Could not initialize class com.sun.org.apache.xerces.internal.impl.xs.SchemaGrammar
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.<init>(XMLSchemaValidator.java:1130)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.configurePipeline(XML11Configuration.java:1206)
    at com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration.configurePipeline(XIncludeAwareParserConfiguration.java:156)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
    at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:294)
    at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:221)
    at com.sun.enterprise.deployment.archivist.Archivist.readStandardDeploymentDescriptor(Archivist.java:655)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:367)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:247)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:256)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:217)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:137)
    at com.apusic.aas.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:183)
    at com.apusic.aas.javaee.core.deployment.DolProvider.load(DolProvider.java:214)
    at com.apusic.aas.javaee.core.deployment.DolProvider.load(DolProvider.java:73)
    at com.apusic.enterprise.v10.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:861)
    at com.apusic.enterprise.v10.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:801)
    at com.apusic.enterprise.v10.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:356)
    at com.apusic.enterprise.v10.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:384)
    at com.apusic.enterprise.v10.admin.adapter.InstallerThread.load(InstallerThread.java:189)
    at com.apusic.enterprise.v10.admin.adapter.InstallerThread.run(InstallerThread.java:78)
]]

解决方法:

将com.sun.org.apache.xerces包中多出的rt.jar删除即可。