Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RCP with ECF on RAP [RESOLVED](Single-sourced as well, a little RCP application with ECF gives an error)
icon9.gif  RCP with ECF on RAP [RESOLVED] [message #643296] Mon, 06 December 2010 12:22 Go to next message
Peter Boccia is currently offline Peter BocciaFriend
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 #643334 is a reply to message #643296] Mon, 06 December 2010 13:30 Go to previous messageGo to next message
Patrick is currently offline PatrickFriend
Messages: 55
Registered: July 2009
Member
Le 06/12/2010 13:22, Peter Boccia a écrit :
> 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
> ...

Hello,
Check in your Run Configuration if all required plug-ins are added.
Good luck.
--
Patrick
Re: RCP with ECF on RAP [message #643355 is a reply to message #643334] Mon, 06 December 2010 15:50 Go to previous messageGo to next message
Peter Boccia is currently offline Peter BocciaFriend
Messages: 38
Registered: December 2010
Member
I've just tried to run with all the bundles (except org.eclipse.rap.ui.demo), but give the same errors... Sad

Can be the framework? I didn't find anything about RAP with ECF.
Re: RCP with ECF on RAP [message #643423 is a reply to message #643355] Mon, 06 December 2010 19:39 Go to previous messageGo to next message
Cole Markham is currently offline Cole MarkhamFriend
Messages: 150
Registered: July 2009
Location: College Station, TX
Senior Member

Most likely the ECF and/or your UI bundles will need to be modified to have a dependency on RAP UI bundles. I would expect to find the documentation for this on the FAQ, but it doesn't seem to be there. I'll try to add an entry later. It was probably discussed in more detail on the newsgroup at some point, but here are the basics for single sourcing. What you need to do is mark the existing Eclipse UI bundles as optional dependencies and add the RAP UI bundles also as optional dependencies. See the FAQ [1] on warnings with optional dependencies.


[1] http://wiki.eclipse.org/RAP/FAQ#Why_can.27t_I_remove_warning s_for_missing_org.eclipse.ui_bundles.3F
Re: RCP with ECF on RAP [message #643520 is a reply to message #643423] Tue, 07 December 2010 09:04 Go to previous messageGo to next message
Peter Boccia is currently offline Peter BocciaFriend
Messages: 38
Registered: December 2010
Member
Hi Cole, thanks for the good answer.
The first thing that I've done it's to put in dependencies the RAP UI Bundles and set Eclipse UI as optional. In fact I followed the book Eclipse RAP that I downloaded from Eclipse site and this is the first thing to do.

Then I added to my Target Platform the "ecf" plugin and in this way I resolved all the error of ECF imports.
I'm going to try your way now and I'll let you know the results.

Thank you!
icon9.gif  Re: RCP with ECF on RAP [message #644783 is a reply to message #643296] Tue, 14 December 2010 08:50 Go to previous messageGo to next message
Peter Boccia is currently offline Peter BocciaFriend
Messages: 38
Registered: December 2010
Member
Hi all,
I've tried all the bundle (in all the possible combinations) but it still doesn't work!

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.

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.

My question now is: it's possible or not to get ECF on RAP?
If it does, how can I workaround these problems of bundles:

!ENTRY org.eclipse.osgi 4 0 2010-12-14 09:49:12.936
!MESSAGE Bundle org.eclipse.ui.workbench_3.6.1.M20100826-1330 [44] is not active.

!ENTRY org.eclipse.osgi 4 0 2010-12-14 09:49:12.936
!MESSAGE Bundle org.eclipse.ui.workbench.texteditor_3.6.1.r361_v20100714-080 0 [23] is not active.

!ENTRY org.eclipse.osgi 4 0 2010-12-14 09:49:12.936
!MESSAGE Bundle org.eclipse.ui_3.6.1.M20100826-1330 [30] is not active.

!ENTRY org.eclipse.osgi 4 0 2010-12-14 09:49:12.936
!MESSAGE Bundle org.eclipse.ui.console_3.5.0.v20100526 [55] is not active.


I have no more ideas. Help me please Sad

Thanks
Re: RCP with ECF on RAP [message #644868 is a reply to message #644783] Tue, 14 December 2010 14:37 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
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 #644889 is a reply to message #644868] Tue, 14 December 2010 15:52 Go to previous messageGo to next message
Peter Boccia is currently offline Peter BocciaFriend
Messages: 38
Registered: December 2010
Member
Oh, Shocked Scott Lewis!
Just today I heard about you!

I'm doing a research in the ISISlab, and try to run coffee on RAP. But I'm new to the RAP and so I don't know the reasons of all this problem.

Now I start from a really little test of ECF and then I'll work on coffee.

Are you suggest me to create a fragment for each part of ECF that I need? And obviously also of SWT.error etc.

But in this way, aren't we forced to workaround this fragment in the original code?

I always import all the packages or set them as Dependencies, following the guideline of the book about single-sourcing the RAP. And add it as bundle.

Thank you for your help! This evening, on the professor suggestion, I was going to write you to ask help!
It's a great honour for me.
Re: RCP with ECF on RAP [message #655165 is a reply to message #643296] Fri, 18 February 2011 14:30 Go to previous messageGo to next message
Peter Boccia is currently offline Peter BocciaFriend
Messages: 38
Registered: December 2010
Member
No suggestion available? Sad after two months I have no answers!
I take the smallest example of an RCP that uses ECF but I got the same errors.

I have no other ways to try.

[Updated on: Fri, 18 February 2011 14:31]

Report message to a moderator

Re: RCP with ECF on RAP [message #655179 is a reply to message #655165] Fri, 18 February 2011 15:06 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Peter,
please post the output of osgi "ss" console command after you launch
your application.
Best,
Ivan

On 2/18/2011 4:30 PM, Peter Boccia wrote:
> No suggestion available? :( In two months I have no answers!
> I take the smallest example of an RCP that uses ECF but I got the same
> errors.
>
> I have no other ways to try.
Re: RCP with ECF on RAP [message #655187 is a reply to message #655179] Fri, 18 February 2011 15:26 Go to previous messageGo to next message
Peter Boccia is currently offline Peter BocciaFriend
Messages: 38
Registered: December 2010
Member
http://asd08.altervista.org/osgi_output110218.txt

The output is big so I attach it in an external file.

Thank you in advance.
Re: RCP with ECF on RAP [message #655203 is a reply to message #655187] Fri, 18 February 2011 15:54 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Peter,
these are the stack traces from the exceptions. I'm asking you for the
output of osgi "ss" command. Type "ss" in the console and post the result.
Best,
Ivan

On 2/18/2011 5:26 PM, Peter Boccia wrote:
> http://asd08.altervista.org/osgi_output110218.txt
>
> The output is big so I attach it in an external file.
>
> Thank you in advance.
Re: RCP with ECF on RAP [message #655205 is a reply to message #655203] Fri, 18 February 2011 16:03 Go to previous messageGo to next message
Peter Boccia is currently offline Peter BocciaFriend
Messages: 38
Registered: December 2010
Member
I'm sorry Ivan...

Here is the output:

http://asd08.altervista.org/real_osgi_output110218.txt

Sorry...
Re: RCP with ECF on RAP [message #655219 is a reply to message #655205] Fri, 18 February 2011 16:42 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Peter,
you have a conflicting (RAP vs RCP) plugins in your launch
configuration. For example:

org.eclipse.rap.ui.workbench_1.3.1.20100915-2301
org.eclipse.ui.workbench_3.6.1.M20100826-1330

and
org.eclipse.rap.jface_1.3.1.20100915-2301
org.eclipse.jface_3.6.1.M20100825-0800

and
org.eclipse.rap.rwt_1.3.1.20100915-2301
org.eclipse.swt_3.6.1.v3655c
....
....


Mixing RCP and RAP target is very vary bad idea. I will suggest you to cleanup your launch configuration:
- remove source bundles
- remove conflicting RCP bundles
- remove junit bundles

and try again.
HTH,

Ivan


On 2/18/2011 6:03 PM, Peter Boccia wrote:
> I'm sorry Ivan...
>
> Here is the output:
>
> http://asd08.altervista.org/real_osgi_output110218.txt
>
> Sorry...
Re: RCP with ECF on RAP [message #655226 is a reply to message #643296] Fri, 18 February 2011 17:35 Go to previous messageGo to next message
Cole Markham is currently offline Cole MarkhamFriend
Messages: 150
Registered: July 2009
Location: College Station, TX
Senior Member

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/
Re: RCP with ECF on RAP [message #655551 is a reply to message #655219] Mon, 21 February 2011 17:56 Go to previous message
Peter Boccia is currently offline Peter BocciaFriend
Messages: 38
Registered: December 2010
Member
Hi all.

I re-set the Target platform as you said.
The problem was that in all the tries that I've done, I added each time another bundle (probably wrong and with no-sense) and so I re-set all the Target Platform with only two target:

- Default RAP target platform (usually: \eclipse\configuration\org.eclipse.rap.target-1.3\eclipse)
- and I added the required ECF contents: name: Eclipse Communication Framework Target Components - version: 3.3.1.v20100913-1814

And after adding an additional bundle 'org.eclipse.ui.console', it works.

Now I'm checking out if all the ECF features works correctly (at first appearance it seems to be).

Thank you all Smile
Previous Topic:WebViewer
Next Topic:Single source and Internationalization
Goto Forum:
  


Current Time: Thu Mar 28 11:03:37 GMT 2024

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

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

Back to the top