LIBGDX simple HTML app JavaScriptException at launch - html

I created a simple project using "gdx-setup-ui.jar" and tried running all the projects. Android and desktop projects were running without any error. But when I launched the html project I got the following error. Any help??
22:07:35.374 [ERROR] [com.me.mygdxgame.GwtDefinition] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (InvalidStateError) #com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(45), JavaScript object(44), JavaScript object(54)]): An attempt was made to use an object that is not, or is no longer, usable
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Unknown Source)

Related

JUnit - java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing

I am using Win 7 and downloaded Junit 4.13 and hamcrest 2.1 from
https://github.com/junit-team/junit4/wiki/Download-and-Install
and put them in a folder named JUnit under C.
I have added the variable: JUNIT_HOME with value C:\JUnit.
I have also added the following to my classpath:
%classpath%;.;C:\Program Files\Java\jre1.8.0_171\bin;%CLASSPATH%;
%JUNIT_HOME%\junit-4.13-beta-1;.; %JUNIT_HOME%\hamcrest-core-2.1.jar;
Following https://github.com/junit-team/junit4/wiki/Getting-started,
I added the java files Calculator.java and CalculatorTest.java to my practice folder.
The command
javac -cp .;junit-4.13-beta-1.jar;hamcrest-core-2.1.jar CalculatorTest.java
is executed successfully. However, the command
java -cp .;junit-4.13-beta-1.jar;hamcrest-core-2.1.jar org.junit.runner.JUnitCore CalculatorTest
Fails, giving an error message like
Exception in thread "main" java.lang.NoClassDefFoundError:
org/hamcrest/SelfDescribing
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.junit.runner.Computer.getSuite(Computer.java:28)
at org.junit.runner.Request.classes(Request.java:77)
at org.junit.runner.JUnitCommandLineParseResult.createRequest(JUnitComma
ndLineParseResult.java:116)
at org.junit.runner.JUnitCore.runMain(JUnitCore.java:77)
at org.junit.runner.JUnitCore.main(JUnitCore.java:36)
Caused by: java.lang.ClassNotFoundException: org.hamcrest.SelfDescribing
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 17 more
Please note I have checked posts like java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing, but they have not been helpful. Could you please help?
The correct hamcrest jar is hamcrest-2.1.jar, not hamcrest-core-2.1.jar. You can download it from here.
According to mentioned guide it is assumed you have downloaded jars in the same package as your project:
Create a new folder junit-example and download the current
junit-4.XX.jar from JUnit's release page and Hamcrest to this folder.
If you decided to put jars separately probably you need to correct the command line correspondingly to take these jars files from %JUNIT_HOME%:
java -cp .;%JUNIT_HOME%\junit-4.13-beta-1.jar;%JUNIT_HOME%\hamcrest-core-2.1.jar org.junit.runner.JUnitCore CalculatorTest

ScalaTest HTML report using Eclipse plugin

