package
org.apache.jsp;
import
java.io.IOException;
import
javax.servlet.ServletException;
import
javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse;
import
org.apache.jasper.runtime.HttpJspBase;
public
class TestJsp extends HttpJspBase {
@Override
public void
_jspService(HttpServletRequest arg0, HttpServletResponse arg1)
throws ServletException, IOException {
arg1.getOutputStream().println(
"hello jsp");
arg1.getOutputStream().flush();
}
}
via the org.eclipse.equinox.servlet.ext registry extension points.
Usual servlets in the same bundle are no problem to load and register using the
plugin.xml.
However, having imported all jasper and javax.servlet packages
from other library bundles into the current bundle, still on instantiating the
servlet I get the stacktrace below. I'm running on Eclipse 3.2RC2 and with the
servlet.ext from CVS, plus some other jars exposing the different LIBs.
Any hints on this? I'm thinking this should be a normal servlet
after all, and for the others the javax.servlet.Servlet is found too? But I have
no experiences with jasper stuff.
Cheers
/peter
org.eclipse.core.runtime.CoreException
: Plug-in web.workbench was unable to load class
org.apache.jsp.TestJsp.
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(
RegistryStrategyOSGI.java:165)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(
RegistryStrategyOSGI.java:151)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(
ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(
ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(
ConfigurationElementHandle.java:51)
at
org.eclipse.equinox.servlet.ext.ServletManager.added(
ServletManager.java:72)
at
org.eclipse.equinox.servlet.ext.ExtensionPointTracker.open(
ExtensionPointTracker.java:66)
at
org.eclipse.equinox.servlet.ext.ServletManager.start(
ServletManager.java:51)
at
org.eclipse.equinox.servlet.ext.HttpServiceCustomizer.addingService(
HttpServiceCustomizer.java:43)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(
ServiceTracker.java:1011)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(
ServiceTracker.java:875)
at org.osgi.util.tracker.ServiceTracker.open(
ServiceTracker.java:282)
at org.osgi.util.tracker.ServiceTracker.open(
ServiceTracker.java:221)
at
org.eclipse.equinox.servlet.ext.ExtActivator.start(
ExtActivator.java:27)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(
BundleContextImpl.java:995)
at java.security.AccessController.doPrivileged(
Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(
BundleContextImpl.java:989)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(
BundleContextImpl.java:970)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(
BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(
AbstractBundle.java:329)
at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(
Framework.java:1037)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(
StartLevelManager.java:573)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(
StartLevelManager.java:495)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(
StartLevelManager.java:275)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(
StartLevelManager.java:455)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(
EventManager.java:189)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(
EventManager.java:291)
org.eclipse.core.runtime.CoreException[1]:
java.lang.NoClassDefFoundError: javax/servlet/Servlet
at java.lang.ClassLoader.defineClass1(
Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(
DefaultClassLoader.java:160)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(
ClasspathManager.java:491)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(
ClasspathManager.java:461)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(
ClasspathManager.java:420)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(
ClasspathManager.java:403)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(
DefaultClassLoader.java:188)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(
BundleLoader.java:339)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
BundleLoader.java:391)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
BundleLoader.java:352)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass1(
Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(
DefaultClassLoader.java:160)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(
ClasspathManager.java:491)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(
ClasspathManager.java:461)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(
ClasspathManager.java:420)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(
ClasspathManager.java:403)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(
DefaultClassLoader.java:188)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(
BundleLoader.java:339)
at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(
SingleSourcePackage.java:37)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
BundleLoader.java:379)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
BundleLoader.java:352)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass1(
Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(
DefaultClassLoader.java:160)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(
ClasspathManager.java:491)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(
ClasspathManager.java:461)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(
ClasspathManager.java:420)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(
ClasspathManager.java:403)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(
DefaultClassLoader.java:188)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(
BundleLoader.java:339)
at
org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(
SingleSourcePackage.java:37)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
BundleLoader.java:379)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
BundleLoader.java:352)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass1(
Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(
DefaultClassLoader.java:160)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(
ClasspathManager.java:491)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(
ClasspathManager.java:461)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(
ClasspathManager.java:420)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(
ClasspathManager.java:403)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(
DefaultClassLoader.java:188)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(
BundleLoader.java:339)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
BundleLoader.java:391)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(
BundleLoader.java:352)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(
BundleLoader.java:276)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(
BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(
AbstractBundle.java:1245)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(
RegistryStrategyOSGI.java:147)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(
ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(
ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(
ConfigurationElementHandle.java:51)
at
org.eclipse.equinox.servlet.ext.ServletManager.added(
ServletManager.java:72)
at
org.eclipse.equinox.servlet.ext.ExtensionPointTracker.open(
ExtensionPointTracker.java:66)
at
org.eclipse.equinox.servlet.ext.ServletManager.start(
ServletManager.java:51)
at
org.eclipse.equinox.servlet.ext.HttpServiceCustomizer.addingService(
HttpServiceCustomizer.java:43)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackAdding(
ServiceTracker.java:1011)
at
org.osgi.util.tracker.ServiceTracker$Tracked.trackInitialServices(
ServiceTracker.java:875)
at org.osgi.util.tracker.ServiceTracker.open(
ServiceTracker.java:282)
at org.osgi.util.tracker.ServiceTracker.open(
ServiceTracker.java:221)
at
org.eclipse.equinox.servlet.ext.ExtActivator.start(
ExtActivator.java:27)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(
BundleContextImpl.java:995)
at java.security.AccessController.doPrivileged(
Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(
BundleContextImpl.java:989)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(
BundleContextImpl.java:970)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(
BundleHost.java:317)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(
AbstractBundle.java:329)
at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(
Framework.java:1037)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(
StartLevelManager.java:573)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(
StartLevelManager.java:495)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(
StartLevelManager.java:275)
at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(
StartLevelManager.java:455)
at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(
EventManager.java:189)
at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(
EventManager.java:291)