Исключения с использованием последнего выпуска Websphere Liberty
Я смотрю на последнюю версиюWebSphere Liberty Profile 8.5.5.7 полная платформа, и я попытался развернуть свой существующий ear без успеха. В server.xml
я добавил:
<featureManager>
<feature>javaee-7.0</feature>
</featureManager>
Но в журнале ffdc я получаю:
Caused by: java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceException
И мое ухо не заряжено.Один из моих бобов имеет импорт javax.xml.rpc.ServiceException
Насколько я знаю, ServiceException
является частью спецификации Java EE 7.
Полное исключение в журнале ffdc:
------Start of DE processing------ = [10/29/15 15:32:11:134 CET]
Exception = com.ibm.ws.container.service.state.StateChangeException
Source = com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase
probeid = 792
Stack Dump = com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean
at com.ibm.ws.container.service.state.internal.ApplicationStateManager.fireStarting(ApplicationStateManager.java:33)
at com.ibm.ws.container.service.state.internal.StateChangeServiceImpl.fireApplicationStarting(StateChangeServiceImpl.java:51)
at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.preDeployApp(DeployedAppInfoBase.java:791)
at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployApp(DeployedAppInfoBase.java:818)
at com.ibm.ws.app.manager.ear.internal.EARApplicationHandlerImpl.install(EARApplicationHandlerImpl.java:84)
at com.ibm.ws.app.manager.internal.statemachine.StartAction.execute(StartAction.java:139)
at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.enterState(ApplicationStateMachineImpl.java:1168)
at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.run(ApplicationStateMachineImpl.java:781)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:186)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:194)
at org.jboss.weld.resources.ClassTransformer.getEnhancedAnnotatedType(ClassTransformer.java:228)
at org.jboss.weld.bootstrap.AbstractBeanDeployer.createSessionBean(AbstractBeanDeployer.java:288)
at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$3.doWork(ConcurrentBeanDeployer.java:93)
at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$3.doWork(ConcurrentBeanDeployer.java:82)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2663)
at java.lang.Class.getDeclaredConstructors(Class.java:2012)
at org.jboss.weld.security.GetDeclaredConstructorsAction.run(GetDeclaredConstructorsAction.java:30)
at org.jboss.weld.security.GetDeclaredConstructorsAction.run(GetDeclaredConstructorsAction.java:22)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.computeValue(BackedAnnotatedType.java:167)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.computeValue(BackedAnnotatedType.java:164)
at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:35)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$EagerlyInitializedLazyValueHolder.<init>(BackedAnnotatedType.java:160)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.<init>(BackedAnnotatedType.java:164)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.<init>(BackedAnnotatedType.java:164)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.<init>(BackedAnnotatedType.java:65)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.of(BackedAnnotatedType.java:48)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:83)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:80)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2257)
at com.google.common.cache.LocalCache.get(LocalCache.java:4000)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4004)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:175)
... 11 more
Caused by: java.lang.ClassNotFoundException: javax.xml.rpc.ServiceException
at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:433)
at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoader.java:279)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.ibm.ws.classloading.internal.AppClassLoader.findOrDelegateLoadClass(AppClassLoader.java:411)
at com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppClassLoader.java:383)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 37 more
В журнале сообщений также указывается:
[10/29/15 15:32:10:312 CET] 0000004f org.jboss.weld.Bootstrap I WELD-000119: Not generating any bean definitions from aa.bb.SystemClientBean because of underlying class loading error: Type javax.xml.rpc.ServiceException not found. If this is unexpected, enable DEBUG logging to see the full error.
[10/29/15 15:32:11:133 CET] 00000041 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean com.ibm.ws.container.service.state.internal.ApplicationStateManager 32" at ffdc_15.10.29_15.32.10.0.log
[10/29/15 15:32:11:217 CET] 00000041 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase 792" at ffdc_15.10.29_15.32.11.0.log
[10/29/15 15:32:11:272 CET] 00000041 om.ibm.ws.app.manager.ear.internal.EARApplicationHandlerImpl E CWWKZ0106E: Could not start web application myEAR.
[10/29/15 15:32:11:275 CET] 00000041 com.ibm.ws.app.manager.AppMessageHelper E CWWKZ0002E: An exception occurred while starting the application myEAR. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean
Любая идея как решить эту проблему?
1 ответ:
WebSphere Liberty profile поддерживает не JAX-RPC, а JAX-WS или JAX-RS. Вам придется перенести свои веб-сервисы на JAX-WS. JAX-RPC уже был устаревшим в Java EE 6, и он необязателен в Java EE 7. Смотрите Java EE 7 Technologies.
JAX-RPC по-прежнему поддерживается профилем WebSphere Application Server Full (он же классический).