java.lang.NoClassDefFoundError: org.springframework.context.support.ClassPathXmlApplicationContext - spring

What I am trying to achieve is to upload Temenos T24 Design Studio web services on Axis2.
Unfortunately, I am getting a Class not found error when uploading the service using "aar" (Axis2 archive) file.
I have already deployed Axis2 1.4.4 on IBM Websphere 9.
Note : There has been certain conflicts while deploying Axis2 application on IBM websphere JAX-WS, which I have used this guide to resolve them;
https://www-01.ibm.com/support/docview.wss?uid=swg21315686
Below is the error I am getting;
=================================
This Web axisService has deployment faults
Error: java.lang.NoClassDefFoundError: org.springframework.context.support.ClassPathXmlApplicationContext at com.temenos.services.designstudioinstaller.DesignStudioInstallerServiceSpringContext.loadServiceContext(DesignStudioInstallerServiceSpringContext.java:27)

You have to remove the following jar files from the t24lib directory:
t24-EB_ResourceProviderService-ejb.jar
t24-EB_ResourceProviderService-ProxyAdaptor.jar
t24-EB_ResourceProviderService-jws.aar
t24-EB_ResourceProviderService-provider.jar
t24-EB_ResourceProviderService-tafj-jws.aar
t24-EB_ResourceProviderService-tafj-provider.jar
For any service component such as EB_ResourceProviderService, only the below jars must be present within the t24lib directory:
EB_ResourceProviderService.jar
t24-EB_ResourceProviderService-Data.jar
t24-EB_ResourceProviderService-t24service.jar
Restart the application server after removing them and the axis2 should deploy successfully.
I had similar error deploying axis2.war inflated with Temenos aar files on JBoss EAP 7.1 and it was solved by removing the duplicated .jar and .aar files in t24lib:
[INFO] The t24-EB_ResourceProviderService-tafj-jws.aar service, which is not valid, caused java.lang.NoClassDefFoundError: org/springframework/context/support/ClassPathXmlApplicationContext
at com.temenos.services.resourceprovider.ResourceProviderServiceSpringContext.loadServiceContext(ResourceProviderServiceSpringContext.java:27)

Related

Springboot Strange Resource Loading Behavior

I'm working on a springboot 1.5.1 application that I'm trying to load a WSDL included in my resources directory in the wsdl directory. Depending on where my application executes I'm getting different results (command line, intellij, cloud foundry) and I can't seem to get all three to work at the same time.
I've tried several ways of locating the resource:
From prior to the migration to springboot we had this (worked in IntelliJ but not java -jar myboot.jar):
this.getClass().getResource("/wsdl/my.wsdl");
I switched it to the typically more correct version and got it to work in IntelliJ and java -jar but not Cloud Foundry:
this.getClass().getClassLoader().getResource("/wsdl/my.wsdl");
I switched it to use the Spring Resource Loader version and it worked in IntelliJ and CloudFoundry but not java -jar:
#Value("classpath:/wsdl/my.wsdl")
private Resource wsdlResource;
wsdlResource.getURL();
On the command line what I've noticed is that it seems to be thinking that BOOT-INF/classes is a JAR file (Note the ! after classes):
Caused by: javax.xml.ws.WebServiceException: Failed to access the WSDL at: jar:file:/C:/dev/redacted/build/libs/redacted.jar!/BOOT-INF/classes!/wsdl/my.wsdl. It failed with:
JAR entry BOOT-INF/classes!/wsdl/my.wsdl not found in C:\dev\redacted\build\libs\redacted.jar.
From looking at IntelliJ's URL, it's referring to the actual source folder which explains why it seems to always work.
What is causing this and how might I universally load these class path resources successfully with springboot?

ejbdeploy issue in IBM was8.5 version

