[OpenMOLE-devs] Hacks to get openmole-webserver working, issues with OSGi

Mark Hammons markehammons at gmail.com
Wed Jan 23 03:36:54 CET 2013


Romain, if you look at Openmolewebserver.scala, you will see that I have
done a lot of class[RandomClassName] lines that seemingly do nothing. They
are there to force the manifest.mf to list certain packages as necessary.
When the OSGi plugin runs, it seems to trim the needed dependencies down to
what is used during compile time, but since jetty and scalatra both heavily
rely on reflection, they try to use a large number of packages that were
discluded when the bundle was made.

This is the current export and import packages of the manifest.mf:
Export-Package: org.openmole.web;uses:="scala.xml,scala.collection,scala
 .runtime,scala,org.scalatra,scala.collection.mutable,org.scalatra.scala
 te,scala.collection.immutable,org.fusesource.scalate,javax.servlet,scal
 a.reflect,org.scalatra.servlet,javax.servlet.http,org.eclipse.jetty.ser
 ver,org.eclipse.jetty.server.handler,org.eclipse.jetty.util.component,o
 rg.eclipse.jetty.util.resource,org.eclipse.jetty.webapp,org.fusesource.
 scalate.support,org.fusesource.scalate.servlet,org.fusesource.scalate.c
 onsole,org.eclipse.jetty.servlet.listener";version="0.7.0.RC4-SNAPSHOT"
Import-Package: javax.servlet;version="[2.6,3)",javax.servlet.http;versi
 on="[2.6,3)",org.eclipse.jetty.server;version="[8.1,9)",org.eclipse.jet
 ty.server.handler;version="[8.1,9)",org.eclipse.jetty.servlet.listener;
 version="[8.1,9)",org.eclipse.jetty.util.component;version="[8.1,9)",or
 g.eclipse.jetty.util.resource;version="[8.1,9)",org.eclipse.jetty.webap
 p;version="[8.1,9)",org.fusesource.scalate;version="[1.6,2)",org.fuseso
 urce.scalate.console;version="[1.6,2)",org.fusesource.scalate.servlet;v
 ersion="[1.6,2)",org.fusesource.scalate.support;version="[1.6,2)",org.o
 penmole.web,org.scalatra;version="[0.7,1)",org.scalatra.scalate;version
 ="[0.7,1)",org.scalatra.servlet;version="[0.7,1)",scala;version="[2.10,
 3)",scala.collection;version="[2.10,3)",scala.collection.immutable;vers
 ion="[2.10,3)",scala.collection.mutable;version="[2.10,3)",scala.reflec
 t;version="[2.10,3)",scala.runtime;version="[2.10,3)",scala.xml;version
 ="[2.10,3)"

Without those lines in Openmolewebserver.scala,
org.fusesource.scalate.console,servlet,support and many others would not be
listed. I have tried everything I can to fix this, to make every package
listed in the pom.xml's dependencies show up in here, but nothing has
worked. Can you take a shot at it? What I've got now is a terrible hack and
I want to get rid of it ASAP.

Thanks in advance.

-- 
Mark Edgar Hammons II - OU Student | Contributor to
OpenMOLE<http://www.openmole.org/>

Cell - 1 (405) 928 8206
Email - markehammons at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://fedex.iscpif.fr/pipermail/openmole-devs/attachments/20130123/010929a5/attachment.html>


More information about the OpenMOLE-devs mailing list