Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » make external jar to plugin into my rcp application
icon9.gif  make external jar to plugin into my rcp application [message #689652] Tue, 28 June 2011 05:53 Go to next message
Yiqiao  is currently offline Yiqiao Friend
Messages: 6
Registered: June 2011
Junior Member
Can anyone help me to resolve this question?

My rcp application need some external jars, for example, analysis xml jars: dom4j.jar, jaxen-1.1.1.jar. I don't want add them to my rcp application bulid path.
So I make jars to a plugin (new > Project > Plug-in from existing jar archives), then add this plugin to my rcp application, run application has a error:


Warning: Caught exception attempting to use SAX to load a SAX XMLReader
org.xml.sax.SAXException: Can't create default XMLReader; is system property org.xml.sax.driver set?
Warning: Exception was: org.xml.sax.SAXException: Can't create default XMLReader; is system property org.xml.sax.driver set?
Warning: I will print the stack trace then carry on using the default SAX parser
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:155)
at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:67)
at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:650)
at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:525)
at org.dom4j.io.SAXReader.read(SAXReader.java:311)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at tjkj.sfm.client.update.Site.<init>(Site.java:59)
at tjkj.sfm.client.update.Site.getInstance(Site.java:38)
at tjkj.sfm.client.update.InstallOperation.hasUpdate(InstallOperation.java:43)
at tjkj.sfm.client.windows.LogonDialog.checkUpdate(LogonDialog.java:232)
at tjkj.sfm.client.windows.LogonDialog.access$9(LogonDialog.java:231)
at tjkj.sfm.client.windows.LogonDialog$7$1.run(LogonDialog.java:430)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:172)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:370)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at tjkj.sfm.client.custom.RunnableTask.run(RunnableTask.java:28)
at tjkj.sfm.client.windows.LogonDialog.okPressed(LogonDialog.java:471)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at tjkj.sfm.client.Application.start(Application.java:46)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
Warning: Error occurred using SAX to load a SAXParser. Will use Aelfred instead
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)


Thanks a lot~







Re: make external jar to plugin into my rcp application [message #689696 is a reply to message #689652] Tue, 28 June 2011 07:52 Go to previous messageGo to next message
Chaitannya  is currently offline Chaitannya Friend
Messages: 14
Registered: May 2010
Junior Member
I think the problem is not with the rcp application, it is with the code written for the xml parser. Have you tried writing vanilla application for the xml parser lib that you are using.
Re: make external jar to plugin into my rcp application [message #690120 is a reply to message #689696] Wed, 29 June 2011 02:41 Go to previous messageGo to next message
Yiqiao  is currently offline Yiqiao Friend
Messages: 6
Registered: June 2011
Junior Member
But I add jars to my rcp application build path,it's run ok.
I tried another way:
new > project > plugin project, add these jars to plugin project build path, then at plugin.xml "runtime" tab exported packages.
Add plugin project to my rcp application, it's run ok.(before this step, I run plugin project is ok too).
But when I export project, has an error log file:

The import org.dom4j cannot be resolved


Re: make external jar to plugin into my rcp application [message #690319 is a reply to message #690120] Wed, 29 June 2011 11:24 Go to previous messageGo to next message
Eclipse user Chennai is currently offline Eclipse user ChennaiFriend
Messages: 15
Registered: May 2011
Junior Member
This might be due to configuration Manifest file. Please ensure that you have added required plugins in the Require-Bundle attribute.

Require-Bundle: org.dom4j;bundle-version="1.0.0"
Re: make external jar to plugin into my rcp application [message #692252 is a reply to message #690319] Mon, 04 July 2011 04:04 Go to previous message
Yiqiao  is currently offline Yiqiao Friend
Messages: 6
Registered: June 2011
Junior Member
I'm sure I did it, it's still has that error.
I create a plugin project, then add this plugin project to my rcp application. it's run ok, but when I export project has an error file:
"The import org.dom4j cannot be resolved"...

But another way:
I create a plugin project, and export this plugin project to a jar, then delete this plugin project from my workspace, and add plugin jar to eclipse plugin directory, restart eclipse, add plugin to my rcp application, it has a compiler error, org.dom4j
can not found.

why?
Previous Topic:(no subject)
Next Topic:Toolbar and commands interaction
Goto Forum:
  


Current Time: Wed Apr 24 17:44:08 GMT 2024

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

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

Back to the top