OSGi Equinox HttpService only supports servlet 2.1 specification.

E

Eric Bovic

Gast
Hallo zusammen

ich versuche ein vaadinAddon (dontpus-ozonelayer) in Equinox zu verwenden.

im BundleActivator wir das Servlet beim HttpService registriert, was zum Fehler führt.

Java:
Hashtable<String, String> param = new Hashtable<String, String>();
param.put("description", "Vaadin application class to start");
param.put("application", "myapp.DontpushApplication");

ServiceReference sRef = context.getServiceReference(HttpService.class.getName());
if (sRef != null) {
     HttpService service = (HttpService) context.getService(sRef);
     service.registerServlet("/*", new DontPushOzoneServlet(), param, null);
}

Die Fehlermeldung lautet:

java.lang.UnsupportedOperationException: HttpService only supports servlet 2.1 specification.
at org.eclipse.equinox.http.servlet.ServletContextImpl.getInitParameterNames(ServletContextImpl.java:422)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.init(AbstractApplicationServlet.java:228)
at com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:54)
at org.vaadin.dontpush.server.DontPushOzoneServlet.init(DontPushOzoneServlet.java:55)
at org.eclipse.equinox.http.HttpListener.registerServlet(HttpListener.java:333)
at org.eclipse.equinox.http.HttpService.registerServlet(HttpService.java:54)
at mynewchatapp.ChatActivator.start(ChatActivator.java:45)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:291)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:333)
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:209)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:155)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.runConsole(FrameworkConsole.java:140)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:104)
at java.lang.Thread.run(Thread.java:662)

Der HttpService ist von org.eclipse.equinox.http_1.0.500.v20110413.jar

Hat jemand eine Idee, welche HttpServie Implementierung von Equinox nicht die 2.1 API benötigt?
Oder wie das Problem sontst gelöst werden kann.
Bzw. weiß jemand generell was bie diesem Fehler zu tun ist (im OSGi / Equinux umfeld)

Vielen Dank bin für jede Idee / Antwort dankbar
 

DerFeivel

Bekanntes Mitglied
java.lang.UnsupportedOperationException: HttpService only supports servlet 2.1 specification.

Heisst, dass die HttpService-Implementierung nur die Servlet-Spezifikation 2.1 unterstützt.


Meine Vermutung (ungetestet da gerade auf Arbeit):

Ergo benötigtst du entweder eine HttpService-Implementierung, welche die Servlet-Spec des new DontPushOzoneServlet() unterstützt

oder

eine Version des DontPushOzoneServlets welche gegen die Servlet-Spec 2.1 implementiert ist.
 
E

Eric Bovic

Gast
Hi,

danke für den Tipp. So eine Vermutung habe ich auch. Aber welche HttpService-Implementierung wäre das. Bei equinox kann ich nur diese finden
org.eclipse.equinox.http_1.0.500.v20110413.jar
GIbts irgendwo eine neuere?

eine Version des DontPushOzoneServlets welche gegen die Servlet-Spec 2.1 implementiert ist
Das wird es nicht geben, dazu ist DontPushOzoneServlets zu neu bzw. Servlet-Spec 2.1 viel zu alt.
Aber es muss doch von equinox eine Implementierung geben welche gegen Servlet-Spec 2.4 oder höher geht?
Besten Dank
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
Z MySQL-Treiber in RAP-Anwendung für Jetty im OSGI- Equinox- Maven-Dschungel Plattformprogrammierung 0
S (OSGI - EQUINOX) Welche Eclipse IDE? Plattformprogrammierung 3
B equinox OSGi EclipseStarter.startup NullPointerException Plattformprogrammierung 3
B OSGi, Equinox, Exceptions werden "ignoriert" Plattformprogrammierung 21
D Problem mit Synth Painter und OSGi (Equinox) Plattformprogrammierung 8
F OSGi und root rechte Plattformprogrammierung 2
Shams Antbuild - Problem bei OSGi Anfängertutorial Plattformprogrammierung 0
T OSGi OSGI bundle bauen org.apache.xerces Plattformprogrammierung 3
G OSGi Bundle-ClassPath Plattformprogrammierung 3
P OSGi registerService Plattformprogrammierung 3
H OSGi OSGi + Logback + slf4j - Eclipse Run Configuration Plattformprogrammierung 7
G OSGI bundleChanged Plattformprogrammierung 2
X Probleme mit dem OSGi-Framework Plattformprogrammierung 3
S OSGi Declarative Service Cardinality Plattformprogrammierung 6
Kr0e OSGI - Anfängerfragen Plattformprogrammierung 3
K OSGi Verteilte Anwendung? Plattformprogrammierung 9
B OSGi Einsteiger OSGi-Applikation Plattformprogrammierung 9
N OSGi: Ressourcen gezielt aus bestimmten Modulen laden? Plattformprogrammierung 4
borobudur OSGi OSGi Blueprint Integrationstests Plattformprogrammierung 6
S OSGi Filter Syntax Plattformprogrammierung 2
N OSGi Dependency Loading Plattformprogrammierung 2
S OSGi Bibliothek für alle Plattformprogrammierung 5
H OSGI mit Eclipse und Maven Plattformprogrammierung 5
X OSGi Splash ohne product Plattformprogrammierung 2
G OSGi: Service registrieren Plattformprogrammierung 2
lumo OSGI Service - ServiceReference Plattformprogrammierung 3
G [osgi] bundle spezifische properties Plattformprogrammierung 5
DEvent [osgi] Services implementieren Plattformprogrammierung 2
C RCP Applikation starten als OSGi Bundle Plattformprogrammierung 2
B OSGi, Euqinox, innherhalb vom Bundle Pfad des zugehörigen jar-files ermitteln Plattformprogrammierung 6
C OSGi, Hibernate und welche Datenbank? Plattformprogrammierung 4
astralarse Custom OSGi Launcher mit config.ini Plattformprogrammierung 6
C Eclipse - Externe OSGi bundles adden Plattformprogrammierung 7
F OSGi Anwendungsdesign Plattformprogrammierung 3
N OSGI in Netbeans? Plattformprogrammierung 5
X OSGi und RCP Plattformprogrammierung 15
C OSGi shutdown Plattformprogrammierung 4
D OSGi JSR296 (Swing Application Framework) - Konzeptionsfrage Plattformprogrammierung 2
G Osgi Plattformprogrammierung 5
A Plugin konzepte: OSGI oder JPF? Plattformprogrammierung 5
S OSGI Framework Knopflerfish Plattformprogrammierung 11
S RCP Equinox launcher error bei RCP-Start Plattformprogrammierung 2
C RCP Verständnisfrage Eclipse/Equinox Plattformprogrammierung 4
S Equinox: plugins und features Plattformprogrammierung 8
W GWT in Equinox Plattformprogrammierung 3
B How to use CommandInterpreter.execute - Equinox Plattformprogrammierung 2
G Equinox Dependencies Plattformprogrammierung 3
byte Equinox - Klasse aus Plug-In wird nicht gefunden Plattformprogrammierung 3
X Equinox und javax Plattformprogrammierung 9

Ähnliche Java Themen

Neue Themen


Oben