Home » Eclipse Projects » Equinox » ClassNotFoundException in spite of working exports/imports?
ClassNotFoundException in spite of working exports/imports? [message #58905] |
Mon, 30 January 2006 14:08 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Benjamin Podszun![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ben%40galactic-tales.de) Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Hi there.
I'm currently trying to find out if equinox/wicket might be the greatest thing on earth, only second to beer.
Unfortunately I fail quite early..
org.osgi.framework.BundleException: Exception in de.darklajid.wickettest.impl.Activator.start() of bundle WicketTest.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:1013)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:969)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:316)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:255)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java:145)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:293)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:278)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:213)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:68)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
at org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:377)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:72)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
at de.darklajid.wickettest.impl.Activator.start(Activator.java: 23)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:994)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:988)
... 13 more
Nested Exception:
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:68)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
at org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:377)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:72)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
at de.darklajid.wickettest.impl.Activator.start(Activator.java: 23)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:994)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:988)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:969)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:316)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:255)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java:145)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:293)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:278)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:213)
at java.lang.Thread.run(Thread.java:613)
Nested Exception:
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:68)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
at org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(SingleSourcePackage.java:37)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:377)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(DefaultClassLoader.java:370)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClassLoader.java:233)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(DefaultClassLoader.java:343)
at org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(DefaultClassLoader.java:235)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(AbstractClassLoader.java:183)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(EclipseClassLoader.java:141)
at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:72)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:337)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:389)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:350)
at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:78)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
at de.darklajid.wickettest.impl.Activator.start(Activator.java: 23)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:994)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:988)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:969)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:316)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:255)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java:145)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:293)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:278)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:213)
at java.lang.Thread.run(Thread.java:613)
Manifest of my bundle:
anifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: WicketTest Plug-in
Bundle-SymbolicName: WicketTest
Bundle-Version: 1.0.0
Bundle-Activator: de.darklajid.wickettest.impl.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.osgi,
org.eclipse.osgi.services,
org.eclipse.osgi.util
Eclipse-LazyStart: http
Import-Package: javax.servlet,
javax.servlet.http,
wicket,
wicket.application,
wicket.markup,
wicket.markup.html,
wicket.markup.html.basic,
wicket.protocol.http
My testbed currently:
osgi> ss
Framework is launched.
id State Bundle
0 ACTIVE system.bundle_3.2.0.v20051212a
1 ACTIVE org.eclipse.osgi.services_3.1.100.v20051205
2 ACTIVE org.eclipse.osgi.util_3.1.100.v20051205
3 ACTIVE org.eclipse.equinox.log_1.0.0.200601280449
4 ACTIVE Servlet_1.0.0
5 ACTIVE Wicket_1.0.0
6 STARTING org.eclipse.equinox.http_1.0.0.200601281441
7 RESOLVED initial@file:lib/autodeploy.jar [7]
8 RESOLVED WicketTest_1.0.0
The first 4 bundles should be obvious, they are stolen from my Eclipse 3.2M4 directory. 4 and 5 were created by me by using the New.. -> Project.. -> Plug-In Development -> Plug-In from existing JAR archives way.
That seems to work (read: does export the right thing), see:
osgi> bundle 4
initial@file:lib/servlet.jar [4]
Id=4, Status=ACTIVE Data Root=/Users/bpodszun/IdeaProjects/CPOS2/bin/configuration/or g.eclipse.osgi/bundles/4/data No registered services.
No services in use.
Exported packages
javax.servlet; specification-version="0.0.0"[exported]
javax.servlet.http; specification-version="0.0.0"[exported]
javax.servlet.jsp; specification-version="0.0.0"[exported]
javax.servlet.jsp.el; specification-version="0.0.0"[exported]
javax.servlet.jsp.resources; specification-version="0.0.0"[exported]
javax.servlet.jsp.tagext; specification-version="0.0.0"[exported]
javax.servlet.resources; specification-version="0.0.0"[exported]
Imported packages
javax.servlet; specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
javax.servlet.http; specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
javax.servlet.jsp; specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
javax.servlet.jsp.el; specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
javax.servlet.jsp.resources; specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
javax.servlet.jsp.tagext; specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
javax.servlet.resources; specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
No fragment bundles
Named class space
Servlet; bundle-version="1.0.0"[provided]
No required bundles
Bundle 6 is from the equinox bundle repository/CVS. It seems to be quite happy with my servlet api library:
osgi> bundle 6
initial@file:lib/org.eclipse.equinox.http.jar [6]
Id=6, Status=ACTIVE Data Root=/Users/bpodszun/IdeaProjects/CPOS2/bin/configuration/or g.eclipse.osgi/bundles/6/data Registered Services
{org.osgi.service.http.HttpService}={http.port=8080, service.pid=org.eclipse.equinox.http.HttpService-http, http.address=ALL, service.vendor=IBM, service.description=OSGi Http Service - IBM Implementation, http.scheme=http, http.timeout=30, service.id=22}
{org.osgi.service.cm.ManagedService}={service.description=OS Gi Http Service - IBM Implementation, service.pid=org.eclipse.equinox.http.Http, service.vendor=IBM, service.id=23}
{org.osgi.service.cm.ManagedServiceFactory}={service.descrip tion=OSGi Http Service - IBM Implementation, service.pid=org.eclipse.equinox.http.HttpFactory, service.vendor=IBM, service.id=24}
Services in use:
{org.osgi.service.log.LogService}={service.description=OSGi Log Service - IBM Implementation, service.pid=org.eclipse.equinox.log.LogService, service.vendor=IBM, service.id=19}
Exported packages
org.eclipse.equinox.http; specification-version="0.0.0"[exported]
org.eclipse.equinox.http.servlet; specification-version="0.0.0"[exported]
org.eclipse.equinox.socket; specification-version="0.0.0"[exported]
org.eclipse.equinox.socket.https; specification-version="0.0.0"[exported]
Imported packages
org.osgi.framework; specification-version="1.3.0"<System Bundle [0]>
org.osgi.util.tracker; specification-version="1.3.1"<System Bundle [0]>
org.eclipse.osgi.util; specification-version="1.0.0"<System Bundle [0]>
org.osgi.service.cm; specification-version="1.2.0"<initial@file:lib/org.eclipse.osgi.services.jar [1]>
org.osgi.service.http; specification-version="1.2.0"<initial@file:lib/org.eclipse.osgi.services.jar [1]>
org.osgi.service.log; specification-version="1.3.0"<initial@file:lib/org.eclipse.osgi.services.jar [1]>
javax.servlet; specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
javax.servlet.http; specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
org.eclipse.equinox.http; specification-version="0.0.0"<initial@file:lib/org.eclipse.equinox.http.jar [6]>
org.eclipse.equinox.http.servlet; specification-version="0.0.0"<initial@file:lib/org.eclipse.equinox.http.jar [6]>
org.eclipse.equinox.socket; specification-version="0.0.0"<initial@file:lib/org.eclipse.equinox.http.jar [6]>
org.eclipse.equinox.socket.https; specification-version="0.0.0"<initial@file:lib/org.eclipse.equinox.http.jar [6]>
No fragment bundles
Named class space
org.eclipse.equinox.http; bundle-version="1.0.0.200601281441"[provided]
No required bundles
Any ideas or obvious mistakes in my setup?
Thanks in advance,
Ben
|
|
|
Re: ClassNotFoundException in spite of working exports/imports? [message #59053 is a reply to message #58905] |
Tue, 31 January 2006 15:05 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: jeff_nospam_mcaffer.ca.ibm.com
Ben,
- the problem is happening in the startup of WicketTest. Does it refernece
the servlet stuff? Can you check the wiring of the WicketTest bundle using
bundle 8 (though it looks like it should be ok)?
- Does wicket us classloader? There were some posts on the net about using
wicket and OSGi. Perhaps google would reveal all
- the following line in the manifest you show does not work
Eclipse-LazyStart: http
It won't likely affect your case here but LazyStart is either true or false
and may have exceptions. See the doc for this function under its old name
Eclipse-AutoStart (we renamed it because the old name was bogus)
- can you post the config.ini that you are using?
Jeff
"Benjamin Podszun" <ben@galactic-tales.de> wrote in message
news:14009553.1138630155466.JavaMail.root@cp1.javalobby.org...
> Hi there.
> I'm currently trying to find out if equinox/wicket might be the greatest
thing on earth, only second to beer.
> Unfortunately I fail quite early..
>
> org.osgi.framework.BundleException: Exception in
de.darklajid.wickettest.impl.Activator.start() of bundle WicketTest.
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(Bu
ndleContextImpl.java:1013)
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleConte
xtImpl.java:969)
> at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.j
ava:316)
> at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle
..java:255)
> at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(Fra
meworkCommandProvider.java:232)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute
(FrameworkCommandInterpreter.java:145)
> at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(Framewor
kConsole.java:293)
> at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkC
onsole.java:278)
> at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConso
le.java:213)
> at java.lang.Thread.run(Thread.java:613)
> Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(Defau
ltClassLoader.java:370)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClass
Loader.java:233)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(Def
aultClassLoader.java:343)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(Default
ClassLoader.java:235)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(A
bstractClassLoader.java:183)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(Ecli
pseClassLoader.java:141)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:68)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:337)
> at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(Singl
eSourcePackage.java:37)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:377)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:350)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:78)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(Defau
ltClassLoader.java:370)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClass
Loader.java:233)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(Def
aultClassLoader.java:343)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(Default
ClassLoader.java:235)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(A
bstractClassLoader.java:183)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(Ecli
pseClassLoader.java:141)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:72)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:337)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:389)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:350)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:78)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
> at de.darklajid.wickettest.impl.Activator.start(Activator.java: 23)
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleConte
xtImpl.java:994)
> at java.security.AccessController.doPrivileged(Native Method)
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(Bu
ndleContextImpl.java:988)
> ... 13 more
> Nested Exception:
> java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(Defau
ltClassLoader.java:370)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClass
Loader.java:233)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(Def
aultClassLoader.java:343)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(Default
ClassLoader.java:235)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(A
bstractClassLoader.java:183)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(Ecli
pseClassLoader.java:141)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:68)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:337)
> at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(Singl
eSourcePackage.java:37)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:377)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:350)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:78)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(Defau
ltClassLoader.java:370)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClass
Loader.java:233)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(Def
aultClassLoader.java:343)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(Default
ClassLoader.java:235)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(A
bstractClassLoader.java:183)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(Ecli
pseClassLoader.java:141)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:72)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:337)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:389)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:350)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:78)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
> at de.darklajid.wickettest.impl.Activator.start(Activator.java: 23)
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleConte
xtImpl.java:994)
> at java.security.AccessController.doPrivileged(Native Method)
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(Bu
ndleContextImpl.java:988)
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleConte
xtImpl.java:969)
> at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.j
ava:316)
> at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle
..java:255)
> at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(Fra
meworkCommandProvider.java:232)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute
(FrameworkCommandInterpreter.java:145)
> at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(Framewor
kConsole.java:293)
> at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkC
onsole.java:278)
> at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConso
le.java:213)
> at java.lang.Thread.run(Thread.java:613)
> Nested Exception:
> java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(Defau
ltClassLoader.java:370)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClass
Loader.java:233)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(Def
aultClassLoader.java:343)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(Default
ClassLoader.java:235)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(A
bstractClassLoader.java:183)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(Ecli
pseClassLoader.java:141)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:68)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:337)
> at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage .loadClass(Singl
eSourcePackage.java:37)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:377)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:350)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:78)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.d efineClass(Defau
ltClassLoader.java:370)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClass
Loader.java:233)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClassImpl(Def
aultClassLoader.java:343)
> at
org.eclipse.osgi.framework.adaptor.core.DefaultClassLoader.f indClass(Default
ClassLoader.java:235)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. findLocalClass(A
bstractClassLoader.java:183)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.basicFin dLocalClass(Ecli
pseClassLoader.java:141)
> at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:72)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:337)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:389)
> at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:350)
> at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:78)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319 )
> at de.darklajid.wickettest.impl.Activator.start(Activator.java: 23)
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleConte
xtImpl.java:994)
> at java.security.AccessController.doPrivileged(Native Method)
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(Bu
ndleContextImpl.java:988)
> at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleConte
xtImpl.java:969)
> at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.j
ava:316)
> at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle
..java:255)
> at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(Fra
meworkCommandProvider.java:232)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute
(FrameworkCommandInterpreter.java:145)
> at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(Framewor
kConsole.java:293)
> at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkC
onsole.java:278)
> at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConso
le.java:213)
> at java.lang.Thread.run(Thread.java:613)
>
> Manifest of my bundle:
>
> anifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: WicketTest Plug-in
> Bundle-SymbolicName: WicketTest
> Bundle-Version: 1.0.0
> Bundle-Activator: de.darklajid.wickettest.impl.Activator
> Bundle-Localization: plugin
> Require-Bundle: org.eclipse.osgi,
> org.eclipse.osgi.services,
> org.eclipse.osgi.util
> Eclipse-LazyStart: http
> Import-Package: javax.servlet,
> javax.servlet.http,
> wicket,
> wicket.application,
> wicket.markup,
> wicket.markup.html,
> wicket.markup.html.basic,
> wicket.protocol.http
>
> My testbed currently:
>
> osgi> ss
>
> Framework is launched.
>
> id State Bundle
> 0 ACTIVE system.bundle_3.2.0.v20051212a
> 1 ACTIVE org.eclipse.osgi.services_3.1.100.v20051205
> 2 ACTIVE org.eclipse.osgi.util_3.1.100.v20051205
> 3 ACTIVE org.eclipse.equinox.log_1.0.0.200601280449
> 4 ACTIVE Servlet_1.0.0
> 5 ACTIVE Wicket_1.0.0
> 6 STARTING org.eclipse.equinox.http_1.0.0.200601281441
> 7 RESOLVED initial@file:lib/autodeploy.jar [7]
> 8 RESOLVED WicketTest_1.0.0
>
> The first 4 bundles should be obvious, they are stolen from my Eclipse
3.2M4 directory. 4 and 5 were created by me by using the New.. ->
Project.. -> Plug-In Development -> Plug-In from existing JAR archives way.
>
> That seems to work (read: does export the right thing), see:
> osgi> bundle 4
> initial@file:lib/servlet.jar [4]
> Id=4, Status=ACTIVE Data
Root=/Users/bpodszun/IdeaProjects/CPOS2/bin/configuration/or g.eclipse.osgi/b
undles/4/data No registered services.
> No services in use.
> Exported packages
> javax.servlet; specification-version="0.0.0"[exported]
> javax.servlet.http; specification-version="0.0.0"[exported]
> javax.servlet.jsp; specification-version="0.0.0"[exported]
> javax.servlet.jsp.el; specification-version="0.0.0"[exported]
> javax.servlet.jsp.resources; specification-version="0.0.0"[exported]
> javax.servlet.jsp.tagext; specification-version="0.0.0"[exported]
> javax.servlet.resources; specification-version="0.0.0"[exported]
> Imported packages
> javax.servlet;
specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
> javax.servlet.http;
specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
> javax.servlet.jsp;
specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
> javax.servlet.jsp.el;
specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
> javax.servlet.jsp.resources;
specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
> javax.servlet.jsp.tagext;
specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
> javax.servlet.resources;
specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
> No fragment bundles
> Named class space
> Servlet; bundle-version="1.0.0"[provided]
> No required bundles
>
> Bundle 6 is from the equinox bundle repository/CVS. It seems to be quite
happy with my servlet api library:
>
> osgi> bundle 6
> initial@file:lib/org.eclipse.equinox.http.jar [6]
> Id=6, Status=ACTIVE Data
Root=/Users/bpodszun/IdeaProjects/CPOS2/bin/configuration/or g.eclipse.osgi/b
undles/6/data Registered Services
> {org.osgi.service.http.HttpService}={http.port=8080,
service.pid=org.eclipse.equinox.http.HttpService-http, http.address=ALL,
service.vendor=IBM, service.description=OSGi Http Service - IBM
Implementation, http.scheme=http, http.timeout=30, service.id=22}
> {org.osgi.service.cm.ManagedService}={service.description=OS Gi Http
Service - IBM Implementation, service.pid=org.eclipse.equinox.http.Http,
service.vendor=IBM, service.id=23}
> {org.osgi.service.cm.ManagedServiceFactory}={service.descrip tion=OSGi
Http Service - IBM Implementation,
service.pid=org.eclipse.equinox.http.HttpFactory, service.vendor=IBM,
service.id=24}
> Services in use:
> {org.osgi.service.log.LogService}={service.description=OSGi Log
Service - IBM Implementation,
service.pid=org.eclipse.equinox.log.LogService, service.vendor=IBM,
service.id=19}
> Exported packages
> org.eclipse.equinox.http; specification-version="0.0.0"[exported]
> org.eclipse.equinox.http.servlet;
specification-version="0.0.0"[exported]
> org.eclipse.equinox.socket; specification-version="0.0.0"[exported]
> org.eclipse.equinox.socket.https;
specification-version="0.0.0"[exported]
> Imported packages
> org.osgi.framework; specification-version="1.3.0"<System Bundle [0]>
> org.osgi.util.tracker; specification-version="1.3.1"<System Bundle
[0]>
> org.eclipse.osgi.util; specification-version="1.0.0"<System Bundle
[0]>
> org.osgi.service.cm;
specification-version="1.2.0"<initial@file:lib/org.eclipse.osgi.services.jar
[1]>
> org.osgi.service.http;
specification-version="1.2.0"<initial@file:lib/org.eclipse.osgi.services.jar
[1]>
> org.osgi.service.log;
specification-version="1.3.0"<initial@file:lib/org.eclipse.osgi.services.jar
[1]>
> javax.servlet;
specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
> javax.servlet.http;
specification-version="0.0.0"<initial@file:lib/servlet.jar [4]>
> org.eclipse.equinox.http;
specification-version="0.0.0"<initial@file:lib/org.eclipse.equinox.http.jar
[6]>
> org.eclipse.equinox.http.servlet;
specification-version="0.0.0"<initial@file:lib/org.eclipse.equinox.http.jar
[6]>
> org.eclipse.equinox.socket;
specification-version="0.0.0"<initial@file:lib/org.eclipse.equinox.http.jar
[6]>
> org.eclipse.equinox.socket.https;
specification-version="0.0.0"<initial@file:lib/org.eclipse.equinox.http.jar
[6]>
> No fragment bundles
> Named class space
> org.eclipse.equinox.http;
bundle-version="1.0.0.200601281441"[provided]
> No required bundles
>
> Any ideas or obvious mistakes in my setup?
> Thanks in advance,
> Ben
|
|
|
Goto Forum:
Current Time: Fri Aug 16 20:37:23 GMT 2024
Powered by FUDForum. Page generated in 0.02935 seconds
|