1

I don't know what exactly happened, but since today I am struggling to build the maven package I got an error I am struggling with.

When running:

mvn package

or

mvn install 

I get the following error:

[INFO] 'compiler-interface' not yet compiled for Scala 2.10.4. Compiling...
error: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', 
required by /.m2/repository/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar(scala/package.class)

error: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', 
required by /.m2/repository/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar(scala/runtime/package.class)

error: scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.

I have checked and the folder exists.

I have renamed the folder 2.10.4 and re-downloaded the dependencies from maven to get them new.

I still run in to this error and I don't know why or what to do, any suggestion?

2
  • Since, you have not provided any information about your project, I can begin with the only guessable reason. I think you are not using compatible JDK version. If you look at docs.scala-lang.org/overviews/jdk-compatibility/overview.html, you will see that every Java version has a minimum scala version for compatibility. Since you are failing to compile for scala 2.10.4, I am guessing that you are using JDK version 9 or above. Commented Dec 27, 2018 at 9:10
  • @SarveshKumarSingh You are right, I was somehow I installed another jdk version or and it was providing the error, this is not a problem anymore, now I have another ones but thank you very much! Make a formal reply instead of a comment and I'll assign it to you as solved if you want Commented Dec 27, 2018 at 9:15

1 Answer 1

1

For some reason my java version upgraded and was not compatible with the scala version I used.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.