在 Tomcat 8.0 服务器上部署应用程序时出现 NoClassDefFoundError
Getting NoClassDefFoundError when deploying application on Tomcat 8.0 server
我正在尝试通过 war
文件将我们的应用程序部署到新服务器 (RHEL 6.9) 上的 Tomcat,并将 运行 部署到 java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory
。我们已经在其他现有服务器上部署了相同的应用程序版本,并且没有任何问题。
这是一个新服务器,我们是第一次部署这个 war
。
我们在 ***/Tomcat8/catalinabasedirs/catalinabase0/customlib
下确实有一些自定义库,并确保其下的 jar 文件版本与我们现有的其他服务器相同。
为了提供更多上下文,此应用程序与其他 EJB 应用程序对话,并且提到的 bean ApplicationNameServiceMonitor 用于检查与其中一个 EJB 应用程序的连接。
我正在尝试获取包含此 class 的 jar 文件并深入研究它以进一步排除故障,同时考虑在此处发布问题以获得一些帮助。
详情如下:
Tomcat version: 8.0.x
Java Home: ***/Tomcat8/reference/jdk1.7.0_121/jre
JVM Version: 1.7.0_121-b32
Spring 包含此 bean 的应用上下文文件>> resources/appcheck/monitor.xml
<beans profile="xyz,abc,applicationname">
<bean id="ApplicationNameServiceMonitor" class="com.mycomany.bbs.group.xy.monitor.MonitorFactory" factory-method="createMonitor" init-method="registerMonitor" c:type="wasejb">
<property name="disable" value="${applicationnameservice.monitor.disable}" />
<property name="service" value="${applicationnameservice.name}" />
<property name="contextFactory" value="${applicationnameservice.ejb.jndi.factory}" />
<property name="url" value="${applicationnameservice.ejb.jndi.url}" />
<property name="version" value="#{'${applicationnameservice.ejb.address}'.substring(8,16).replace('/','.') + '${applicationnameservice.ejb.address}'.substring(16)}" />
<property name="ejbs" value="#{'${applicationnameservice.monitor.services}'.split(',')}" />
<property name="monitorSecurityConfig" ref="monitorSecurityConfigBean"/>
</bean>
</beans>
堆栈跟踪
Message Key:CWPKI0043E: Error creating a chained certificate. The exception that occurred is: java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory. not found in resource bundle:com.ibm.ws.ssl.resources.ssl
org.mule.api.config.ConfigurationException: Error creating bean with name 'ApplicationNameServiceMonitor' defined in class path resource [appcheck/monitor.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory (org.mule.api.lifecycle.InitialisationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69)
at org.mule.context.DefaultMuleContextFactory.configure(DefaultMuleContextFactory.java:108)
at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:222)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:103)
at org.mule.config.builders.MuleXmlBuilderContextListener.createMuleContext(MuleXmlBuilderContextListener.java:165)
at org.mule.config.builders.MuleXmlBuilderContextListener.initialize(MuleXmlBuilderContextListener.java:94)
at org.mule.config.builders.MuleXmlBuilderContextListener.contextInitialized(MuleXmlBuilderContextListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4884)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5347)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.mule.api.lifecycle.InitialisationException: Error creating bean with name 'ApplicationNameServiceMonitor' defined in class path resource [appcheck/monitor.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:112)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:177)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:100)
at org.mule.config.builders.WebappMuleXmlConfigurationBuilder.doConfigure(WebappMuleXmlConfigurationBuilder.java:79)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43)
... 20 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ApplicationNameServiceMonitor' defined in class path resource [appcheck/monitor.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1589)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:108)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:104)
... 24 more
Caused by: java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory
at com.ibm.ws.ssl.config.CertificateManager.selfSignedCertificateCreate(CertificateManager.java:212)
at com.ibm.ws.ssl.config.CertificateManager.chainedCertificateCreate(CertificateManager.java:345)
at com.ibm.ws.ssl.config.KeyStoreManager.checkIfClientKeyStoreAndTrustStoreExistsAndCreateIfNot(KeyStoreManager.java:1432)
at com.ibm.ws.ssl.config.SSLConfigManager.addSSLConfigToMap(SSLConfigManager.java:3135)
at com.ibm.ws.ssl.config.SSLConfigManager.addSSLConfigToMap(SSLConfigManager.java:3113)
at com.ibm.ws.ssl.config.SSLConfigManager.parseSSLConfigURL(SSLConfigManager.java:3032)
at com.ibm.ws.ssl.config.SSLConfigManager.initializeClientSSL(SSLConfigManager.java:420)
at com.ibm.websphere.ssl.JSSEHelper.getInstance(JSSEHelper.java:308)
at com.ibm.ws.security.orbssl.WSSSLClientSocketFactoryImpl.run(WSSSLClientSocketFactoryImpl.java:200)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.security.orbssl.WSSSLClientSocketFactoryImpl.createSSLSocket(WSSSLClientSocketFactoryImpl.java:198)
at com.ibm.ws.orbimpl.transport.WSSSLTransportConnection.createSocket(WSSSLTransportConnection.java:236)
at com.ibm.CORBA.transport.TransportConnectionBase.connect(TransportConnectionBase.java:344)
at com.ibm.ws.orbimpl.transport.WSTransport.run(WSTransport.java:503)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.orbimpl.transport.WSTransport.getConnection(WSTransport.java:500)
at com.ibm.CORBA.transport.TransportBase.getConnection(TransportBase.java:180)
at com.ibm.rmi.iiop.TransportManager.get(TransportManager.java:97)
at com.ibm.rmi.iiop.GIOPImpl.getConnection(GIOPImpl.java:134)
at com.ibm.rmi.iiop.GIOPImpl.locate(GIOPImpl.java:228)
at com.ibm.rmi.corba.ClientDelegate.locate(ClientDelegate.java:1738)
at com.ibm.rmi.corba.ClientDelegate._createRequest(ClientDelegate.java:1763)
at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1054)
at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1131)
at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1506)
at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1032)
at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1472)
at com.ibm.rmi.corba.ClientDelegate.request(ClientDelegate.java:1657)
at com.ibm.CORBA.iiop.ClientDelegate.request(ClientDelegate.java:1428)
at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:449)
at com.ibm.WsnBootstrap._WsnNameServiceStub.getProperties(_WsnNameServiceStub.java:38)
at com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInitCtxFactory.java:1550)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:1043)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:963)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:615)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:128)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:765)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at com.mycomany.bbs.group.xy.monitor.ejb.WASEjbSubSystemMonitor.<init>(WASEjbSubSystemMonitor.java:91)
at com.mycomany.bbs.group.xy.monitor.ejb.WASEjbServiceMonitor.registerMonitor(WASEjbServiceMonitor.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1719)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1656)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1585)
... 35 more
问题已解决。事实证明这是完全不同的问题。 jks 文件 的路径,我们在 中将其称为 keystore 和 truststore =]jvm argument 不正确,这导致代码流经历异常情况,它试图加载某些 class (这就是我的结论)并且缺少导致异常的 jar .由于上述 jar 的 pom 依赖项被指定为 provided
,因此它从不在构建等中抱怨,并且仅在发生这种特定情况时失败。
我正在尝试通过 war
文件将我们的应用程序部署到新服务器 (RHEL 6.9) 上的 Tomcat,并将 运行 部署到 java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory
。我们已经在其他现有服务器上部署了相同的应用程序版本,并且没有任何问题。
这是一个新服务器,我们是第一次部署这个 war
。
我们在 ***/Tomcat8/catalinabasedirs/catalinabase0/customlib
下确实有一些自定义库,并确保其下的 jar 文件版本与我们现有的其他服务器相同。
为了提供更多上下文,此应用程序与其他 EJB 应用程序对话,并且提到的 bean ApplicationNameServiceMonitor 用于检查与其中一个 EJB 应用程序的连接。
我正在尝试获取包含此 class 的 jar 文件并深入研究它以进一步排除故障,同时考虑在此处发布问题以获得一些帮助。
详情如下:
Tomcat version: 8.0.x
Java Home: ***/Tomcat8/reference/jdk1.7.0_121/jre
JVM Version: 1.7.0_121-b32
Spring 包含此 bean 的应用上下文文件>> resources/appcheck/monitor.xml
<beans profile="xyz,abc,applicationname">
<bean id="ApplicationNameServiceMonitor" class="com.mycomany.bbs.group.xy.monitor.MonitorFactory" factory-method="createMonitor" init-method="registerMonitor" c:type="wasejb">
<property name="disable" value="${applicationnameservice.monitor.disable}" />
<property name="service" value="${applicationnameservice.name}" />
<property name="contextFactory" value="${applicationnameservice.ejb.jndi.factory}" />
<property name="url" value="${applicationnameservice.ejb.jndi.url}" />
<property name="version" value="#{'${applicationnameservice.ejb.address}'.substring(8,16).replace('/','.') + '${applicationnameservice.ejb.address}'.substring(16)}" />
<property name="ejbs" value="#{'${applicationnameservice.monitor.services}'.split(',')}" />
<property name="monitorSecurityConfig" ref="monitorSecurityConfigBean"/>
</bean>
</beans>
堆栈跟踪
Message Key:CWPKI0043E: Error creating a chained certificate. The exception that occurred is: java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory. not found in resource bundle:com.ibm.ws.ssl.resources.ssl
org.mule.api.config.ConfigurationException: Error creating bean with name 'ApplicationNameServiceMonitor' defined in class path resource [appcheck/monitor.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory (org.mule.api.lifecycle.InitialisationException)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69)
at org.mule.context.DefaultMuleContextFactory.configure(DefaultMuleContextFactory.java:108)
at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:222)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:103)
at org.mule.config.builders.MuleXmlBuilderContextListener.createMuleContext(MuleXmlBuilderContextListener.java:165)
at org.mule.config.builders.MuleXmlBuilderContextListener.initialize(MuleXmlBuilderContextListener.java:94)
at org.mule.config.builders.MuleXmlBuilderContextListener.contextInitialized(MuleXmlBuilderContextListener.java:70)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4884)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5347)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:755)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:731)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:973)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.mule.api.lifecycle.InitialisationException: Error creating bean with name 'ApplicationNameServiceMonitor' defined in class path resource [appcheck/monitor.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:112)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:177)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:100)
at org.mule.config.builders.WebappMuleXmlConfigurationBuilder.doConfigure(WebappMuleXmlConfigurationBuilder.java:79)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43)
... 20 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ApplicationNameServiceMonitor' defined in class path resource [appcheck/monitor.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1589)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:554)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:108)
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:104)
... 24 more
Caused by: java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory
at com.ibm.ws.ssl.config.CertificateManager.selfSignedCertificateCreate(CertificateManager.java:212)
at com.ibm.ws.ssl.config.CertificateManager.chainedCertificateCreate(CertificateManager.java:345)
at com.ibm.ws.ssl.config.KeyStoreManager.checkIfClientKeyStoreAndTrustStoreExistsAndCreateIfNot(KeyStoreManager.java:1432)
at com.ibm.ws.ssl.config.SSLConfigManager.addSSLConfigToMap(SSLConfigManager.java:3135)
at com.ibm.ws.ssl.config.SSLConfigManager.addSSLConfigToMap(SSLConfigManager.java:3113)
at com.ibm.ws.ssl.config.SSLConfigManager.parseSSLConfigURL(SSLConfigManager.java:3032)
at com.ibm.ws.ssl.config.SSLConfigManager.initializeClientSSL(SSLConfigManager.java:420)
at com.ibm.websphere.ssl.JSSEHelper.getInstance(JSSEHelper.java:308)
at com.ibm.ws.security.orbssl.WSSSLClientSocketFactoryImpl.run(WSSSLClientSocketFactoryImpl.java:200)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.security.orbssl.WSSSLClientSocketFactoryImpl.createSSLSocket(WSSSLClientSocketFactoryImpl.java:198)
at com.ibm.ws.orbimpl.transport.WSSSLTransportConnection.createSocket(WSSSLTransportConnection.java:236)
at com.ibm.CORBA.transport.TransportConnectionBase.connect(TransportConnectionBase.java:344)
at com.ibm.ws.orbimpl.transport.WSTransport.run(WSTransport.java:503)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.orbimpl.transport.WSTransport.getConnection(WSTransport.java:500)
at com.ibm.CORBA.transport.TransportBase.getConnection(TransportBase.java:180)
at com.ibm.rmi.iiop.TransportManager.get(TransportManager.java:97)
at com.ibm.rmi.iiop.GIOPImpl.getConnection(GIOPImpl.java:134)
at com.ibm.rmi.iiop.GIOPImpl.locate(GIOPImpl.java:228)
at com.ibm.rmi.corba.ClientDelegate.locate(ClientDelegate.java:1738)
at com.ibm.rmi.corba.ClientDelegate._createRequest(ClientDelegate.java:1763)
at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1054)
at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1131)
at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1506)
at com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1032)
at com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1472)
at com.ibm.rmi.corba.ClientDelegate.request(ClientDelegate.java:1657)
at com.ibm.CORBA.iiop.ClientDelegate.request(ClientDelegate.java:1428)
at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:449)
at com.ibm.WsnBootstrap._WsnNameServiceStub.getProperties(_WsnNameServiceStub.java:38)
at com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInitCtxFactory.java:1550)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:1043)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:963)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:615)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:128)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:765)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at com.mycomany.bbs.group.xy.monitor.ejb.WASEjbSubSystemMonitor.<init>(WASEjbSubSystemMonitor.java:91)
at com.mycomany.bbs.group.xy.monitor.ejb.WASEjbServiceMonitor.registerMonitor(WASEjbServiceMonitor.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1719)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1656)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1585)
... 35 more
问题已解决。事实证明这是完全不同的问题。 jks 文件 的路径,我们在 中将其称为 keystore 和 truststore =]jvm argument 不正确,这导致代码流经历异常情况,它试图加载某些 class (这就是我的结论)并且缺少导致异常的 jar .由于上述 jar 的 pom 依赖项被指定为 provided
,因此它从不在构建等中抱怨,并且仅在发生这种特定情况时失败。