Problem mit Synth Painter und OSGi (Equinox)

Status
Nicht offen für weitere Antworten.
D

DayWalker

Gast
Hallöchen,

ich habe mir ein kleines Equinox Bundle geschrieben welches das Design aus einer Synth XML Datei bezieht. In der Datei habe ich einen einfachen Painter definiert, welcher auf eine bestimmte Java Klasse verweist:

Code:
<object id="splitPanePainter" class="de.test.painters.SplitPanePainter"/>
    <style id="SplitPane">
        <painter idref="splitPanePainter"/>
        <color value="#AAAAAA" type="BACKGROUND"/>
        <insets top="0" left="0" bottom="0" right="0"/>
        <property key="SplitPane.size" type="integer" value="8"/>
    </style>
    <bind style="SplitPane" type="region" key="SplitPane"/>

Wenn ich das Plugin aus der Eclipse IDE starte, funktioniert alles wunderbar. Wenn ich das Equinox Framework extern mit
Code:
java -Declipse.ignoreApp=true -Dosgi.noShutdown=false -jar equin
ox.jar -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -
console
starte erhalte ich immer folgende Fehlermeldung:

Code:
java.text.ParseException: Error parsing: org.xml.sax.SAXException: ID splitPaneP
ainter has not been defined null
        at javax.swing.plaf.synth.SynthParser.parse(Unknown Source)

Gibt's da ne Lösung für?

Gruß

DayWalker
 
D

DayWalker

Gast
OK, bin weiter gekommen.

Es lag daran, dass ich in der Painterklasse ein Bild mit Hilfe der javax.imageio.ImageIO Klasse reinladen wollte und er die ImageIO Klasse nicht finden kann. Aber obwohl ich das Package "javax.imageio" bei "Import-Package:" in meiner Manifest Datei definiert habe, erhalte ich immer wieder eine "java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO" Exception.

Einer eine Idee warum das so ist?
 
D

DayWalker

Gast
Ich nutze:

Code:
java version "1.6.0_10-beta"
Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b13)
Java HotSpot(TM) Client VM (build 11.0-b11, mixed mode, sharing)

starten tue ich das Equinox auf diese Weise:

java -Declipse.ignoreApp=true -Dosgi.noShutdown=true -jar equinox.jar -console



Hier mal der komplette Stacktrace:

Code:
org.osgi.framework.BundleException: Exception in testplugin.Activator.start() of
 bundle TestPlugin.
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:1018)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Bund
leContextImpl.java:974)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundl
eHost.java:346)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:260)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:252)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._st
art(FrameworkCommandProvider.java:260)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.
execute(FrameworkCommandInterpreter.java:150)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(F
rameworkConsole.java:300)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(Fra
meworkConsole.java:285)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(Framewo
rkConsole.java:221)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class javax.imag
eio.ImageIO
        at testplugin.Activator.start(Activator.java:16)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Bund
leContextImpl.java:999)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:993)
        ... 14 more
Nested Exception:
java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO

        at testplugin.Activator.start(Activator.java:16)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Bund
leContextImpl.java:999)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:993)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Bund
leContextImpl.java:974)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundl
eHost.java:346)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:260)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:252)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._st
art(FrameworkCommandProvider.java:260)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.
execute(FrameworkCommandInterpreter.java:150)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(F
rameworkConsole.java:300)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(Fra
meworkConsole.java:285)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(Framewo
rkConsole.java:221)
        at java.lang.Thread.run(Unknown Source)
Nested Exception:
java.lang.NoClassDefFoundError: Could not initialize class javax.imageio.ImageIO

        at testplugin.Activator.start(Activator.java:16)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(Bund
leContextImpl.java:999)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActiv
ator(BundleContextImpl.java:993)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(Bund
leContextImpl.java:974)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(Bundl
eHost.java:346)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:260)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(Abstrac
tBundle.java:252)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._st
art(FrameworkCommandProvider.java:260)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.
execute(FrameworkCommandInterpreter.java:150)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(F
rameworkConsole.java:300)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(Fra
meworkConsole.java:285)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(Framewo
rkConsole.java:221)
        at java.lang.Thread.run(Unknown Source)

osgi> ss

