Bug 306869 - Can't get EMF example working -- no IApplication generated.
Summary: Can't get EMF example working -- no IApplication generated.
Status: RESOLVED WORKSFORME
Alias: None
Product: RAP
Classification: RT
Component: Demo (show other bugs)
Version: 1.3   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2010-03-23 15:35 EDT by Miles Parker CLA
Modified: 2010-03-25 20:52 EDT (History)
0 users

See Also:


Attachments
Target Def for failed RAP launch. (54.53 KB, image/png)
2010-03-24 14:12 EDT, Miles Parker CLA
no flags Details
Run config bundles or failed app (234.59 KB, image/png)
2010-03-24 14:15 EDT, Miles Parker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miles Parker CLA 2010-03-23 15:35:56 EDT
I followed:

http://eclipsesource.com/blogs/2010/03/22/emf-and-rap-what-a-lovely-pair/

and

http://wiki.eclipse.org/RAP/EMF_Integration

but no joy in RAPville. One thing I noticed is that I don't have an instance of LibraryEditorAdviserApplication generated. Shouldn't there be one -- like in library.editor/src/org.eclipse.library.presentation?
Comment 1 Rüdiger Herrmann CLA 2010-03-24 12:45:38 EDT
LibraryEditorAdviserApplication is the ID of the application extension that is generated, you should find it in the plugin.xml of your library.editor plug-in.
I followed the steps from the wiki (http://wiki.eclipse.org/RAP/EMF_Integration) again and couldn't find a problem.
Note that the RAP launch configurations do not yet allow to browse for applications (bug 303352) you need to enter the ID into the "Entry Point" field as shown in the screen shot on the wiki page.

Could you provide more details on what isn't working?
Comment 2 Miles Parker CLA 2010-03-24 14:07:58 EDT
(In reply to comment #1)
> Note that the RAP launch configurations do not yet allow to browse for
> applications (bug 303352) you need to enter the ID into the "Entry Point" field
> as shown in the screen shot on the wiki page.
> 
> Could you provide more details on what isn't working?

Well at that point I could'nt launch anything because I thought I had to find that with the Browse button. Yesterday I figured out that I needed to type it in, and now I get:

!SESSION 2010-03-24 11:06:12.630 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_17
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Command-line arguments:  -dev file:/Users/milesparker/Documents/workspace-rap5/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os macosx -ws cocoa -arch x86_64 -consoleLog

!ENTRY org.eclipse.osgi 2 0 2010-03-24 11:06:18.549
!MESSAGE While loading class "org.eclipse.ui.PlatformUI", thread "Thread[Framework Event Dispatcher,5,main]" timed out waiting (5000ms) for thread "Thread[Start Level Event Dispatcher,5,main]" to finish starting bundle "org.eclipse.rap.ui.workbench_1.3.0.20100316-1859 [21]". To avoid deadlock, thread "Thread[Framework Event Dispatcher,5,main]" is proceeding but "org.eclipse.ui.PlatformUI" may not be fully initialized.
!STACK 0
org.osgi.framework.BundleException: State change in progress for bundle "initial@reference:file:plugins/org.eclipse.rap.ui.workbench_1.3.0.20100316-1859.jar/" by thread "Start Level Event Dispatcher".
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1072)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:277)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:406)
	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
	at org.eclipse.ui.plugin.AbstractUIPlugin.refreshPluginActions(AbstractUIPlugin.java:495)
	at org.eclipse.ui.plugin.AbstractUIPlugin$2.bundleChanged(AbstractUIPlugin.java:620)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
	... 19 more
Root exception:
org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1072)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:277)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:406)
	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
	at org.eclipse.ui.plugin.AbstractUIPlugin.refreshPluginActions(AbstractUIPlugin.java:495)
	at org.eclipse.ui.plugin.AbstractUIPlugin$2.bundleChanged(AbstractUIPlugin.java:620)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Comment 3 Miles Parker CLA 2010-03-24 14:12:52 EDT
Created attachment 162890 [details]
Target Def for failed RAP launch.
Comment 4 Miles Parker CLA 2010-03-24 14:15:59 EDT
Created attachment 162891 [details]
Run config bundles or failed app

I noticed something weird here.. UI reports "53 of 102 bundles selected" even though I have all bundles selected (and count ~53).
Comment 5 Rüdiger Herrmann CLA 2010-03-25 04:01:06 EDT
(In reply to comment #4)
> Created an attachment (id=162891)
> Run config bundles or failed app
> 
> I noticed something weird here.. UI reports "53 of 102 bundles selected" even
> though I have all bundles selected (and count ~53).
I have no idea where the 102 total bundles come from (may be a PDE issue?)
Did you try to run without the library.test and its dependencies (*junit*)?
Comment 6 Miles Parker CLA 2010-03-25 14:59:19 EDT
I just did. I unselected everything, selected library.editor and then add required bundles. Got 35 total and the same error msg.
Comment 7 Miles Parker CLA 2010-03-25 15:10:39 EDT
Yeah, probably a P2 issue. Oh well... You might notice that on the attachment for configuration I had a different count of plugins available. (And yep, I do have Include Required Software unchecked. I assume that Include All Environments should also be false). I just went and reloaded and now I get the same count..but same error msg, and the following has been showing up in console:

Warning
Thu Mar 25 12:05:51 PDT 2010
Error parsing metadata repository

Warning
Thu Mar 25 12:05:51 PDT 2010
Error at line 6858, column 24: Duplicate singleton element in element "repository": <references size="4">
Comment 8 Miles Parker CLA 2010-03-25 15:31:24 EDT
OK, I have **no clue** what went wrong. I just went back and went through the whole process again -- fresh install fresh workspace, etc.. And it's working. The only thing I did differently this time is the ordering. I installed the target platform first, then EMF, then built the Library app, then RAP Tooling but I can't see how that could have affected anything.

BTW, I think you should note specifically the 2 host environment features -- EMF SDK and RAP Tooling. This one wasn't obvious to me either as we have:

Modeling:
     EMF SDK (you need that :))
    EMF RAP stuff (that you aren't supposed to have in host environment)

RT:
     EMF RAP SDK (again not in target platform)

Web:
    EMF RAP Tooling (that you are..)
Comment 9 Rüdiger Herrmann CLA 2010-03-25 19:05:31 EDT
(In reply to comment #8)
> OK, I have **no clue** what went wrong. I just went back and went through the
> whole process again -- fresh install fresh workspace, etc.. And it's working.
> The only thing I did differently this time is the ordering. I installed the
> target platform first, then EMF, then built the Library app, then RAP Tooling
> but I can't see how that could have affected anything.
> 
> BTW, I think you should note specifically the 2 host environment features -- EMF
> SDK and RAP Tooling. This one wasn't obvious to me either as we have:
> 
> Modeling:
> EMF SDK (you need that :))
> EMF RAP stuff (that you aren't supposed to have in host environment)
> 
> RT:
> EMF RAP SDK (again not in target platform)
> 
> Web:
> EMF RAP Tooling (that you are..)
Again, I worked on the wiki: http://wiki.eclipse.org/RAP/EMF_Integration
Please let us know if the instructions are still unclear. 
I wil close this bug. Please re-open or file another issue as you see fit.
Comment 10 Miles Parker CLA 2010-03-25 20:52:48 EDT
(In reply to comment #9)
> Again, I worked on the wiki: http://wiki.eclipse.org/RAP/EMF_Integration
> Please let us know if the instructions are still unclear. 
> I wil close this bug. Please re-open or file another issue as you see fit.

Looks good to me and thanks..hopefully that will make experience for RAP / AJAX folks like me glitch free. Please go ahead and close.