Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] (no subject)

Hi,

thanks for your reply :-).
I tried to follow your instructions.
I created a fragment bundle with the packages imported. The Manifest looks like that:
..
Fragment-Host: org.eclipse.jetty.osgi.boot
Import-Package: org.cipango.server,org.cipango.server.session
...

Jetty server is still not able to find the dependencies (see trace at the end).
I read something about a FragmentActivator. I did not understand exactly how to use it. Is it necessary to use this Activator or should it be enough just to import the dependencies? If the second one is correct something is not working with the dependency resolution.

java.lang.NoClassDefFoundError: org/cipango/server/session/SessionManager
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getMethod0(Class.java:2670)
    at java.lang.Class.getMethod(Class.java:1603)
    at org.eclipse.jetty.xml.XmlConfiguration.set(XmlConfiguration.java:319)
    at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:263)
    at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:229)
    at org.eclipse.jetty.osgi.boot.internal.serverfactory.ServerInstanceWrapper.configure(ServerInstanceWrapper.java:272)
    at org.eclipse.jetty.osgi.boot.internal.serverfactory.ServerInstanceWrapper.start(ServerInstanceWrapper.java:157)
    at org.eclipse.jetty.osgi.boot.internal.serverfactory.JettyServerServiceTracker.serviceChanged(JettyServerServiceTracker.java:108)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:124)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:930)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:220)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:757)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:712)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:129)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:206)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:506)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:524)
    at org.cipango.Activator.start(Activator.java:21)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:782)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:773)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:754)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272)
    at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:253)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
    at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
    at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
    at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ClassNotFoundException: org.cipango.server.session.SessionManager


-------- Original-Nachricht --------
> Datum: Wed, 13 Jul 2011 13:51:59 +0800
> Von: Hugues Malphettes <hmalphettes@xxxxxxxxxxx>
> An: JETTY user mailing list <jetty-users@xxxxxxxxxxx>
> Betreff: Re: [jetty-users] (no subject)

> Hi there,
> 
> On Tue, Jul 12, 2011 at 10:53 PM,  <Shivering@xxxxxx> wrote:
> > Hello,
> >
> > I want to use jetty in combination with cipango. Therefore I already
> managed to include the startprocess of jetty inside the OSGi environment.
> Following I want to configure jetty to load the cipango extension inside this
> OSGi environment. While doing so, I set
> >
> > -Djetty.etc.config.urls=jetty.xml,cipango.xml,cipango-deploy.xml
> >
> > In the loading procedure of cipango.xml, jetty throws an class not found
> exception. I guess this has something to do with the OSGi classloading.
> >
> > Does somebody know how to add extensions like cipango in a propper way
> to such an environment?
> 
> Looking at the cipango website, I suspect you might be the first to
> setup cipango from OSGi.
> 
> I am not familiar with cipango. I can help you with the injection of
> new dependencies into the classloader used to start the jetty server.
> I took a quick look at etc/cipango.xml distributed with cipango-2.0.0.
> I think you need to use an OSGi fragment for
> org.eclipse.jetty.osgi.boot that would import the necessary cipango
> packages.
> This is described here:
> http://wiki.eclipse.org/Jetty/Feature/Jetty_OSGi#Injecting_new_server-wide_features_into_jetty-osgi
> 
> You will need to package the cipango jars as OSGi bundles first.
> Then in your fragment, either require those cipango bundles either
> import-packages for them or take a small shortcut:
> Dynamic-ImportPackage: org.cipango.*
> 
> Let us know how it goes.
> Hugues.
> 
> >
> > Btw. as OSGi container implementation I am using equinox.
> >
> > Best regards :-)
> >
> > --
> > NEU: FreePhone - kostenlos mobil telefonieren!
> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > _______________________________________________
> > jetty-users mailing list
> > jetty-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/jetty-users
> >
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users

-- 
NEU: FreePhone - kostenlos mobil telefonieren!			
Jetzt informieren: http://www.gmx.net/de/go/freephone


Back to the top