[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Problem exporting product

David Perez wrote:

Found more info to problem 4)

This line that is used to load the JDBC driver is the culprit:

Class.forName("com.mysql.jdbc.Driver");

It has confused me to see SQLException, when is the Driver what cannot be loaded.

I know there are some issues with Class.forName().
The JDBC driver is in the same plugin where the call for Class.forName().
If I change to MyPlugin.getInstance().getBundle().loadClass("com.mysql.jdbc.Driver"), it doesn't work either.
Why is this working when launching from a *.launch file?


The only difference I see, is that my plugin is packed in a .jar file when running as an exported product, or as a expanded folder.

Hi,

My RCP app is working.  :-)
Now is time to export it and try it.
But ....

4) Worst of all, when opening some views I get ClassNotFoundException.
By looking the .log of my workspace, I can see this:

java.sql.SQLException: java.lang.ClassNotFoundException:

Isn't SQLException bundled with the JRE? How can this fail?
Why does the exported product behave differently to the workspace product?

Thanks for any tip or ReCiPe.