When we try to use ejbdeploy.sh to for ejb jars getting below exception in IBM WAS 8.5 version.
$TEST.jar Error executing deployment: org.eclipse.core.runtime.CoreException. Error is Plug-in com.ibm.etools.ejbdeploy was unable to load class com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension..
$TEST.jar org.eclipse.core.runtime.CoreException: Plug-in com.ibm.etools.ejbdeploy was unable to load class com.ibm.etools.ejbdeploy.batch.plugin.BatchExtension.
$TEST.jar at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
$TEST.jar at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
Note: every time it is failing with different jars.

java.lang.NoSuchMethodError: EngineConfig.getLogRollingSize()

I am a newbie in BIRT, have installed Eclipse Birt plugin 4.3 and downloaded OSGI birt-runtime-osgi-4_3_0,
i have a standalone program to open the sample report in the birt runtime envt. but i am getting error
at
conf = new EngineConfig();
conf.setEngineHome("C:/birt-runtime-osgi-4_3_0/ReportEngine");
//Create new Report engine based off of the configuration
eng = new ReportEngine( conf ); -----------> Error.
as
Exception in thread "main" java.lang.NoSuchMethodError: org.eclipse.birt.report.engine.api.EngineConfig.getLogRollingSize()I
at org.eclipse.birt.report.engine.api.impl.ReportEngine.intializeLogger(ReportEngine.java:220)
at org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:134)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:18)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:14)
at org.eclipse.birt.report.engine.api.ReportEngine.<init>(ReportEngine.java:71)
at com.pg.o2.test.synch.ReportTest.main(ReportTest.java:33)
,
thought of running a stand alone pgm and start with JBOSS ,
please let me know if anything i have to download or missign jars.
It sounds like the jars in the runtime haven't been referenced in your eclipse project as described here. Are you running the application from eclipse or deploying it and getting these errors. If you're in eclipse go to the project settings and add the jars from the runtime to the build path. If you're getting these while deployed the jars need to go in your lib folder.

TOMCAT 7 not deploying war

I have developed a Dynamic Java Project with Eclipse which involves web services(RESTful). After completion I tried to run my project Tomcat 7 runtime of Eclipse IDE, it works fine. I am able to access all my web services.
But, when I created a WAR file out of my project by right-clicking on project and exporting it to WAR file and placed .war file in Tomcat 7's webapps folder. Started the tomcat by running startup.bat, it throws below exceptions and I am not able t access any web service:
I have placed all the required jar files in lib folder of Tomcat.
Exception fixing docBase for context [/Books] (Books is my war file name)
Failed to create work directory [{CATALINA_HOME}\work\Catalina\localhost\Books]
Failed to create destination directory to copy resources.
Could anyone please let me know what I am missing??
Thanks in advance.
Regards,
Piyush
The failed to create "work directory" error can occur if the work folder does not exist in the tomcat7 folder.
Also this error can be caused by tomcat not having sufficient permissions to read, write and execute in the tomcat7 directory.
The issue is because, tomcat is not finding your web.xml location in the classpath.
Do below steps:
Right click on web project-->Properties-->Deployment Assembly--> Add your classpath to web.xml(src/main/webapp) in my case.

Error when deploying application: Nested exception Resolution

I created an application in Jdeveloper 10g. I have created a war for my app. Then I attempted to deploy my app to an application server (Oracle Enterprises manager). When I deploy, it is throwing an error which is given below:
Failed to deploy web application "test". Failed to deploy web application "test". . Nested exception
Resolution:
Base Exception:
com.evermind.server.rmi.OrionRemoteException
Class not found:
org.springframework.beans.factory.access.BootstrapException;
nested exception is:
java.lang.ClassNotFoundException:
org.springframework.beans.factory.access.BootstrapException.
Class not found:
org.springframework.beans.factory.access.BootstrapException;
nested exception is:
java.lang.ClassNotFoundException:
org.springframework.beans.factory.access.BootstrapException
So please help me out with this. Thanks
You are missing a library file (presumably the spring framework). You can either add it to your server in in the library folder for the app server, or you can include it in you war file in the WEB-INF/libs/ folder.

Resources