Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "COSMOS SDD Runtime P2 Review"

m (Getting Started for Developers)
m (Webapp QuickStart)
Line 131: Line 131:
  
  
There was no further information available and giving the nature of the guide being written this past October of 2007, we decided not to pursue this any further.
+
There was no further information available and since the guide has not been updated since October of 2007, we decided not to pursue this any further.
 
+
  
 
=== Getting Started ===
 
=== Getting Started ===

Revision as of 17:08, 26 February 2008

The SDD Runtime team took a week to do a deep dive into the framework called Equinox P2, which is part of the Equinox Project under Eclipse.


Goals

The main goals of the investigation were to determine how far along the p2 framework is and to get an understanding of the overall architecture of the framework. High level discussions had pointed to the architecture following the same issues that the SDD schema and profile is trying to solve, but using different terminology.


Approach

The approach the COSMOS Runtime team took was to divide and conquer. With several "Getting Started" guides on the Equinox Wiki, we each took a guide and attempted to get something built based on the information provided.

Getting Started for Developers

For the Getting Started for Developers guide, we started by following the provided documentation and were met with little success. Retrieving the code and building in an Eclipse 3.3 (Europa) environment was failed because the p2 code relies on libraries developed for the 3.4 (Ganamede). The latest stable build of 3.4 is the M5 build. Once 3.4M5 was downloaded, the reloaded code was compiled and we started moving into running the steps defined in the guide. The first step of running the Metadata Generator SDK was successful, and repository and archive data were generated. We have no way of knowing if the data that is generated is the correct data so we proceeded to the next step.

The next step was to run the director app code, which is supposed to take the metadata directories created in the first step using the generator and make a application area that can be run. Invoking the director app proved troublesome as it would not run and threw the following error.

       osgi> !SESSION 2008-02-21 12:35:51.494
       -----------------------------------------------
       eclipse.buildId=unknown
       java.version=1.5.0_12
       java.vendor=Sun Microsystems Inc.
       BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework 
       arguments:  -application org.eclipse.equinox.p2.director.app.application -metadataRepository file:C:\equinox.p2\servers\ -artifactRepository file:C:\equinox.p2\servers\-installIU sdk -destination C:\equinox.p2\eclipseApp\ -flavor tooling -profile foo 
       Command-line arguments:  -dev file:C:/jehamm/dev/open_source/.metadata/.plugins/org.eclipse.pde.core/directorapp/dev.properties  
       console -consolelog -application org.eclipse.equinox.p2.director.app.application -metadataRepository file:C:\equinox.p2\servers\ -artifactRepository file:C:\equinox.p2\servers\ -installIU sdk -destination C:\equinox.p2\eclipseApp\ -flavor tooling -profile foo
       !ENTRY org.eclipse.osgi 4 0 2008-02-21 12:35:52.212 !MESSAGE 
       Application error !STACK 1
       java.lang.IllegalStateException: Unable to acquire application service.
       Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:72)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
       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)
       atorg.eclipse.equinox.launcher.Main.invokeFramework(Main.java:564)
       at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
       at org.eclipse.equinox.launcher.Main.run(Main.java:1251)
       at org.eclipse.equinox.launcher.Main.main(Main.java:1227)


After getting this error an email was sent to the equinox-dev group requesting any help regarding this error. In the meantime, some time spent searching through the p2 dev mailing turned up some things to try to correct the problem but nothing worked. After a couple of iterations over email though various individuals we were never able to get past the first step in the Getting Started For Developers Guide.

Webapp QuickStart

In addition to working through the developers guide, we also tackled the WebApp Quick Start guide. This quick start is designed to show how to use the p2 framework to deploy an existing war file into a Tomcat or JBoss application thus provisioning some new jsp files.

To start this investigation, we used an instance of JBoss and downloaded and installed the provBridge.war file and the metajsp.war file into JBoss.

Analysis


