Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ohnosequences/ivy/S3Resolver : Unsupported major.minor version 52.0 #38

Closed
sparrovv opened this issue Sep 17, 2015 · 8 comments
Closed

Comments

@sparrovv
Copy link

Hi, I'm getting this error with 0.13.0 version.
It seems to work(or at least sbt doesn't complain) when downgrading to version 0.12.0.
Any ideas what can it be?

> sbt

java.lang.UnsupportedClassVersionError: ohnosequences/ivy/S3Resolver : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at ohnosequences.sbt.SbtS3Resolver$autoImport$.s3resolver$lzycompute(SBTS3Resolver.scala:62)
    at ohnosequences.sbt.SbtS3Resolver$autoImport$.s3resolver(SBTS3Resolver.scala:62)
    at ohnosequences.sbt.SbtS3Resolver$.projectSettings$lzycompute(SBTS3Resolver.scala:90)
    at ohnosequences.sbt.SbtS3Resolver$.projectSettings(SBTS3Resolver.scala:82)
    at sbt.Load$$anonfun$autoPluginSettings$1$1.apply(Load.scala:666)
    at sbt.Load$$anonfun$autoPluginSettings$1$1.apply(Load.scala:666)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
    at scala.collection.immutable.List.foreach(List.scala:318)
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
    at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
    at sbt.Load$.autoPluginSettings$1(Load.scala:666)
    at sbt.Load$.sbt$Load$$expandSettings$1(Load.scala:681)
    at sbt.Load$$anonfun$sbt$Load$$expandSettings$1$2.apply(Load.scala:682)
    at sbt.Load$$anonfun$sbt$Load$$expandSettings$1$2.apply(Load.scala:682)
    at scala.collection.IndexedSeqOptimized$class.foldl(IndexedSeqOptimized.scala:51)
    at scala.collection.IndexedSeqOptimized$class.foldLeft(IndexedSeqOptimized.scala:60)
    at scala.collection.mutable.WrappedArray.foldLeft(WrappedArray.scala:34)
    at scala.collection.TraversableOnce$class.$div$colon(TraversableOnce.scala:138)
    at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:105)
    at sbt.Load$.sbt$Load$$expandSettings$1(Load.scala:682)
    at sbt.Load$.resolveProject(Load.scala:684)
    at sbt.Load$.finalizeProject$1(Load.scala:549)
    at sbt.Load$.loadTransitive(Load.scala:590)
    at sbt.Load$.loadProjects$1(Load.scala:442)
    at sbt.Load$.loadUnit(Load.scala:446)
    at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
    at sbt.Load$$anonfun$18$$anonfun$apply$11.apply(Load.scala:281)
    at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:91)
    at sbt.BuildLoader$$anonfun$componentLoader$1$$anonfun$apply$4$$anonfun$apply$5$$anonfun$apply$6.apply(BuildLoader.scala:90)
    at sbt.BuildLoader.apply(BuildLoader.scala:140)
    at sbt.Load$.loadAll(Load.scala:334)
    at sbt.Load$.loadURI(Load.scala:289)
    at sbt.Load$.load(Load.scala:285)
    at sbt.Load$.load(Load.scala:276)
    at sbt.Load$.apply(Load.scala:130)
    at sbt.Load$.defaultLoad(Load.scala:36)
    at sbt.BuiltinCommands$.doLoadProject(Main.scala:481)
    at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
    at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:475)
    at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
    at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:58)
    at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
    at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:60)
    at sbt.Command$.process(Command.scala:92)
    at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
    at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:98)
    at sbt.State$$anon$1.process(State.scala:184)
    at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
    at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:98)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.MainLoop$.next(MainLoop.scala:98)
    at sbt.MainLoop$.run(MainLoop.scala:91)
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:70)
    at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:65)
    at sbt.Using.apply(Using.scala:24)
    at sbt.MainLoop$.runWithNewLog(MainLoop.scala:65)
    at sbt.MainLoop$.runAndClearLast(MainLoop.scala:48)
    at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:32)
    at sbt.MainLoop$.runLogged(MainLoop.scala:24)
    at sbt.StandardMain$.runManaged(Main.scala:53)
    at sbt.xMain.run(Main.scala:28)
    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
    at xsbt.boot.Launch$.run(Launch.scala:109)
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
    at xsbt.boot.Launch$.launch(Launch.scala:117)
    at xsbt.boot.Launch$.apply(Launch.scala:18)
    at xsbt.boot.Boot$.runImpl(Boot.scala:41)
    at xsbt.boot.Boot$.main(Boot.scala:17)
    at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.UnsupportedClassVersionError: ohnosequences/ivy/S3Resolver : Unsupported major.minor version 52.0
@laughedelic
Copy link
Contributor

Hi @sparrovv! It should be related to the Java version. Which Java do you use? And which version of this plugin. Also, if you try it with sbt 0.13, then it should be 0.13.5+, because there are some changes related to autoplugins..

@sparrovv
Copy link
Author

HI @laughedelic

% java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

% sbt --version
sbt launcher version 0.13.7

As I mentioned before, I got that exception in 0.13.0.
0.12.0 works fine.

Thanks!

@laughedelic
Copy link
Contributor

Hey @sparrovv
I've just published a snapshot version, could you try it and tell me if you still have this exception? For that you need to add another resolver:

resolvers += "Era7 maven snapshots" at "https://s3-eu-west-1.amazonaws.com/snapshots.era7.com"

addSbtPlugin("ohnosequences" % "sbt-s3-resolver" % "0.14.0-SNAPSHOT")

@sparrovv
Copy link
Author

Hey @laughedelic, looks like that version solved my problem. Thanks!
I'm not getting that exception any more, and I was able to publish a jar.

One thing tough. I'm not sure if that has changed in the version 0.13.0, but I initially got:
com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain

I think version 0.12.0 was picking up my AWS env variables, and 0.14.0 checks ~/.aws/credentials file, where I initially didn't have a default profile.

@laughedelic
Copy link
Contributor

Good! Actually, I just recompiled the ivy-s3-resolver with java 1.7 (our default now is 1.8). I'm going to release 0.13.1 here.

About credentials, yes, 0.13.0 looks up only in two places: default profile (or whichever you setup) and instance role credentials. But that's a good point about env variables. I can change it to the DefaultAWSCredentialsProviderChain in the next version if you think it's worth it 😉

laughedelic added a commit that referenced this issue Sep 24, 2015
- Updated ivy-s3-resolver to 0.7.1. It solves the Java incompatibility issue [#38](#38).
@laughedelic
Copy link
Contributor

Done 👌

@sparrovv
Copy link
Author

About credentials, yes, 0.13.0 looks up only in two places: default profile (or whichever you setup) and instance role credentials. But that's a good point about env variables. I can change it to the DefaultAWSCredentialsProviderChain in the next version if you think it's worth it

I know a few people who use env variables instead of aws/credentials, so I guess it would be easier for them.

@laughedelic
Copy link
Contributor

Ok. Done in 646df35, will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants