Closed nrfulton closed 4 years ago
Regarding the reflection thing:
WARNING: Illegal reflective access by sbt.ivyint.ErrorMessageAuthenticator$ (file:/<redacted>/.sbt/boot/scala-2.10.4/org.scala-sbt/sbt/0.13.6/ivy-0.13.6.jar) to field java.net.Authenticator.theAuthenticator
WARNING: Please consider reporting this to the maintainers of sbt.ivyint.ErrorMessageAuthenticator$
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
These warnings are a result of upgrading to newer java versions, not of upgrading sbt/scala versions.
Note: On Mac, he best work-around is to install an alternative version of the JVM and then select 1.8
using jenv
. See https://stackoverflow.com/a/29195815
If you get an error like:
java.lang.RuntimeException: /pageackagfes cannot be represented as URI
you should double check if you use OpenJDK. In that case, switching to Oracle Java 8 (and adding it to jenv) should fix the issue.
We're just in the process of making KeYmaera X play along more nicely with different JDKs and operating system configurations etc, of which there are always what seems like infinitely many. So thanks for reporting something like that. Can you clarify what the symptom and problem is in your case and whether there's a systematic counteraction?
Install java 8 on a new mac with no previous java version installed:
brew tap adoptopenjdk/openjdk &&
brew cask install adoptopenjdk8 &&
brew install scala &&
brew install sbt
If you then attempt to sbt compile
, you'll get an error:
[error] java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI
Installing Oracle Java 8 instead of OpenJDK Java 8 fixes the issue:
jenv
jenv add /path/to/oracle/java/8
jenv shell oracle_java_8_version_string
(you can find the version string by running jenv versions
)Confusingly, OpenJDK works just fine on Ubuntu with identical Scala and SBT versions. Unfortunately, all I can do is describe the symptoms and the work-around. Not really sure what's going on here.
@saramagliacane might remember additional details I'm leaving out.
The ultimate fix is to eventually upgrade to SBT 1.0.0, which should be done regardless because 0.13.6 is quite old.
I tried to perform this update but ran into some issues.
Unfortunately, upgrading to a more recent SBT release will require updating the versions of the plugins. Updating the plugins -- most notably
assembly
andunidoc
-- will require various updates to thebuild.sbt
files that use those plugins.On a related note, while this upgrade is being done, I recommend consolidating project dependencies and getting rid of stuff we don't need (e.g., the eclipse plugin).
Also notice that when we do this upgrade we will get some messages about improper/insecure reflection during the build process (this is referring SBT or one of its plugins, not our own code). So that issue should also be fixed, because the warning indicates future releases will simply break the build process when this sort of reflection happens instead of giving a warning.
In the mean time, we definitely need to provide instructions for at least Ubuntu and MacOS on how to downgrade and -- in particular -- which version of java we work best with.