Deploying the war files starts the OSGI> prompt up but it immediatly started throwing errors in loading as shown below.

       15:14:28,224 INFO  [TomcatDeployer] deploy, ctxPath=/metajsp, warUrl=.../tmp/deploy/tmp35322metajsp-exp.war/
       15:14:28,349 WARN  [config] Unable to process deployment descriptor for context 'null'
       15:14:30,693 INFO  [TomcatDeployer] deploy, ctxPath=/provbridge, warUrl=.../tmp/deploy/tmp35323provbridge-exp.war/
       osgi> 
       15:14:32,146 ERROR [STDERR] Can't install org.mozilla.rhino/1.6.0.200706271604 from location file:/C:/JBoss/jboss4.2.2.GA/server/default/work/jboss.web/localhost/provbridge/eclipse/plugins/org.mozilla.rhino_1.6.0.200706271604/
       15:14:32,177 ERROR [STDERR] Can't install com.thoughtworks.xstream/1.0.0 from location file:/C:/JBoss/jboss-4.2.2.GA/server/default/work/jboss.web/localhost/provbridge/eclipse/plugins/com.thoughtworks.xstream_1.0.0/
       15:14:32,787 ERROR [STDERR] org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.equinox.prov.artifact.repository; version="0.0.0"
       15:14:32,787 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
       15:14:32,787 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
       15:14:32,802 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:252)
       15:14:32,802 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.ConfigApplier.startBundle (ConfigApplier.java:186)
       15:14:32,802 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.ConfigApplier.install(ConfigApplier.java:51)
       15:14:32,802 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:83)
       15:14:32,802 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:94)
       15:14:32,802 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.Activator.start(Activator.java:47)
       15:14:32,818 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
       15:14:32,818 ERROR [STDERR]     at java.security.AccessController.doPrivileged(Native Method)
       15:14:32,818 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
       15:14:32,818 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
       15:14:32,818 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
       15:14:32,818 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
       15:14:32,818 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
       15:14:32,834 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
       15:14:32,834 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
       15:14:32,834 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
       15:14:32,834 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
       15:14:32,834 ERROR [STDERR]     at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
       15:14:32,834 ERROR [STDERR]     at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)
       15:14:32,849 ERROR [STDERR] org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing         Constraint: Import-Package: org.eclipse.equinox.prov.artifact.repository; version="0.0.0"
       15:14:32,849 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
       15:14:32,849 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
       15:14:32,849 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:252)
       15:14:32,849 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.ConfigApplier.startBundles(ConfigApplier.java:186)
       15:14:32,865 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.ConfigApplier.install(ConfigApplier.java:51)
       15:14:32,865 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:83)
       15:14:32,865 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:94)
       15:14:32,865 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.Activator.start(Activator.java:47)
       15:14:32,865 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
       15:14:32,865 ERROR [STDERR]     at java.security.AccessController.doPrivileged(Native Method)
       15:14:32,881 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
       15:14:32,881 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
       15:14:32,881 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
       15:14:32,881 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
       15:14:32,881 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
       15:14:32,881 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
       15:14:32,881 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
       15:14:32,896 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
       15:14:32,896 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
       15:14:32,896 ERROR [STDERR]     at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
       15:14:32,896 ERROR [STDERR]     at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)
       15:14:32,896 ERROR [STDERR] org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.equinox.prov.artifact.repository; version="0.0.0"
       15:14:32,912 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:305)
       15:14:32,912 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
       15:14:32,912 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:252)
       15:14:32,912 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.ConfigApplier.startBundles(ConfigApplier.java:186)
       15:14:32,912 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.ConfigApplier.install(ConfigApplier.java:51)
       15:14:32,912 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:83)
       15:14:32,927 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:94)
       15:14:32,927 ERROR [STDERR]     at org.eclipse.equinox.simpleconfigurator.internal.Activator.start(Activator.java:47)
       15:14:32,927 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
       15:14:32,927 ERROR [STDERR]     at java.security.AccessController.doPrivileged(Native Method)
       15:14:32,927 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
       15:14:32,927 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
       15:14:32,943 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
       15:14:32,943 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
       15:14:32,943 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
       15:14:32,943 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
       15:14:32,943 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
       15:14:32,943 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
       15:14:32,943 ERROR [STDERR]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
       15:14:32,959 ERROR [STDERR]     at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
       15:14:32,959 ERROR [STDERR]     at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)
       15:14:33,693 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
       15:14:33,709 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
       15:14:33,802 INFO  [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 28s:437ms


There was no further information available and since the guide has not been updated since October of 2007, we decided not to pursue this any further.

Getting Started

In addition to working through the developers guide, we simultaneously tackled the Getting Started guide.

Summary

It appears that the Equinox p2 effort is in major flux at this moment and we are coming into the mix at a bad time. The Equinox team is preparing for EclipseCon and have stated that they have little to no time to devote to this initiative. They have however responded to the emails to the equinox-dev list in timely manors. It is our recommendation that we focus our energy on identifying the parts of the Solstice runtime effort that would be necessary even if we did decide to extend the p2 framework. This includes the work of reading, verifying a SDD schema, creating and updating MDR information, and communication with a CMDB(f) system.


Latest ( 2/26/2008 )

The source code for the p2 project has been relocated from its CVS repository into a new location. The new code location is /cvsroot/eclipse/org.eclipse.equinox/p2/. To get the new code and start afresh, I have removed all of the original code and started with a clean build. I have successfully been able to run both the Metadata Generator SDK and the director app and have created a working Eclipse Application as advertised in the Getting Started for Developers Guide. Now to figure out what all of this really means....

Back to the top