Communication between views

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

Communication between views

Denes Nagy

Hi,
I am developing a Protege plugin where I need to implement a communication channel between views (exchanging some settings parameters). For this I am using the EventAdmin service to establish the communication channel.
While the plugin compiles without an error, when importing into protege the plugin is not loaded and I get the following error in the log file:

2018-09-02 17:13:42.101 [FelixStartLevel] ERROR FrameworkSlf4jLogger    Error starting file:/Applications/Protégé.app/Contents/Java/plugins/EventSender-1.0.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Unresolved constraint in bundle EventSender [28]: Unable to resolve 28.0: missing requirement [28.0] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.event)(version>=1.4.0))
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002) ~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2045) ~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299) ~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) [org.apache.felix.main.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]

I set up my base plugin using this as an example.
According to the log org.osgi.service.event is missing, however it is imported into the pom.xml as a dependency.

<dependency>
  <groupId>org.osgi</groupId>. 
  <artifactId>org.osgi.service.event</artifactId>
  <version>1.4.0</version>
</dependency>

I tried to modify the pom.xml according to this thread by adding the tag to my pom, but the issue persists.

Could you help me what am I missing?
Is EventAdmin the preferred way of implementing communication between protege plugins (If not, could you point me to an example)?

Thank you for your help!
Denes

Dénes Ákos Nagy

Antal Bejczy Center for Intelligent Robotics
Óbuda University, Budapes, Hungary

[hidden email]


_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev

CommunicationExample.zip (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Communication between views

Denes Nagy
The attachment "CommunicationExample.zip" is the bare bones code I am using.

Dr. Dénes Ákos Nagy

Antal Bejczy Center for Intelligent Robotics
Óbuda University, Budapes, Hungary


On Sun, Sep 2, 2018 at 5:58 PM Denes Nagy <[hidden email]> wrote:

Hi,
I am developing a Protege plugin where I need to implement a communication channel between views (exchanging some settings parameters). For this I am using the EventAdmin service to establish the communication channel.
While the plugin compiles without an error, when importing into protege the plugin is not loaded and I get the following error in the log file:

2018-09-02 17:13:42.101 [FelixStartLevel] ERROR FrameworkSlf4jLogger    Error starting file:/Applications/Protégé.app/Contents/Java/plugins/EventSender-1.0.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Unresolved constraint in bundle EventSender [28]: Unable to resolve 28.0: missing requirement [28.0] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.event)(version>=1.4.0))
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002) ~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2045) ~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299) ~[org.apache.felix.main.jar:na]
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) [org.apache.felix.main.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]

I set up my base plugin using this as an example.
According to the log org.osgi.service.event is missing, however it is imported into the pom.xml as a dependency.

<dependency>
  <groupId>org.osgi</groupId>. 
  <artifactId>org.osgi.service.event</artifactId>
  <version>1.4.0</version>
</dependency>

I tried to modify the pom.xml according to this thread by adding the tag to my pom, but the issue persists.

Could you help me what am I missing?
Is EventAdmin the preferred way of implementing communication between protege plugins (If not, could you point me to an example)?

Thank you for your help!
Denes

Dénes Ákos Nagy

Antal Bejczy Center for Intelligent Robotics
Óbuda University, Budapes, Hungary

[hidden email]


_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev