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

ClassNotFoundException when using JDBC inside a Followup Act

Hello,

I have to use JDBC inside a FollowUp Action, because I have to reuse a existent JDBC Oracle implementatin from Plain Java.

When the Server Side FollowUp Action triggers my OperationParticipant I use Class.forName(...) and get a ClassNotFoundException.

I tried to include the JDBC Jar File inside my Service Plugins and changed the Build Path.

Questions:
* The "Server Side FollowUp Action Plugin" is a OSGi Bundle?
* If yes, the OSGi Classloader seems to have problems.
* Should I create an other OSGi Bundle, only with the JDBC Driver?
* Then, I could include a Dependency to this JDBC Bundle?

Please don't say that the usage of JDBC is not recommented...

Thanks

Stefan

0 votes



One answer

Permanent link
Hi,

tests with MySQL showed me that putting the JDBC inside a OSGi Bundle is successful.

Solution:
* Create a new PlugIn Project "Plugin from a existend Jar Archive"
* Include this Project into your plugin.xml (Dependencies -Required Plugins)
* Now you can use JDBC like in a Plain Java Program. No ClassNotFound
Exceptions!

Thanks

Stefan

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,941

Question asked: Jan 31 '11, 7:34 a.m.

Question was seen: 4,842 times

Last updated: Jan 31 '11, 7:34 a.m.

Confirmation Cancel Confirm