gpt4 book ai didi

java - Spring 集成应用程序启动时生成种子时 CryptoAPI 意外失败

转载 作者:行者123 更新时间:2023-12-02 09:43:09 30 4
gpt4 key购买 nike

我有一个 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)仍然会遇到此异常:简单的重新启动即可修复问题。

导致此异常的可能原因是什么?我该如何解决这个问题?

最佳答案

看起来这是 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>

关于java - Spring 集成应用程序启动时生成种子时 CryptoAPI 意外失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56891216/

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