laurilehmijoki / s3_website

Manage an S3 website: sync, deliver via CloudFront, benefit from advanced S3 website features.
Other
2.25k stars 186 forks source link

Exception in thread "main" java.lang.ExceptionInInitializerError #325

Open jcarruthers opened 5 years ago

jcarruthers commented 5 years ago

I get this error when I try to run S3_website (macOS 10.14.4):

Exception in thread "main" java.lang.ExceptionInInitializerError at org.jruby.Ruby.newInstance(Ruby.java:266) at s3.website.Ruby$.rubyRuntime$lzycompute(Ruby.scala:4) at s3.website.Ruby$.rubyRuntime(Ruby.scala:4) at s3.website.model.Config$$anonfun$15.apply(Config.scala:229) at s3.website.model.Config$$anonfun$15.apply(Config.scala:227) at scala.util.Try$.apply(Try.scala:192) at s3.website.model.Config$.erbEval(Config.scala:227) at s3.website.model.Site$$anonfun$2.apply(Site.scala:28) at s3.website.model.Site$$anonfun$2.apply(Site.scala:27) at scala.util.Success.flatMap(Try.scala:231) at s3.website.model.Site$.parseConfig(Site.scala:27) at s3.website.model.Site$.loadSite(Site.scala:100) at s3.website.Push$.push(Push.scala:62) at s3.website.Push$.main(Push.scala:40) at s3.website.Push.main(Push.scala) Caused by: java.lang.RuntimeException: unsupported Java version: 11 at org.jruby.RubyInstanceConfig.initGlobalJavaVersion(RubyInstanceConfig.java:1878) at org.jruby.RubyInstanceConfig.<clinit>(RubyInstanceConfig.java:1585) ... 15 more

Can you help me figure out what is wrong please?

thanks

marekciupak commented 5 years ago

I had to downgrade JDK to version 8: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.

theapplegates commented 5 years ago

I get the same error from Travis CL when I try and build my website.

theapplegates commented 5 years ago

Looks like I'm getting stupid in my old age. My Travis CL error clearly states the problem for me.

"Caused by: java.lang.RuntimeException: unsupported Java version: 11"

Now, off to find a fix, or maybe force Travis CL to use JDK Version 8 as suggested above.

Drewzar commented 5 years ago

Anyone figure out a work around for this in Travis?

Drewzar commented 5 years ago

I was able to fix this issue in Travis by updating the .travis.yml to:

bryanus commented 1 year ago

Downgrading to Java 8 works, but there is a newer fork of this project that enables compatibility with v11 and v17 JDKs.

s3_website_revived

Switching was as easy as just installing the newer v17 jdk and updating my PATH. Everything else works exactly the same AFAIK.