Skip to main content



      Home
Home » Newcomers » Newcomers » MySQL Database access for Eclipse RCP application
MySQL Database access for Eclipse RCP application [message #267000] Wed, 10 December 2008 07:49 Go to next message
Eclipse UserFriend
Hi all,

I am developing an Eclipse RCP application which needs MySQL database
access, but if I follow the normal procedure of connecting to a database,
here it give the ClassNotFoundException and so many error messages.

I tried the same codings with a simple Java application which has a main
method(public static void main(String[] arg){.....}) and executed
successfully. Normally if we include mysqlconnector.jar file into a
project by selecting "Configure Build Path" it identifies JDBC driver
classes and it works.

But as I know just including this jar file into a plug-in project(RCP) it
does not execute and it gives exceptions. How can I fix this problem?
Could you anyone can answer that question please? I need the steps from
the beginning as I don't know much about RCP application.

Thanks and Best Regards,
AsankaSira

P.S :

I found some ways from the web saying that it needs to edit the
MANIFEST.MF file or kind of things to include external jars to a plug-in
project.

If there is a way like that, could you help me with the steps please?
Re: MySQL Database access for Eclipse RCP application [message #267002 is a reply to message #267000] Wed, 10 December 2008 07:54 Go to previous messageGo to next message
Eclipse UserFriend
Not sure if these steps are out-of-date or not, but they might help.
http://wiki.eclipse.org/Eclipse_Plug-in_Development_FAQ#I.27 m_using_third_party_jar_files_and_my_plug-in_is_not_working. ..

Remy
Re: MySQL Database access for Eclipse RCP application [message #267021 is a reply to message #267002] Thu, 11 December 2008 03:31 Go to previous message
Eclipse UserFriend
Hi,

This is the error I am getting When I tried to do that.

java.lang.ClassNotFoundException: org.sqlite.JDBC
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)error
in SQLiteDatabase class method getConnectionObj

at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at timer.TestDatabase.getConnection(TestDatabase.java:15)
at timer.TestDatabase.extractTask(TestDatabase.java:39)
at timetrackerplugin.TimeView.createSeperator(TimeView.java:420 )
at timetrackerplugin.TimeView.createPartControl(TimeView.java:1 59)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:371)
at
org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:230)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:594)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:30 6)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:53 1)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:180)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:270)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:473)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 08)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:649)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:576)
at
org.eclipse.ui.internal.PartSashContainer.createControl(Part SashContainer.java:568)
at
org.eclipse.ui.internal.PerspectiveHelper.activate(Perspecti veHelper.java:271)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.j ava:964)
at
org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPa ge.java:2593)
at
org.eclipse.ui.internal.WorkbenchWindow$25.run(WorkbenchWind ow.java:2873)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at
org.eclipse.ui.internal.WorkbenchWindow.setActivePage(Workbe nchWindow.java:2854)
at
org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(Workben chWindow.java:759)
at
org.eclipse.ui.internal.Workbench$21.runWithException(Workbe nch.java:1027)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3425)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:803)
at
org.eclipse.ui.internal.Workbench$27.runWithException(Workbe nch.java:1361)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3425)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2293)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at timetrackerplugin.Application.start(Application.java:20)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
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(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

Still I couldn't find the problem


Regards,

AsankaSira
Previous Topic:How to put hyperlinks in the messages put into the eclipse console view
Next Topic:EMF Question about support for Statecharts
Goto Forum:
  


Current Time: Sun Jul 20 12:52:19 EDT 2025

Powered by FUDForum. Page generated in 0.09039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top