The most likely cause is you are not importing the javax.naming package in your bundle manifest (using Import-Package). Standalone Equinox follows the strict OSGi class loading rules which requires you to use either Import-Package or Require-Bundle to get access to all non-java.* packages (this includes javax.* packages provided by the VM.
Tom |------------> | From: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |"刘伦" <[email protected]> | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | To: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |"equinox-dev" <[email protected]> | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Date: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |04/05/2011 04:29 AM | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | Subject: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |[equinox-dev] equinox mysql error | >--------------------------------------------------------------------------------------------------------------------------------------------------| Hi I'm a chinese student. I'm writing a plugin that connects to a mysql database, when I used whiting eclipse it works correctly, however when I try to run it in the standalone equinox does not works the message is: java.sql.SQLException: java.lang.NoClassDefFoundError: javax/naming/RefAddr at com.mysql.jdbc.SQLError.createSQLException (SQLError.java:1073) at com.mysql.jdbc.SQLError.createSQLException (SQLError.java:987) at com.mysql.jdbc.SQLError.createSQLException (SQLError.java:982) at com.mysql.jdbc.SQLError.createSQLException (SQLError.java:927) at com.mysql.jdbc.Util.handleNewInstance(Util.java:431) at com.mysql.jdbc.ConnectionImpl.getInstance (ConnectionImpl.java:378) at com.mysql.jdbc.NonRegisteringDriver.connect (NonRegisteringDriver.java :305) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) I have Try Activator.getContext().getBundle().loadClass(driver).newInstance(); And Class.forName(driver).newInstance(); connection = DriverManager.getConnection(url + dbName, userName, password); I also try to add more bundles but still nothing any help will be appreciate it thanks in advance_______________________________________________ equinox-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev
<<inline: graycol.gif>>
<<inline: ecblank.gif>>
_______________________________________________ equinox-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev
