我有一个spring集成应用程序,使用jdk1.8.0_151-X64在Windows(Windows Server 2012 R2)上启动时失败,但有以下例外:
INFO [main] o.s.c.s.ClassPathXmlApplicationContext [AbstractApplicationContext.java:574] Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1b604f19: startup date [Thu Jul 04 15:17:39 CEST 2019]; root of context hierarchy
INFO [main] o.s.b.f.x.XmlBeanDefinitionReader [XmlBeanDefinitionReader.java:317] Loading XML bean definitions from class path resource [cpm-dml-common-error.xml]
INFO [main] o.s.b.f.x.XmlBeanDefinitionReader [XmlBeanDefinitionReader.java:317] Loading XML bean definitions from URL [jar:file:/D:/CPM/dml/adapter-versions/cpm-dml-subscriber-bla-1.2.0.RELEASE/lib/cpm-dml-common-3.0.0.RELEASE.jar!/dml-file-shutdown.xml]
ERROR [main] c.h.g.d.i.u.Adapter [Adapter.java:73] Exception initialising application context. Process will exit
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:dml-file-shutdown.xml]
Offending resource: class path resource [cpm-dml-subscriber-bla-top-level.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/D:/CPM/dml/adapter-versions/cpm-dml-subscriber-bla-1.2.0.RELEASE/lib/cpm-dml-common-3.0.0.RELEASE.jar!/dml-file-shutdown.xml]; nested exception is java.lang.InternalError: Unexpected CryptoAPI failure generating seed
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:229) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:180) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:165) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:138) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:94) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:508) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:252) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:605) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:509) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at c.h.g.d.i.u.Adapter.<init>(Adapter.java:47) ~[dml_core-5.0.0.RELEASE.jar:5.0.0.RELEASE]
at c.h.g.d.i.u.Adapter.main(Adapter.java:70) ~[dml_core-5.0.0.RELEASE.jar:5.0.0.RELEASE]
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [jar:file:/D:/CPM/dml/adapter-versions/cpm-dml-subscriber-bla-1.2.0.RELEASE/lib/cpm-dml-common-3.0.0.RELEASE.jar!/dml-file-shutdown.xml]; nested exception is java.lang.InternalError: Unexpected CryptoAPI failure generating seed
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:223) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
... 21 common frames omitted
Caused by: java.lang.InternalError: Unexpected CryptoAPI failure generating seed
at sun.security.provider.NativeSeedGenerator.getSeedBytes(NativeSeedGenerator.java:62) ~[na:1.8.0_151]
at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:144) ~[na:1.8.0_151]
at sun.security.provider.SecureRandom$SeederHolder.<clinit>(SecureRandom.java:203) ~[na:1.8.0_151]
at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:221) ~[na:1.8.0_151]
at java.security.SecureRandom.nextBytes(SecureRandom.java:468) ~[na:1.8.0_151]
at java.util.UUID.randomUUID(UUID.java:145) ~[na:1.8.0_151]
at org.springframework.integration.jmx.config.MBeanExporterParser.resolveId(MBeanExporterParser.java:87) ~[spring-integration-jmx-4.1.6.RELEASE.jar:na]
at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:64) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler.parse(AbstractIntegrationNamespaceHandler.java:58) ~[spring-integration-core-4.1.6.RELEASE.jar:na]
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1411) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1401) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:168) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:138) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:94) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:508) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
... 26 common frames omitted
该应用程序是服务器上运行的唯一Java进程。重新启动应用程序不起作用,相同的异常不断出现。
我已经测试了在jdk1.7.0_11-x64上运行其他spring集成应用程序,它们在大多数情况下运行良好,但有时(〜1/20)仍会遇到此异常:一次简单的重启即可解决该问题。 / p>
此异常的可能原因是什么?我该如何解决?
答案 0 :(得分:1)
看起来这是Java方面的某种错误:https://bugs.openjdk.java.net/browse/JDK-8057894
与此同时,您的堆栈跟踪将我们引到MBeanExporterParser
中的以下代码:
if (id.matches(IntegrationMBeanExporter.class.getName() + "#[0-9]+")) {
// Randomize the name in case there are multiple contexts in the same JVM
id += "#" + UUID.randomUUID();
}
您介意为您的id
添加一个明确的<int-jmx:mbean-export>
吗?