Server-side extension and Spring
Hi, I'm developing a server-side extension based on the Extensions lab to call out to Spring Integration services. Problem is in the local debug instance, the plugin is not seeing the spring classes.
"... Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext ..."
I've used Add External Jars and Add External Class Folder, also created a lib folder in the project, added all jars to it and included them on the Build tab of the plugin.xml, Add Extra Classpath Entries. (My system CLASSPATH also includes the path to the jars). Still getting above error. Anyone know how I need to configure the class path?
Thanks
Sola
"... Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext ..."
I've used Add External Jars and Add External Class Folder, also created a lib folder in the project, added all jars to it and included them on the Build tab of the plugin.xml, Add Extra Classpath Entries. (My system CLASSPATH also includes the path to the jars). Still getting above error. Anyone know how I need to configure the class path?
Thanks
Sola
Accepted answer
Sola,
there are several approaches. See http://robertvarttinen.blogspot.de/2007/01/adding-third-party-jar-to-your-eclipse.html for example. I have seen several similar posts.
You don't add the dependency as an external Jar. If you have done that, remove the external or whatever Jar's you had added.
If after doing those steps your Jar does not show up, what worked for me (after swearing a lot, I must confess) was remove all the changes 1..4 from the plugin save and try everything again, until the compile errors went away.
there are several approaches. See http://robertvarttinen.blogspot.de/2007/01/adding-third-party-jar-to-your-eclipse.html for example. I have seen several similar posts.
-
Create a new plug-in from the Jar. And add the project as dependency and deploy it with the rest.
-
Include the Jar in the project.
- Put the Jar into the root folder or in another folder in this example lib.
-
In the plug-In editor runtime tab add the folder then press new and add the jar file
- Save the change
- On the Project use PDE-Tools>Update Classpath
-
Check the build tab for exporting the jar.
This should look like this screenshot.
After PDE-Tools>Update Classpath, make sure that the Jar starts showing up in your plugin and can be seen like in the image below.
You don't add the dependency as an external Jar. If you have done that, remove the external or whatever Jar's you had added.
If after doing those steps your Jar does not show up, what worked for me (after swearing a lot, I must confess) was remove all the changes 1..4 from the plugin save and try everything again, until the compile errors went away.