Could you please help with the following deployment on the JBOSS application server.
Versions: JBOSS EAP 7.3 Axis2 1.7.8
Issue: I am trying to deploy Axis2.war on the application server by adding some AAR files in the Axis2.war file. Specifically I have placed a list of new AAR services in the directory axis2.war/WEB-INF/services. The AAR service names have also been included in the services.list file.
Axis2.war application gets deployed succesfully but the AAR services are turned to faulty services. The AAR files are JAVA compiled services provided by an official software distributor, meaning that I can change only the app server configuration, not the classes.
Logs: When checking the logs the following errors are shown:
> [INFO] The xxxx.aar service, which is not valid, caused java.lang.NoClassDefFoundError:
> org/springframework/context/support/ClassPathXmlApplicationContext
> at com.xxxxx.services.integrationlandscape.IntegrationLandscapeServiceSpringContext.loadServiceContext(IntegrationLandscapeServiceSpringContext.java:27)
> at com.xxxxxx.services.integrationlandscape.IntegrationLandscapeServiceSpringInit.startUp(IntegrationLandscapeServiceSpringInit.java:17)
> at org.apache.axis2.deployment.ServiceBuilder.startupServiceLifecycle(ServiceBuilder.java:942)
> at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:444)
> at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101)
> at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:117)
> at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:232)
> at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:154)
> at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:149)
> at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:585)
> at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:164)
> at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
> at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
> at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:136)
> at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:289)
> at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
> at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:620)
> at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:471)
> at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
> at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
> at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
> at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:305)
> at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:145)
> at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:585)
> at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:556)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1504)
> at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:598)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:97)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
> at java.lang.Thread.run(Thread.java:750)
> at org.jboss.threads.JBossThread.run(JBossThread.java:485) Caused by: java.lang.ClassNotFoundException: Class Not found :
> org.springframework.context.support.ClassPathXmlApplicationContext
> at org.apache.axis2.deployment.DeploymentClassLoader.findClass(DeploymentClassLoader.java:96)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
> at org.apache.axis2.deployment.DeploymentClassLoader.loadClass(DeploymentClassLoader.java:277)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
> ... 43 more [INFO] org.apache.axis2.deployment.DeploymentException:
> java.lang.NoClassDefFoundError:
> org/springframework/context/support/ClassPathXmlApplicationContext
It seems that the compiled class IntegrationLandscapeServiceSpringContext attempts to initiate another class which is not defined in the classpath. It is possible that there is some missing configuration for the Axis2.war file to integrate well with Spring. Could you please elaborate if this is the case and how it can be resolved by reconfiguring the application server's settings?
Thank you.