Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Running a compiled JSP servlet via Servlet extension

Thomas, this looks exactly like the problem I have. Actually I have seen teh double load attempt. Any way to avoid this?

/peter
-----Original message-----
From: Thomas Watson tjwatson@xxxxxxxxxx
Date: Fri,  5 May 2006 15:26:49 +0200
To: Equinox development mailing list equinox-dev@xxxxxxxxxxx
Subject: Re: [equinox-dev] Running a compiled JSP servlet via Servlet extension
	points

> This may be a red herring but it looks like the the Activator for 
> org.eclipse.equinox.servlet.ext (ExtActivator.start) is calling 
> createExecutableExtension from the following portion of the stacktrace. 
> This has been known to cause classloading errors.  See bug 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=5875.
> 
> 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)
> 
> 
> Tom
> 
> 
> 
> 
> 
> "Peter Neubauer" <pnb@xxxxxxxxxxx> 
> Sent by: equinox-dev-bounces@xxxxxxxxxxx
> 05/05/2006 07:00 AM
> Please respond to
> Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
> 
> 
> To
> equinox-dev@xxxxxxxxxxx
> cc
> 
> Subject
> [equinox-dev] Running a compiled JSP servlet via Servlet extension points
> 
> 
> 
> 
> 
> 
> Hi,
> not sure this is the right forum but since I am using only equinox 
> incubator projects to get this running ...
>  
> Basically, I'm trying to register a basic JspServlet, like 
> 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)
> 
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> 
> 



Back to the top