Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes


Accepted answer

Permanent link
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.

  1. Create a new plug-in from the Jar. And add the project as dependency and deploy it with the rest.
  2. Include the Jar in the project.
Although 2 seems simple, it did not easily work for me. I had to redo it several times. Here what I think worked.
  1. Put the Jar into the root folder or in another folder in this example lib.
  2. In the plug-In editor runtime tab add the folder then press new and add the jar file
  3. Save the change
  4. On the Project use PDE-Tools>Update Classpath
  5. 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.
Ralph Schoon selected this answer as the correct answer

0 votes


One other answer

Permanent link
can u look at the contents of your jar file (I use WinRAR) and make sure the class jar file is included? (as it should be from the check Binary Build checkbox on the build tab.. )


0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,936
× 4

Question asked: Nov 08 '12, 5:39 a.m.

Question was seen: 5,812 times

Last updated: Nov 08 '12, 7:57 a.m.

Confirmation Cancel Confirm