Issue
I have a nice new Apple M1 machine. I was quite happy to toddle along with Java 8, but Eclipse wanted Java 11 so I have updated to Java 11.
The problem with Spring roo originated in Eclipse SpringToolSuite4, where I tried and failed to start the roo shell. However I've since worked out that the problem is not in the SpringToolSuite installation, but with roo itself.
I would be perfectly happy to work with roo outside of Eclipse/STS.
So I tried launching ./roo.sh
from the command line, and I got a massive trail of errors, some of which I include here below.
Anybody got any ideas on what's happening? Launching Spring roo from the shell continues to work perfectly normally on my old mac.
This happens both with spring-roo-1.3.2.RC1
and with spring-roo-2.0.0.M1
.
Looking at the default.properties in the felix .jar provided with roo I notice that arm
processors don't have an alias, could that mean anything?
# Native Processor Aliases. Format is felix.native.processor.alias.<normalized Processor Name>=alias1,alias2
felix.native.processor.alias.68k=
felix.native.processor.alias.arm=
felix.native.processor.alias.arm_le=
felix.native.processor.alias.arm_be=
felix.native.processor.alias.alpha=
felix.native.processor.alias.ignite=psc1k
felix.native.processor.alias.mips=
felix.native.processor.alias.parisc=
felix.native.processor.alias.powerpc=power,ppc
felix.native.processor.alias.x86=pentium,i386,i486,i586,i686
felix.native.processor.alias.x86-64=amd64,em64t,x86_64
felix.native.processor.alias.sparc=
The errors all seem to pass through Felix at this line:
org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002)
malcolm@MacBook-Pro-2 bin % ./roo.sh WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.felix.framework.util.SecureAction (file:/Users/malcolm/springRoo/spring-roo-1.3.2.RC1/bin/org.apache.felix.framework-4.4.1.jar) to method java.net.URLClassLoader.addURL(java.net.URL) WARNING: Please consider reporting this to the maintainers of org.apache.felix.framework.util.SecureAction WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release ERROR: Bundle com.github.antlrjavaparser.antlr-java-parser [3] Error starting file:/Users/malcolm/springRoo/spring-roo-1.3.2.RC1/bundle/antlr-java-parser-1.0.15.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle com.github.antlrjavaparser.antlr-java-parser [3]: Unable to resolve 3.0: missing requirement [3.0] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime) [caused by: Unable to resolve 78.0: missing requirement [78.0] osgi.wiring.package; (osgi.wiring.package=javax.annotation.processing)]) org.osgi.framework.BundleException: Unresolved constraint in bundle com.github.antlrjavaparser.antlr-java-parser [3]: Unable to resolve 3.0: missing requirement [3.0] osgi.wiring.package; (osgi.wiring.package=org.antlr.v4.runtime) [caused by: Unable to resolve 78.0: missing requirement [78.0] osgi.wiring.package; (osgi.wiring.package=javax.annotation.processing)] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002) at org.apache.felix.framework.Felix.startBundle(Felix.java:2045) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) at java.base/java.lang.Thread.run(Thread.java:829) ERROR: Bundle org.objectweb.asm.all [8] Error starting file:/Users/malcolm/springRoo/spring-roo-1.3.2.RC1/bundle/asm-all-5.0.2.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.objectweb.asm.all [8]: Unable to resolve 8.0: missing requirement [8.0] osgi.ee; (&(osgi.ee=JavaSE)(version=1.3.0))) org.osgi.framework.BundleException: Unresolved constraint in bundle org.objectweb.asm.all [8]: Unable to resolve 8.0: missing requirement [8.0] osgi.ee; (&(osgi.ee=JavaSE)(version=1.3.0)) at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002) at org.apache.felix.framework.Felix.startBundle(Felix.java:2045) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) at java.base/java.lang.Thread.run(Thread.java:829) ERROR: Bundle org.springframework.roo.addon.backup [22] Error starting file:/Users/malcolm/springRoo/spring-roo-1.3.2.RC1/bundle/org.springframework.roo.addon.backup-1.3.2.RC1.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.addon.backup [22]: Unable to resolve 22.0: missing requirement [22.0] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.roo.process.manager)(version>=1.3.0)(!(version>=2.0.0))) [caused by: Unable to resolve 66.0: missing requirement [66.0] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.roo.file.monitor)(version>=1.3.0)(!(version>=2.0.0))) [caused by: Unable to resolve 60.0: missing requirement [60.0] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.roo.support.util)(version>=1.3.0)(!(version>=2.0.0))) [caused by: Unable to resolve 73.0: missing requirement [73.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.namespace)]]]) org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.addon.backup [22]: Unable to resolve 22.0: missing requirement [22.0] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.roo.process.manager)(version>=1.3.0)(!(version>=2.0.0))) [caused by: Unable to resolve 66.0: missing requirement [66.0] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.roo.file.monitor)(version>=1.3.0)(!(version>=2.0.0))) [caused by: Unable to resolve 60.0: missing requirement [60.0] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.roo.support.util)(version>=1.3.0)(!(version>=2.0.0))) [caused by: Unable to resolve 73.0: missing requirement [73.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.namespace)]]] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002) at org.apache.felix.framework.Felix.startBundle(Felix.java:2045) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) at java.base/java.lang.Thread.run(Thread.java:829) ERROR: Bundle org.springframework.roo.addon.cloud [23] Error starting file:/Users/malcolm/springRoo/spring-roo-1.3.2.RC1/bundle/org.springframework.roo.addon.cloud-1.3.2.RC1.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.addon.cloud [23]: Unable to resolve 23.0: missing requirement [23.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.parsers)) org.osgi.framework.BundleException: Unresolved constraint in bundle org.springframework.roo.addon.cloud [23]: Unable to resolve 23.0: missing requirement [23.0] osgi.wiring.package; (osgi.wiring.package=javax.xml.parsers) at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4002) at org.apache.felix.framework.Felix.startBundle(Felix.java:2045) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1299) at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304) at java.base/java.lang.Thread.run(Thread.java:829)
Solution
Unfortunately there's only one possible answer to this question since roo is no longer going to be supported.
The roo project from the very beginning was conceived to allow you to remove it, along with all the aspectj .aj files, leaving you with normal, working .java files. Which is really neat, like the whole project was.
Just right click the project (cleaning it first if you get any error messages) choose Refactor > Push In.. and confirm.
Which leaves me with perfectly working code, so I'm happy.
Thanks to the guys who conceived and worked on Spring Roo, it was brilliant. It made Hibernate so easy, and the user interface was world class.
Answered By - mwarren
Answer Checked By - Katrina (JavaFixing Volunteer)