Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Confusing error messages relating to plug-in dependencies(All I wanted to do was to add an external JAR to my RCP application!)
icon5.gif  Confusing error messages relating to plug-in dependencies [message #652807] Mon, 07 February 2011 01:17 Go to next message
SBS  is currently offline SBS Friend
Messages: 57
Registered: January 2011
Member
I am having a hell of a time with this my first RCP project.

All I wanted to do was to add a couple of external JARs to the project so they would be usable by my RCP application. When I simply added them to the build path it couldn't find the classes in them at run time. So I found out that the "correct" way to do this is to create a plug-in to house the JARs and then declare a dependency on that plug-in in the main project.

OK, so that's what I did. I created the JARs plug-in and exported all the required packages and then declared a dependency on that plug-in from the main project. There were no errors and everything was found without problem.

However, when I try to run the application by launching Eclipse from the application's product configuration it gives me the following convoluted and confusing error messages:

!SESSION 2011-02-07 12:02:46.605 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_AU
Framework arguments: -product myproject.product
Command-line arguments: -product myproject.product -data C:\Workspace/../runtime-myproject.product -dev file:C:/Workspace/.metadata/.plugins/org.eclipse.pde.core/my project.product/dev.properties -os win32 -ws win32 -arch x86 -consoleLog

!ENTRY org.eclipse.equinox.app 0 0 2011-02-07 12:02:47.277
!MESSAGE Product myproject.product could not be found.

!ENTRY org.eclipse.osgi 2 0 2011-02-07 12:02:47.292
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-02-07 12:02:47.292
!MESSAGE Bundle initial@reference:file:../../Workspace/MyProject/ was not resolved.
!SUBENTRY 2 myproject 2 0 2011-02-07 12:02:47.292
!MESSAGE Missing required bundle myproject.jars_1.0.0.

!ENTRY org.eclipse.osgi 2 0 2011-02-07 12:02:47.292
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-02-07 12:02:47.292
!MESSAGE Bundle myproject_1.0.0.qualifier [30] was not resolved.
!SUBENTRY 2 myproject 2 0 2011-02-07 12:02:47.292
!MESSAGE Missing required bundle myproject.jars_1.0.0.

!ENTRY org.eclipse.osgi 4 0 2011-02-07 12:02:47.308
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: No application id has been found.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDe faultApp(EclipseAppContainer.java:242)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run (MainApplicationLauncher.java:29)
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:369)
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: 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)
An error has occurred. See the log file
C:\Workspace\.metadata\.plugins\org.eclipse.pde.core\myproje ct.product\1297040566855.log.

Exactly what is it trying to tell me I have done wrong? It looks like it can't find the JARs plug-in at run time (my guess) so why would that be? Is there something special I have to do with that plug-in to make it available? As I said, when I added the dependency I could find the JARs plug-in's ID etc. so I am very confused.
Re: Confusing error messages relating to plug-in dependencies [message #652883 is a reply to message #652807] Mon, 07 February 2011 12:57 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

So you created a new plugin project, added the 3rd party jars into it,
and then added them to the Bundle classpath?

Or did you use New>Plug-in Development>Plug-in from existing JAR archives?

What does the MANIFEST.MF for the library plugin now look like?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Confusing error messages relating to plug-in dependencies [message #652884 is a reply to message #652807] Mon, 07 February 2011 12:59 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/06/2011 08:18 PM, SBS wrote:
> However, when I try to run the application by launching Eclipse from the
> application's product configuration it gives me the following convoluted
> and confusing error messages:

Another possibility: You launched it once before you added the new 3rd
party jar project. If that's the case, go to Run>Run Configurations and
delete the product run config. Then go back to the product config file
and launch it again (to pick up your new configuration that includes
your new plugin).

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Confusing error messages relating to plug-in dependencies [message #652973 is a reply to message #652884] Mon, 07 February 2011 19:25 Go to previous messageGo to next message
SBS  is currently offline SBS Friend
Messages: 57
Registered: January 2011
Member
Thanks Paul, recreating the run configuration did the trick.

So every time I add a JAR or plug-in I have to do this?
Re: Confusing error messages relating to plug-in dependencies [message #653093 is a reply to message #652973] Tue, 08 February 2011 13:16 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/07/2011 02:25 PM, SBS wrote:
>
> So every time I add a JAR or plug-in I have to do this?

If your launch config has all plugins in the target+workspace chosen
(most of mine do) then you get new plugins for free. If you are
building an RCP app that uses only required plugins, then adding a
plugin means updating the launch config ... either deleting and
re-launching from the product or opening the launch config and adding
rqeuired plugins from there.

I tend to delete/recreate, because I always want to make sure my
..product file is correct as I use it in my headless builds.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Custom Editor tutorial (where?)
Next Topic:CommandContributionItem is never disposed when it's placed at drop down menu from toolbar item.
Goto Forum:
  


Current Time: Thu Mar 28 13:46:20 GMT 2024

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

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

Back to the top