ShEx Editor Plugin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ShEx Editor Plugin

Pablo Menéndez WESO Researcher
Hello!

I´ve developed a ShEx editor called YASHE (https://github.com/weso/YASHE)
and I am trying to incorporate it into protege by a plugin. As YASHE is
built in JavaScript I am using the JavaFX library to re-use YASHE code.


I am using the
protege-plugin-examples(https://github.com/protegeproject/protege-plugin-examples)
as a base project and the first problem appeared when I´ve tried to create a
JavaFX object. This was the error log:

/2020-02-10 16:42:33.562 [FelixStartLevel] ERROR FrameworkSlf4jLogger  
Error starting
file:/C:/Users/pablo/repositories/Protege-5.5.0/plugins/protege.plugin.examples-2.0.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Unable to resolve
protege.plugin.examples [29](R 29.0): missing requirement
[protege.plugin.examples [29](R 29.0)] osgi.wiring.package;
 (osgi.wiring.package=com.sun.javafx.application) Unresolved requirements:
[[protege.plugin.examples [29](R 29.0)] osgi.wiring.package;
(osgi.wiring.package=com.sun.javafx.application)]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
~[org.apache.felix.main.jar:na]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
~[org.apache.felix.main.jar:na]
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
~[org.apache.felix.main.jar:na]
        at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
[org.apache.felix.main.jar:na]/


I could solve it by adapting the Maven bundle plugin config using the
<Export-Package> and <Embed-Dependency> tags. (Here is my pom
https://github.com/weso/protegeShEx/blob/master/pom.xml)

After that I could load the plugin but there was another problem:

/ERROR  16:59:51  Uncaught Exception in thread 'AWT-EventQueue-0'
java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
        at edu.stanford.bmir.protege.examples.view.Metrics.<init>(Metrics.java:47)
~[na:na]
        at
edu.stanford.bmir.protege.examples.view.ExampleViewComponent.initialiseOWLView(ExampleViewComponent.java:18)
~[na:na]
        at
org.protege.editor.owl.ui.view.AbstractOWLViewComponent.initialise(AbstractOWLViewComponent.java:43)
~[na:na]
        at org.protege.editor.core.ui.view.View.createContent(View.java:413)
~[na:na]/

The only solution that I found was to add a frameworkPropertiy to the
Protege config.xml:
/<property name="org.osgi.framework.system.packages.extra"
value="javafx.embed.swing"/>/
And then everything started working.

*The point is*, how I could add that framework
property(org.osgi.framework.system.packages.extra) into my bundle plugin in
order not to modify Protege config.xml?

I really appreciate your help!
Pablo Menéndez,
WESO Researcher




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-Developer-f4659816.html
_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev
Reply | Threaded
Open this post in threaded view
|

Re: ShEx Editor Plugin

Josef Hardi
Hi Pablo,

I have posted a ticket about your problem.


I appreciate your exploration in this particular issue.

Best,
Josef

On Mar 2, 2020, at 9:13 AM, Pablo Menéndez WESO Researcher <[hidden email]> wrote:

Hello!

I´ve developed a ShEx editor called YASHE (https://github.com/weso/YASHE)
and I am trying to incorporate it into protege by a plugin. As YASHE is
built in JavaScript I am using the JavaFX library to re-use YASHE code.


I am using the
protege-plugin-examples(https://github.com/protegeproject/protege-plugin-examples)
as a base project and the first problem appeared when I´ve tried to create a
JavaFX object. This was the error log:

/2020-02-10 16:42:33.562 [FelixStartLevel] ERROR FrameworkSlf4jLogger   
Error starting
file:/C:/Users/pablo/repositories/Protege-5.5.0/plugins/protege.plugin.examples-2.0.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Unable to resolve
protege.plugin.examples [29](R 29.0): missing requirement
[protege.plugin.examples [29](R 29.0)] osgi.wiring.package;
(osgi.wiring.package=com.sun.javafx.application) Unresolved requirements:
[[protege.plugin.examples [29](R 29.0)] osgi.wiring.package;
(osgi.wiring.package=com.sun.javafx.application)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
~[org.apache.felix.main.jar:na]
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
[org.apache.felix.main.jar:na]/


I could solve it by adapting the Maven bundle plugin config using the
<Export-Package> and <Embed-Dependency> tags. (Here is my pom
https://github.com/weso/protegeShEx/blob/master/pom.xml)

After that I could load the plugin but there was another problem:

/ERROR  16:59:51  Uncaught Exception in thread 'AWT-EventQueue-0'
java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
at edu.stanford.bmir.protege.examples.view.Metrics.<init>(Metrics.java:47)
~[na:na]
at
edu.stanford.bmir.protege.examples.view.ExampleViewComponent.initialiseOWLView(ExampleViewComponent.java:18)
~[na:na]
at
org.protege.editor.owl.ui.view.AbstractOWLViewComponent.initialise(AbstractOWLViewComponent.java:43)
~[na:na]
at org.protege.editor.core.ui.view.View.createContent(View.java:413)
~[na:na]/

The only solution that I found was to add a frameworkPropertiy to the
Protege config.xml:
/<property name="org.osgi.framework.system.packages.extra"
value="javafx.embed.swing"/>/
And then everything started working.

*The point is*, how I could add that framework
property(org.osgi.framework.system.packages.extra) into my bundle plugin in
order not to modify Protege config.xml?

I really appreciate your help!
Pablo Menéndez,
WESO Researcher




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-Developer-f4659816.html
_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev


_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev
Reply | Threaded
Open this post in threaded view
|

Re: ShEx Editor Plugin

Pablo Menéndez WESO Researcher
Hi Josef,

Thanks for the support.

Best,
Pablo



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-Developer-f4659816.html
_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev