Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open Protege 4.3 after installing jdk1.8.0_45?

On windows 7 64 bit, I installed protege-4.3.0-304, which I downloaded along with jvm from here. And It was working fine.

But once I updated jvm with jdk1.8.0_45, I am not able to open protege. It is giving following error:

G:\protege-4.3.0-304\Protege_4.2>java -server - Dlog4j.configuration=file:log4j.xml -DentityExpansionLimit=100000000 -Dfile.encoding=utf-8 -Dorg.protege.plugin.dir=plugins -classpath bin/felix.jar;bin/ProtegeLauncher.jar org.protege.osgi.framework.Launcher
ERROR: Bundle org.protege.common 1 Error starting file:/G:/protege-4.3.0-304/Protege_4.2/bundles/org.protege.common.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle org.protege.common 1: Unable to resolve 1.0: missing requirement [1.0] osgi.wiring.package; (&(osgi.wiring.package=org.w3c.dom)(version>=0.0.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle org.protege.common 1: Unable to resolve 1.0: missing requirement [1.0] osgi.wiring.package; (&(osgi.wiring.package=org.w3c.dom)(version>=0.0.0))

Please somebody help me out. Thanks in advance.

like image 474
kravi Avatar asked May 22 '15 03:05

kravi


3 Answers

Just to document this for myself and possibly anyone else:

Downgrading Java is NOT required. You only need to replace bin/felix.jar with a current version from felix.apache.org.

like image 61
Victor Mataré Avatar answered Oct 04 '22 02:10

Victor Mataré


I had a similar issue when I installed Oracle Java 8 JRE/JDK on my Linux Mint 17 machine. Protege 4.3.0-304 doesn't seem to work with Java 8. I get a bunch of error messages when I try to run Protege with Java 8 as JVM. I found a workaround to fix this issue. The workaround is to force Protege to use a Java 7 JRE when it starts running. To do this, it's simple. I simply modified the Protege launcher script run.sh so that it uses the java executable of a Java 7 JRE.

run.sh before modifications :

#!/bin/sh

cd `dirname $0`

java -Xmx500M -Xms250M \
     -server \
     -Dlog4j.configuration=file:log4j.xml \
     -DentityExpansionLimit=100000000 \
     -Dfile.encoding=UTF-8 \
     -classpath bin/felix.jar:bin/ProtegeLauncher.jar \
     org.protege.osgi.framework.Launcher

In my case, I changed java to /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java and I added the line export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 at the beginning. It could be different for you depending on your current configuration.

run.sh after modifications :

#!/bin/sh

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64

cd `dirname $0`

/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -Xmx500M -Xms250M \
     -server \
     -Dlog4j.configuration=file:log4j.xml \
     -DentityExpansionLimit=100000000 \
     -Dfile.encoding=UTF-8 \
     -classpath bin/felix.jar:bin/ProtegeLauncher.jar \
     org.protege.osgi.framework.Launcher

If you don't have OpenJDK 7 already installed, you could install it via your distro repos (this could change the default JVM back to Java 7 after installing. Correct this with sudo update-alternatives --config java) or you could try to use the Oracle Java 7 JRE and put the jre1.7.0_80 folder somewhere so the Protege launcher script can use the java executable inside it. I don't know about the Protege launcher executable on Windows, but I guess it's something similar and this solution could work for Windows too.

like image 29
Yannick Drolet Avatar answered Oct 04 '22 04:10

Yannick Drolet


I had the same Problem with my Windows 8, java 8. the problem has been resolved by changing the filix.jar file, in G:\Program Files\Protege_4.3\bin", By a new one copied from a protége 5.0 directory. it should be noted that the file filix.jar is named "org.apache.felix.main.jar" in version 5, you can only rename it and it work correctly.

like image 37
Fayçal Haniche Avatar answered Oct 04 '22 04:10

Fayçal Haniche