Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run Spring Roo shell - "Unable to resolve .. missing requirement .. package=javax.xml..."

I tried setting up Spring Roo from Spring's guide, but I get the error below. I suspect it is related to a Java 8 compatibility, outlined by this bug, but I am blocked on how to proceed with fixing this issue.

Here is an example of my error:

ERROR: Bundle com.github.antlrjavaparser.antlr-java-parser [3] Error starting file:/home/luca        at java.lang.Thread.run(Thread.java:745)
org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.support.osgi [70]: Unable to resolve 70.0: missing requirement [70.0] package; (&(package=org.springframework.roo.support.ant)(version>=1.2.0)(!(version>=2.0.0))) [caused by: Unable to resolve 69.0: missing requirement [69.0] package; (package=javax.xml.namespace)]
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1797)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
        at java.lang.Thread.run(Thread.java:745)
org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.uaa [71]: Unable to resolve 71.0: missing requirement [71.0] package; (&(package=org.springframework.roo.shell)(version>=1.2.0)(!(version>=2.0.0))) [caused by: Unable to resolve 64.0: missing requirement [64.0] package; (package=javax.xml.parsers)]
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1797)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
        at java.lang.Thread.run(Thread.java:745)
org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.url.stream.jdk [73]: Unable to resolve 73.0: missing requirement [73.0] package; (&(package=org.springframework.roo.shell)(version>=1.2.0)(!(version>=2.0.0))) [caused by: Unable to resolve 64.0: missing requirement [64.0] package; (package=javax.xml.parsers)]
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1797)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
        at java.lang.Thread.run(Thread.java:745)
org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.wrapping.antlr4-runtime [74]: Unable to resolve 74.0: missing requirement [74.0] package; (package=javax.imageio)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1797)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
        at java.lang.Thread.run(Thread.java:745)
org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.wrapping.bcprov-jdk15 [76]: Unable to resolve 76.0: missing requirement [76.0] package; (package=javax.crypto)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1797)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
        at java.lang.Thread.run(Thread.java:745)
org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.uaa.client [81]: Unable to resolve 81.0: missing requirement [81.0] package; (package=javax.xml.parsers)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3564)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1797)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
        at java.lang.Thread.run(Thread.java:745)
:

Also, I am using Java 8:

[lucas-ThinkPad-W520]/home/lucas$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

Here is my Maven version:

[lucas-ThinkPad-W520]/home/.../springsource/spring-roo-1.2.5.RELEASE$ mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_20, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-35-generic", arch: "amd64", family: "unix"

I am running Ubuntu 14.04 if it matters. Any suggestions about how to proceed would be helpful. Also, I would prefer to stay with Java 8 if possible.

like image 294
modulitos Avatar asked Dec 15 '22 20:12

modulitos


1 Answers

Hopefully this helps someone, but I finally got it - the details were in a forum linked on the bug report page: http://forum.spring.io/forum/spring-projects/roo/106193-error-staring-the-roo-shell

I downloaded the Apache Felix Framework Distribution here and from the felix distribution, I moved the file bin/felix.jar into spring-roo.1.2.5.RELEASE/bin. After that, everything works!

Hopefully this helps somebody!

like image 178
modulitos Avatar answered Dec 17 '22 08:12

modulitos