XML parsing issue

44 views
Skip to first unread message

Borislav Iordanov

unread,
Sep 22, 2014, 1:20:00 AM9/22/14
to felix-ecli...@googlegroups.com
Hi,

The plugin is great and it seems like the solution to week-long headache as I've been trying to run an OSGI based desktop application (the Protege OWL editor version 4.3) inside eclipse so that I can debug my plugin for that application. Protege uses felix and a hand-written launcher to scan directories for plugins and load them. In Eclipse however, I'd like to startup without that launcher because I want Eclipse to recognize my OSGI plugin as a plugin that I'm trying to debug so I don't have to build and deploy manually separately after every code change.

So, I've created a "target platform" in Eclipse that only contains Protege's bundles/plugins. Then using Equinox, I can startup OSGI and get an osgi prompt but the main JFrame of the app doesn't show and I have no idea way...all plugins are active and the plugin that's supposed to create the window has this in its activator start method:

     context.addFrameworkListener(new FrameworkListener() {
    @Override
    public void frameworkEvent(FrameworkEvent event) {
    if (event.getType() == FrameworkEvent.STARTED) {
    reallyStart(context);
    }

    }
    });

Ok, enough context. Switching from Equinox to Felix, after installing the Felix Eclipse plugin, the above listener actually gets called but then I get a dialog with:

Error 1 Logged at Mon Sep 22 01:17:33 EDT 2014
RuntimeException: No editor kit factory plugins available
    org.protege.editor.core.ProtegeApplication.createAndSetupDefaultEditorKit(ProtegeApplication.java:418)
    org.protege.editor.core.ProtegeApplication.startApplication(ProtegeApplication.java:381)
    org.protege.editor.core.ProtegeApplication.reallyStart(ProtegeApplication.java:135)

And that exception seem due to the following from the console:

osgi> Error:  Could not parse XML contribution for "org.coode.dlquery//plugin.xml". Any contributed extensions and extension points will be ignored.
Error:  Could not parse XML contribution for "org.coode.owlviz//plugin.xml". Any contributed extensions and extension points will be ignored.
Error:  Could not parse XML contribution for "org.eclipse.equinox.registry//plugin.xml". Any contributed extensions and extension points will be ignored.
Error:  Could not parse XML contribution for "org.protege.editor.core.application//plugin.xml". Any contributed extensions and extension points will be ignored.
Error:  Could not parse XML contribution for "org.protege.editor.owl//plugin.xml". Any contributed extensions and extension points will be ignored.
log4j:WARN No appenders could be found for logger (org.protege.editor.core.ProtegeApplication).
log4j:WARN Please initialize the log4j system properly.
Sep 22, 2014 1:17:33 AM org.protege.editor.core.plugin.PluginExtensionFilter getExtensions
WARNING: Extension point not defined: EditorKi...@org.protege.editor.core.application
Sep 22, 2014 1:17:33 AM org.protege.editor.core.plugin.PluginExtensionFilter getExtensions
WARNING: Extension point not defined: OntologyRepo...@org.protege.editor.core.application


So bottom line, in this setup the plugin.xml resources inside the plugins are not being parsed. And that's what I'm seeking help about. Any idea why that parsing could be failing? What can I try to troubleshoot?

Thanks a lot. I'm kind of a newbie with OSGI so I might have given too much irrelevant info here, but I figure better more info than less in this case.

Cheers,
Boris

Christopher Armstrong

unread,
Sep 22, 2014, 1:25:04 AM9/22/14
to felix-ecli...@googlegroups.com

Hi Boris

At a first glance,  this doesn't appear to be a felix-eclipse issue.  If the framework you're using requires a custom launcher,  I think you're stuck with that, as it could be doing something that isn't strictly OSGi compatible.

Cheers
Chris

--
You received this message because you are subscribed to the Google Groups "felix-eclipse-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to felix-eclipse-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Borislav Iordanov

unread,
Sep 22, 2014, 1:53:51 AM9/22/14
to felix-ecli...@googlegroups.com
Hi,

Thanks for the quick reply. You may be right, I don't have enough experience to be super confident about this, but I did read through the launcher code carefully and I believe it's there merely to allow for a more flexible gathering of all the plugins to be loaded (looks into a bunch of directories listed in a config file, including user home directory etc.), but then it just asks the framework to load and activate the plugins it finds:


The crucial fact here I guess is the difference between running in Equinox and Felix: in Equinox I get osgi>, alls plugins cleanly in active state, but no attempt to actually startup the UI of the app (presumably because of the missing event I showed in my previous email), while in Felix I get this parsing error. I could imagine some XML parser is missing or wrong version is loaded, so some dependency is not being resolved right, dunno. But if none of that rings a bell, then ok, it probably doesn't have to do with the felix plugin. 

Thanks much anyway!
Boris
WARNING: Extension point not defined: OntologyRepositoryFactory@org.protege.editor.core.application


So bottom line, in this setup the plugin.xml resources inside the plugins are not being parsed. And that's what I'm seeking help about. Any idea why that parsing could be failing? What can I try to troubleshoot?

Thanks a lot. I'm kind of a newbie with OSGI so I might have given too much irrelevant info here, but I figure better more info than less in this case.

Cheers,
Boris

--
You received this message because you are subscribed to the Google Groups "felix-eclipse-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to felix-eclipse-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages