How to deploy Vaadin app to Virgo Jetty Server? [message #728247] |
Thu, 22 September 2011 15:21  |
Eclipse User |
|
|
|
Hi,
Kai Tödter has a great Vaadin and OSGi demo app:
http://www.toedter.com/blog/?p=412
I wanted to deploy it to Virgo Jetty Server, so I created the following plan:
<?xml version="1.0" encoding="UTF-8"?>
<plan name="osgi_vaadin_demo.plan" version="1.0.0" scoped="true"
atomic="true" xmlns="http://www.eclipse.org/virgo/schema/plan"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.eclipse.org/virgo/schema/plan
http://www.eclipse.org/virgo/schema/plan/eclipse-virgo-plan.xsd">
<artifact type="bundle" name="javax.servlet" version="2.5.0.v200910301333" />
<artifact type="bundle" name="slf4j.api" version="1.6.1" />
<artifact type="bundle" name="ch.qos.logback.classic" version="0.9.28" />
<artifact type="bundle" name="com.vaadin" version="6.5.7" />
<artifact type="bundle" name="ch.qos.logback.core" version="0.9.28" />
<artifact type="bundle" name="org.vaadin.osgi" version="1.0.1" />
<artifact type="bundle" name="org.vaadin.osgi.staticres" version="1.0.1" />
<artifact type="bundle" name="com.siemens.ct.pm.model.minimal" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.pm.model" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.pm.model.basic" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.treeview" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.theme" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.tableview" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.saveaction" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.runoraction" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.reindeeraction" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.printaction" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.main" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.logback" version="1.0.0.201109132107" />
<artifact type="bundle" name="com.siemens.ct.osgi.vaadin.pm.bundleview" version="1.0.0.201109132107" />
</plan>
I copied the bundle jars into the $SERVER_HOME/repository/usr/ directory, then I started the server.
Once the server started I copied the above plan into the $SERVER_HOME/pickup/ directory, and the plan was successfully started.
However when I tried to open the demo URL, I got a Jetty error.
I tried the following URLs, but none of them worked:
http://localhost/com.siemens.ct.osgi.vaadin.pm.main
http://localhost:8080/com.siemens.ct.osgi.vaadin.pm.main
Please let me know what I am doing wrong.
Many thanks,
Marton
|
|
|
|
|
|
|
Re: How to deploy Vaadin app to Virgo Jetty Server? [message #730640 is a reply to message #730289] |
Wed, 28 September 2011 14:53  |
Eclipse User |
|
|
|
Ok. I think I see your confusion. Virgo Tomcat and Jetty implement newer Web App spec from OSGi. This example uses older approach that uses org.eclipse.equinox.http.registry/servlet etc.
Without digging too much into vaadin osgi bridge I would not be able to tell you how to run this example.
In general to deploy web-apps on Virgo (either tomat or jetty) you will need a proper web app that contains a web.xml and Web-ContextPath: contextPath manifest header See here: http://www.eclipse.org/virgo/documentation/virgo-documentation-3.0.1.RELEASE/docs/virgo-programmer-guide/html/ch05.html#migrating-to-osgi-web
You could try to add required bundles to Virgo. You will need to make sure that missing dependencies are installed and working properly. I had this set in repository/usr and plan started up fine, but I did not dig deeper to figure out how to get the page to come up.
com.siemens.ct.osgi.server.hello_1.0.0.201109281404.jar com.siemens.ct.pm.model.basic_1.0.0.201109281404.jar
com.siemens.ct.osgi.vaadin.pm.bundleview_1.0.0.201109281404.jar com.siemens.ct.pm.model.minimal_1.0.0.201109281404.jar
com.siemens.ct.osgi.vaadin.pm.logback_1.0.0.201109281404.jar com.siemens.ct.pm.model_1.0.0.201109281404.jar
com.siemens.ct.osgi.vaadin.pm.main_1.0.0.201109281404.jar org.vaadin.osgi.staticres_1.0.1.jar
com.siemens.ct.osgi.vaadin.pm.printaction_1.0.0.201109281404.jar org.vaadin.osgi_1.0.1.jar
com.siemens.ct.osgi.vaadin.pm.reindeeraction_1.0.0.201109281404.jar vaadin-6.6.7.jar
com.siemens.ct.osgi.vaadin.pm.runoraction_1.0.0.201109281404.jar org.eclipse.equinox.registry_3.5.0.v20100503.jar
com.siemens.ct.osgi.vaadin.pm.saveaction_1.0.0.201109281404.jar org.eclipse.equinox.http.servlet_1.1.0.v20100503.jar
com.siemens.ct.osgi.vaadin.pm.tableview_1.0.0.201109281404.jar org.eclipse.equinox.http.jetty_2.0.0.v20100503.jar
com.siemens.ct.osgi.vaadin.pm.theme_1.0.0.201109281404.jar org.eclipse.equinox.http.registry_1.1.0.v20100503.jar
com.siemens.ct.osgi.vaadin.pm.treeview_1.0.0.201109281404.jar org.eclipse.equinox.common_3.6.0.v20100503.jar
You might be better off just deploying a regular web app and consuming OSGi services in there...
|
|
|
Powered by
FUDForum. Page generated in 0.04335 seconds