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

Nah,
that is what I have been thinking, too, it seems it is that deep bug in Eclipse that Thomas was hinting at. Will try to use a IExtensioPointFactory instead to delay the instantiation of the servlet and see how that works. Hope to get back with results then.
/peter
On May 5, 2006, at 5:35 PM, Kaegi, Simon wrote:

Hi Peter,
 
It's hard without seeing the bundles you're using, but if I had to take a wild guess...
I think it might be that your Jasper bundle isn't importing the javax.servlet stuff.
 
-Simon
 


From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Peter Neubauer
Sent: Friday, May 05, 2006 8:00 AM
To: equinox-dev@xxxxxxxxxxx
Subject: [equinox-dev] Running a compiled JSP servlet via Servlet extensionpoints

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)

 
     This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you.
_______________________________________________
equinox-dev mailing list