[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[skalli-dev] Guide: how to export Skalli as an Eclipse product
- From: Jochen Hiller <jo.hiller@xxxxxxxxxxxxxx>
- Date: Sat, 28 May 2011 13:35:46 +0200
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=mOQwM7OsyxO3dhObo+domJH4qrWVnCaF+kqeILh9b/VquBC4+vfO2a7jzGDyKM8XyQ j8he7gcqx8twlVKV0zZcGjhxmVn4UYAzf1IDnEyIz+d4eZ7TUFh5ff72aCrlEvn6H4Qj 2f5yWXBEK0MK5nfB3MZD1VlenVWgvgdNdjnVc=
I want to deploy Skalli in our infrastructure based on the Jetty runtime. I will define an Eclipse product and features to export it directly from my workspace. I will describe here in comprehensive all steps I had to do to make it running.
Note: When cloning Skalli from Git repo, it can be started within IDE without any problems.
There is yet a feature contained in Skalli: org.eclipse.skalli.feature. This feature does include a feature com.sap.ldi.projectportal.orbit.feature, which is NOT available in repo.
Therefore, I've replaced this by a new feature org.eclipse.skalli.orbit.feature and included the 3rdParty libraries as described in .
This does include 11 plugins:
If I try to export org.eclipse.skalli.feature again, it does not work, with exception:
Processing inclusion from feature org.eclipse.skalli.eclipse.feature: Unable to find plug-in: org.eclipse.core.jobs_3.5.0.v20100515. Please check the error log for more details.
I've changed the org.eclipse.skalli.eclipse.feature
, to use the latest versions of o.e.core.jobs
, o.e.e.preferences, o.e.e.registry, o.e.e.security, o.e.e.security.win32.x86.
Note: If we include the windows specific platform security plugin, we should also consider to include the win32_64 and macosx version of these fragments. I will dont care for the moment, as I will deploy to Linux, but I've added a bug for this .
If I try to export org.eclipse.skalli.feature again, I got cycle references:
A cycle was detected when generating the classpath org.eclipse.skalli.common_0.1.0.201105251413, org.eclipse.skalli.testutil_0.1.0.201105251413, org.eclipse.skalli.api.java_0.1.0.201105251413, org.eclipse.skalli.common_0.1.0.201105251413.
AFAI understand it is related to the fragment "o.e.s.common.test", which is a fragment of "o.e.s.common". This bundle depends on o.e.s.testutil, which leads to a cycle.
Q1: I do NOT know how I can specify to IGNORE the test fragment when exporting a feature/product from IDE. Any idea?
My workaround was to close this project in workspace, which does work. I had to close those projects too to avoid cycle references:
Q2: The o.e.s.testing.feature does only include test o.e.s.testutil bundle. I assume other bundles are missing? For what purpose does this feature will be needed for?
Q3: Similar question about the feature for Skalli source bundles.
I've created now a product configuration with project org.eclipse.skalli.product/skalli.product.
I've added these features to this product:
I've also added missing bundles to org.eclipe.skalli.eclipse.feature:
I've also added missing bundles to org.eclipe.skalli.orbit.features:
I've set start level for bundles:
I could not set o.e.e.ds and o.e.e.common via product editor, fixed it in text mode. Not sure whether its a bug, have to investigate.
If I validate the product, all dependencies are fine now.
I want to add also the Jetty configuration files to the deployment. I've added a folder to org.eclipse.skalli.feature/rootfiles, which contains all required Jetty config files. For a simple demo mode, I've also added the workdir with a preset of data to this rootfiles area.
I've added a simple start script bin/start_skalli.sh to start it with all required options:
java -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dequinox.ds.print=true -Djetty.home=./jetty -Dlogback.configurationFile=./jetty/etc/logback.xml -jar plugins/org.eclipse.osgi_*.jar -clear -console -consoleLog -configuration ./configuration
I will export the skalli.product with following configuration:
- Root directory: skalli
- do NOT Synchronize before exporting
- do NOT generate metadata
- allow for binary cycles
When starting the deployed skalli product now using bin/start_skalli.sh, I will get the next error messages:
Loading bundle org.eclipse.skalli.api.java.persistence will result in:
I am wondering why it is working in IDE. There are slight differences running OSGi from IDE and native.
See also , where the same problem has been reported.
Note: you can simulate this in IDE by setting the property -Dosgi.compatibility.bootdelegation=false in skalli launch config.
The reason for NoClassDefFoundError is that the org.eclipse.skalli.api.java.persistence bundle does NOT import javax.xml.parsers package.
I see two options:
a) import javax.xml.parsers in org.eclipse.skalli.api.java bundle
b) make javax packages visible to all bundles 
I would prefer option a) as this would allow to use different versions of XML parser.
I will add an import for packages
Server starts now fine, but JSPs will not be supported, due to fragment org.eclipse.jetty.osgi.boot.jsp is missing in feature org.eclipse.jetty.core. I've added this bundle to org.eclipse.skalli.eclipse.feature.
Note: I am not sure whether this is the right place. Probalby it has to be included in product export directly, as otherwise we get a reference from eclipse.feature to a specific runtime, here Jetty.
Now server starts, but when opening a browser JSP can NOT be compiled due to:
osgi> 2011-05-27 18:50:22.582:WARN::/search/login.jsp
at java.lang.Class.getDeclaredConstructors0(Native Method)
I've imported now the bundle org.apache.taglibs.standard.glassfish to my workspace, and added import packages for:
You have to update your launch config to use the bundle from workspace now and not from target.
I've also added the o.e.s.view.theme bundle to include the right icons. For an product export the folder src/main/java has been missing, which I added to the project.
Now everything is working fine, either from IDE with -Dosgi.compatibility.bootdelegation=false set, or running as product export with commandline script.
I've added a bug to support product export , and will add my changes as a patch set. It would be helpful, to get a review of someone of Skalli team to check whether this is the right implementation.