Я пытаюсь развернуть наше приложение через файл war
в Tomcat на новом сервере (RHEL 6.9) и столкнулся с java.lang.NoClassDefFoundError: com/ibm/security/certclient/util/PkSsCertFactory
. Мы развернули ту же версию приложения на других существующих серверах, и на них нет проблем.
Это новый сервер, и мы впервые внедряем этот war
.
У нас есть несколько пользовательских библиотек под ***/Tomcat8/catalinabasedirs/catalinabase0/customlib
, и мы убедились, что версия файлов jar под ними такая же, как и у других наших существующих серверов.
Чтобы получить больше контекста, это приложение взаимодействует с другими приложениями EJB, а упомянутый компонент ApplicationNameServiceMonitor предназначен для проверки подключения к одному из приложений EJB.
Я пытаюсь получить jar-файл, содержащий этот класс, и покопаться в нем, чтобы устранить неполадки, в то же время подумал о том, чтобы опубликовать вопрос здесь, чтобы получить некоторую помощь.
Ниже приведены подробности:
Версия Tomcat: 8.0.x
Java Home: *** / Tomcat8 / reference / jdk1.7.0_121 / jre
Версия JVM: 1.7.0_121-b32
Файл контекста приложения Spring, содержащий этот компонент >> 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>
StackTrace
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$2.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$1.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$1.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$1.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