5

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.

Qiu
  • 5,651
  • 10
  • 49
  • 56
kravi
  • 747
  • 1
  • 8
  • 13

4 Answers4

14

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.

Victor Mataré
  • 2,446
  • 2
  • 16
  • 20
2

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.

1

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.

Atanu Roy
  • 1,384
  • 2
  • 17
  • 29
0

I resolved the issue by correcting path entry into environment variables. When I installed jdk1.8.0_45, it has added path entry of environment variable like "C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Java\jre8\;C:\Program Files\Java\jre8\bin". Therefore I renamed the location of JRE according to this path setting. I removed "C:\Program Data\Oracle\Java\javapath" from path variable, which contains three symbolic links to java.exe, javaw.exe and javaws.exe. Due to renaming JRE location, these links were not valid.Moreover I have specified JAVA_HOME to jdk location.

kravi
  • 747
  • 1
  • 8
  • 13