RCP with ECF on RAP [RESOLVED] [message #643296] |
Mon, 06 December 2010 12:22 |
Peter Boccia Messages: 38 Registered: December 2010 |
Member |
|
|
Good morning to all,
I'm working on the single-sourcing of an RCP (a program created in my lab) that uses ECF.
I fixed the imports, extension points and also created some classes to fix some nonexistent APIs (as written on the book: Eclipse RAP).
In the end I add to the target platform the ECF and there are no error (no error in the source code that I wish to test first).
When I launch the RAP application with the created entrypoint, I have the first error a thousands times:
Root exception:
java.lang.NoClassDefFoundError: org/eclipse/ui/plugin/AbstractUIPlugin
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.def ineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:580)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(Bund leLoader.java:338)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:232)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:149)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:751)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:374)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1067)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:561)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:546)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:459)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:440)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:337)
Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter $TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.ui.workbench (42).
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:121)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadCla ss(SingleSourcePackage.java:33)
at org.eclipse.osgi.internal.loader.MultiSourcePackage.loadClas s(MultiSourcePackage.java:31)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:466)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 30 more
Caused by: org.osgi.framework.BundleException: The activator org.eclipse.ui.internal.WorkbenchPlugin for bundle org.eclipse.ui.workbench is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:156)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:751)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:370)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:284)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAct ion.java:417)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger (BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter .postFindLocalClass(EclipseLazyStarter.java:106)
... 40 more
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:151)
... 46 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 52 more]
Can you suggest me What's wrong in here? I single-sourced as well, I think.
Thank you so much!
--
Peter
[Updated on: Tue, 22 February 2011 14:15] Report message to a moderator
|
|
|
|
|
|
|
|
Re: RCP with ECF on RAP [message #644868 is a reply to message #644783] |
Tue, 14 December 2010 14:37 |
Scott Lewis Messages: 1038 Registered: July 2009 |
Senior Member |
|
|
Hi Peter,
Peter Boccia wrote on Tue, 14 December 2010 03:50 | Hi all,
I've tried all the bundle (in all the possible combinations) but it still doesn't work!
|
From the stack trace (which shows no sign of ECF code as far as I can tell), the cause seems to be ClassNotFoundException with SWTError. This indicates to me that perhaps you don't have the correct SWT fragment for RAP present in that runtime environment. I don't know exactly how RAP handles the SWT fragment (I'm on the ECF project), so they will have to comment on that. I suppose it's possible that you are calling some server-side UI code via an ECF exposed remote service...and that server-side code doesn't have the right RAP context?
Quote: |
I'm wondering now, if I'm working on a project impossible (in my lab they ask me if it's possible to put a RCP with ECF on RAP), because with all the possible workarounds I have problem when I run the ECF bundles.
|
It should be possible to use at least much of ECF with RAP. ECF can/is used with a number of other server-side technologies...and doesn't have any UI constraints at all. Like I mentioned above, RAP does some things with the SWT fragment resolution that I don't fully understand, and I think it's possible that your classload failure (of SWT code) could be due to calling some UI/RAP code *outside* the normal RAP context (i.e. not via the http server). Of course ECF makes this possible.
Quote: |
When I disable the ECF from the target platform and I remove all the use of ecf in the application the graphics works as a usual good RAP application.
|
Unfortunately, I don't understand this either.
One thing to ask about this though...ECF has a number of example apps and associated user interface...and these bundles may be pulling in unexpected/unwanted user interface code.
What parts of ECF are you including? You should probably only be including the ECF features that you are intending to actually use (ECF is broken into a number of features...and the SDK has everything)...i.e. not all the examples, Eclipse-based UI, etc.
Quote: |
My question now is: it's possible or not to get ECF on RAP?
|
I think it almost certainly is possible...it just may take some further work to a) get the right/desired pieces included; b) get them working together
|
|
|
|
|
|
|
|
|
|
Re: RCP with ECF on RAP [message #655226 is a reply to message #643296] |
Fri, 18 February 2011 17:35 |
|
Peter,
If you are getting the option to include RCP plugins in your launch configuration, then you probably don't have your target platform setup correctly. See the Getting Started[1] documentation, specifically the section on "Let the RAP Tooling install the target platform". Once you have your target platform correct and your launch configuration cleaned up it should run.
Hope that helps,
Cole
[1] http://eclipse.org/rap/getting-started/
|
|
|
|
Powered by
FUDForum. Page generated in 0.11230 seconds