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

Romain romain.reuillon at iscpif.fr
Wed Jan 23 08:37:53 CET 2013


In order to allows reflection through all the classloaders for scalatra 
you should add the property:

     <eclipse.buddypolicy>global</eclipse.buddypolicy>

in its bundeling pom.


On 23/01/2013 03:36, Mark Hammons wrote:
> 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 <mailto:markehammons at gmail.com>
>
>
> _______________________________________________
> OpenMOLE-devs mailing list
> OpenMOLE-devs at iscpif.fr
> http://fedex.iscpif.fr/mailman/listinfo/openmole-devs
>



More information about the OpenMOLE-devs mailing list