Is there any option, how to make ScalaTest reporting into HTML file using Eclipse ScalaTest plugin?
In Run configuration I setted Program argment to:
-h C:\Users\medek\Scala
but it wrotes:
An exception or error caused a run to abort. This may have been caused by a problematic custom reporter.
java.lang.NoClassDefFoundError: org/pegdown/PegDownProcessor
at org.scalatest.tools.HtmlReporter.<init>(HtmlReporter.scala:115)
at org.scalatest.tools.ReporterFactory.createHtmlReporter(ReporterFactory.scala:182)
at org.scalatest.tools.ReporterFactory.getReporterFromConfiguration(ReporterFactory.scala:233)
at org.scalatest.tools.ReporterFactory$$anonfun$createReportersFromConfigurations$1.apply(ReporterFactory.scala:242)
at org.scalatest.tools.ReporterFactory$$anonfun$createReportersFromConfigurations$1.apply(ReporterFactory.scala:241)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.Iterator$class.foreach(Iterator.scala:727)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at org.scalatest.tools.ReporterConfigurations.foreach(ReporterConfiguration.scala:43)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at org.scalatest.tools.ReporterConfigurations.map(ReporterConfiguration.scala:43)
at org.scalatest.tools.ReporterFactory.createReportersFromConfigurations(ReporterFactory.scala:241)
at org.scalatest.tools.ReporterFactory.getDispatchReporter(ReporterFactory.scala:245)
at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:2720)
at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1043)
at org.scalatest.tools.Runner$.main(Runner.scala:860)
at org.scalatest.tools.Runner.main(Runner.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at scala.tools.eclipse.scalatest.launching.ScalaTestLauncher$.main(ScalaTestLauncher.scala:58)
at scala.tools.eclipse.scalatest.launching.ScalaTestLauncher.main(ScalaTestLauncher.scala)
Caused by: java.lang.ClassNotFoundException: org.pegdown.PegDownProcessor
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 25 more
I added all needed dependencies and it works - but - I dont think that this is correct behaviour.
Dependencies:
pegdown-1.1.0.jar
parboiled-core-1.0.2.jar
parboiled-java-1.0.2.jar
asm-all-3.3.1.jar

Can't get gdx-setup-ui working on windows

I downloaded the latest nightly and am trying to setup a project. I double click on the gdx-setup-ui.jar file but it does nothing. When I go to the commandline(as admin) and run :
java -jar gdx-setup-ui.jar
this is spit out
C:\Libgdx\libgdx-nightly-20140305>java -jar gdx-setup-ui.jar
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: new c
hild is null
at javax.swing.tree.DefaultMutableTreeNode.insert(Unknown Source)
at javax.swing.tree.DefaultMutableTreeNode.add(Unknown Source)
at aurelienribon.gdxsetupui.ui.panels.PreviewPanel$ResultTree.update(Unk
nown Source)
at aurelienribon.gdxsetupui.ui.panels.PreviewPanel$ResultTree.(Unk
nown Source)
at aurelienribon.gdxsetupui.ui.panels.PreviewPanel.(Unknown Source
)
at aurelienribon.gdxsetupui.ui.MainPanel.(Unknown Source)
at aurelienribon.gdxsetupui.ui.Main$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Things that I have already tried are:
uninstall and re-install jdk
restart computer
redownload all of the libgdx files
search google and stackoverflow
Try downloading an older version.
If it works properly without problems, then there might be some problem with nightly (which I believe would be fixed soon) otherwise the problem lies with your system.
This may not be a particular solution, but it'd narrow down the things to look for (error).
Good luck.

Hudson is giving error while creating the test report

I am getting the follwoing error from Hudson. Could any one please tell me what is wrong here. My test cases are working fine.
Total time: 0 seconds
Recording test results
ERROR: Failed to archive test reports
hudson.util.IOException2: remote file operation failed: C:\Users\xxx\Downloads\hudson\workspace\xxx at hudson.remoting.Channel#5ad977d6:NodeA
at hudson.FilePath.act(FilePath.java:754)
at hudson.FilePath.act(FilePath.java:740)
at hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:83)
at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:132)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:144)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:630)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:584)
at hudson.model.Build$RunnerImpl.post2(Build.java:159)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:553)
at hudson.model.Run.run(Run.java:1390)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
Caused by: hudson.util.IOException2: Failed to read C:\Users\xxx\Downloads\hudson\workspace\xxx\xxx\testresults\testresults.properties
Is this really a JUnit report file? Your configuration must be matching too many files
at hudson.tasks.junit.TestResult.parse(TestResult.java:205)
at hudson.tasks.junit.TestResult.parse(TestResult.java:155)
at hudson.tasks.junit.TestResult.(TestResult.java:118)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:114)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:87)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1960)
at hudson.remoting.UserRequest.perform(UserRequest.java:114)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:283)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:60)
at java.lang.Thread.run(Unknown Source)
Caused by: org.dom4j.DocumentException: Error on line 1 of document file:///C:/Users/xxx/Downloads/hudson/workspace/xxx/xxx/testresults/testresults.properties : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:98)
at hudson.tasks.junit.TestResult.parse(TestResult.java:199)
... 15 more
Caused by: org.xml.sax.SAXParseException; systemId: file:///C:/Users/xxx/Downloads/hudson/workspace/xxx/xxx/testresults/testresults.properties; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
... 18 more
This is because HUDSON is trying to parse your test results in file testresults.properties. It is getting a SAXParseException because testresults.properties does not contain valid XML. This is probably because you have no tests in your project.
OR because you have both HTMLs and XMLs (like I did). Make sure you only include *.xml.

Cannot connect MySQL in Eclipse RCP IDE

All,
I am getting the com.mysql.jdbc.Driver exception when trying to load the Driver class using Class.forName("com.mysql.jdbc.Driver"). I have written a custom Eclipse plugin and wanted to access the database in my custom Eclipse plugin.
I have tried following 2 options, both obviously failed:
1 > Adding the mysql connection JAR file to the Eclipse plugin build path
2 > Adding the connector JAR file as library and adding to the plugin's runtime classpath
Can anyone please help me out on this?
Here is the log:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at draft1.set1.utility.DatabaseUpdatesUtility.commitPerspectiveToDB(DatabaseUpdatesUtility.java:48)
at draft1.set1.display.DomainEditor.doSaveAs(DomainEditor.java:57)
at org.eclipse.ui.internal.SaveAsAction.run(SaveAsAction.java:64)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/mysql
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at draft1.set1.utility.DatabaseUpdatesUtility.commitPerspectiveToDB(DatabaseUpdatesUtility.java:53)
at draft1.set1.display.DomainEditor.doSaveAs(DomainEditor.java:57)
at org.eclipse.ui.internal.SaveAsAction.run(SaveAsAction.java:64)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
I recommend to create your own OSGi-Bundle for the MySQL Driver, see http://wiki.eclipse.org/Create_and_Export_MySQL_JDBC_driver_bundle for a how-to. Afterwards you have to set a dependency in your plugin.xml of your bundle to the created mysql-bundle.
In addition: Please use in an OSGi environment not the DriverManager but an implementation of DataSource.