Framework is launched.

id      State       Bundle
0       ACTIVE      org.eclipse.osgi_3.3.2.R33x_v20080105
2       RESOLVED    client_base_1.0.0
3       RESOLVED    TestPlugin_1.0.0

osgi> diag 3
file:plugins/TestPlugin_1.0.0.jar [3]
  No unresolved constraints.
 

Wildcard

Top Contributor
Ich werde versuchen dein PlugIn nach der Arbeit auszuprobieren, aber bis dahin:
ein Beta-Java ist vielleicht nicht die ideale Umgebung.
 
G

Guest

Gast
Wildcard hat gesagt.:
Ich werde versuchen dein PlugIn nach der Arbeit auszuprobieren, aber bis dahin:
ein Beta-Java ist vielleicht nicht die ideale Umgebung.

Ja, da hast du schon recht, aber ich habe es auch mal mit einer "Nichtbeta" probiert und erhalte leider den gleichen Fehler :(
 
D

DayWalker

Gast
Hi Wildcard, hast du den Quellcode ausprobieren können? Vielleicht gibt es da ein Problem mit dem ClassLoader?
 
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
K Problem bei Einbinden einer DLL in Java-Projekt Plattformprogrammierung 4
Wurstsemmel RCP SWT-Problem: Programm sucht Cocoa-Bibliothek unter Windows Plattformprogrammierung 6
Shams Antbuild - Problem bei OSGi Anfängertutorial Plattformprogrammierung 0
D Problem mit eclipse Plattformprogrammierung 2
J JNA Implimentierungs Problem Plattformprogrammierung 0
Shams Problem bei der Knopflerfischinstallation Plattformprogrammierung 2
J Charset-Problem nach Plugin-Export Plattformprogrammierung 1
TheWhiteShadow RCP Problem mit Plugin Interaktion Plattformprogrammierung 6
D Eclipse_Visual Editor Problem Plattformprogrammierung 2
J Eclipse Plug-In für UML-Diagramme Problem Plattformprogrammierung 4
O Eclipse Plugin - Einfachstes Problem, das es gibt. Plattformprogrammierung 2
dzim OSGi Problem beim Verwenden von Declaratice Services Plattformprogrammierung 18
T netbeans problem? Plattformprogrammierung 4
dzim RCP Problem mit MenuManager Plattformprogrammierung 3
H RCP Problem mit Extension Schema Plattformprogrammierung 10
R JFace Databinding Problem Plattformprogrammierung 5
F Ecilpse plugin und MWE Workflow: classpath Problem Plattformprogrammierung 12
W Wahrscheinlich triviales Problem, aber komm nicht weiter Plattformprogrammierung 7
K SelectionListener / SelectionProvider Problem Plattformprogrammierung 2
M Xpand Anfäger Problem Plattformprogrammierung 3
K Eclipse RCP, EMF, Hibernate Problem Plattformprogrammierung 7
dzim RCP Problem mit Umsetzen des Workspace unter Win Plattformprogrammierung 4
B PreferencesService Problem Plattformprogrammierung 2
K EMF/Teneo EMap Problem Plattformprogrammierung 6
K Problem mit EMF/Teneo, GregorianCalendar, Date, Hibernate Timestamp Plattformprogrammierung 6
L RCP TreeViewer Listener Problem Plattformprogrammierung 12
C target platform problem Plattformprogrammierung 2
K NoClassDefFoundError Problem Plattformprogrammierung 24
F Eclipse: Plug-In mit Ecoding Problem Plattformprogrammierung 7
O Problem mit relativen Pfaden in einem RCP-Plugin Plattformprogrammierung 5
dzim Problem beim neuanlegen von Composites Plattformprogrammierung 4
hdi Problem bei Eclipse Plugin Export Plattformprogrammierung 9
K Bild Problem in exportierter RCP Anwendung Plattformprogrammierung 5
M Problem beim Zugriff auf Klasse aus Fragment in einem anderen Plugin Plattformprogrammierung 3
G plugin.xml Problem Plattformprogrammierung 4
I SWT Popup-Menu Problem (Position) Plattformprogrammierung 4

Ähnliche Java Themen

Neue Themen


Oben