0

I installed Ubuntu 12.04(precise)64-bit alongside MacBookPro OS which its processor :Intel® Core™ i5-3210M CPU @ 2.50GHz × 4. Then I am trying for several days to install eucalyptus 3.2.0 by following this guide.

When I reached the build phase, it failed due to this issue :

 BUILD FAILED
/home/asma/eucalyptus-3.2.0/clc/build.xml:111: The following error occurred while executing this line:
java.lang.UnsupportedClassVersionError: org/codehaus/groovy/ant/Groovy : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
    at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1124)
    at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1295)
    at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1351)
    at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
    at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    at org.apache.tools.ant.AntTypeDefinition.innerGetTypeClass(AntTypeDefinition.java:194)
    at org.apache.tools.ant.AntTypeDefinition.getTypeClass(AntTypeDefinition.java:168)
    at org.apache.tools.ant.AntTypeDefinition.icreate(AntTypeDefinition.java:215)
    at org.apache.tools.ant.AntTypeDefinition.create(AntTypeDefinition.java:206)
    at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:286)
    at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:264)
    at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:417)
    at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
    at org.apache.tools.ant.Task.perform(Task.java:347)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.Main.runBuild(Main.java:809)
    at org.apache.tools.ant.Main.startAnt(Main.java:217)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 0 seconds
make[1]: *** [build] Error 1
make[1]: Leaving directory `/home/asma/eucalyptus-3.2.0/clc'
make: *** [build] Error 2

Ff course I searched and googled, but all solutions state that make sure that java and javac versions are the same since this issue occurs when with java version of compile and run is conflicting. I have the same version for java and javac which is :

asma@asma-MacBookPro:~$ java -version
java version "1.6.0_31"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (6b31-1.13.3-1ubuntu1~0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
asma@asma-MacBookPro:~$ javac -version 
javac 1.6.0_31

Here is ant version :

asma@asma-MacBookPro:~$ ant -version 
Apache Ant(TM) version 1.8.2 compiled on December 3 2011

I have only openjdk-6-jdk installed on my Ubuntu right now and I removed java7. Also I tried to have only openjdk-7-jdk but the build still was not successful.

What would be the reason for this error ? Any thoughts or suggestions? May I need to alter build.xml?

Opal
  • 81,889
  • 28
  • 189
  • 210
Asma
  • 41
  • 1
  • 1
  • 5
  • What version of groovy? And which jar? – tim_yates Aug 02 '14 at 15:00
  • Groovy Version: 1.8.6 JVM: 1.6.0_31 Vendor: Sun Microsystems Inc. OS:Linux what do you mean by jar ? – Asma Aug 02 '14 at 15:05
  • Your ant script must be pulling in a groovy dependency jar or jars from somewhere – tim_yates Aug 02 '14 at 17:47
  • thank you for your replying. so, what action should I take to get rid of this error? could you please tell me if you have knowledge regarding this ? thanks tim_yates – Asma Aug 02 '14 at 19:15
  • The build seems to use groovy-all-2.2.1-indy which is built for Java 7 – tim_yates Aug 02 '14 at 20:26
  • that means I need to upgrade groovy to 2.2.1 and install java7 instead of java 6 ? right ? – Asma Aug 02 '14 at 20:43
  • You should just be able to use the non indy groovy-all-2.2.1.jar version – tim_yates Aug 02 '14 at 20:51
  • hey tim_yates. thank you for helping me. I noticed that the groovy-all-2.2.1-indy.jar is found in eucalyptus/clc/lib, and it is occurring as a result of building the eucalyptus. how can we prevent that? how to unable it . I can show you the build.xml if that would help. – Asma Aug 03 '14 at 09:33

1 Answers1

0

During the build process for Eucalyptus, it will perform a submodule checkout of github.com/euaclyptus/eucalyptus-cloud-libs which contains the jars necessary to build from source. When building older versions of Eucalyptus, it doesn't always checkout the correct tag/branch for cloud-libs. If you go into eucalyptus/clc/lib and do a git status you should be able to see which branch is checked out. If it is #testing, then the build will not work because the dependencies have changed quite a bit since 3.2.0. I believe there is a tag for 3.2.2 that may work correctly. Because of the way that the build process does the checkout on that folder, it may not be as easy as doing git checkout. Instead, you may have to delete that folder and manually checkout the eucalyptus-cloud-libs repository which is a large-ish download.

Btw - while working on Eucalyptus, we use Java7, so you are better off installing it instead of 6.

If you are building from source, I would suggest trying to build from #testing, rather than an older release. Although Ubuntu is not supported, I have built Eucalyptus and run it on Ubuntu in the past. That guide is as good as any, but be prepared to perform some hackery. I vaguely remember commenting out some unit tests in Makefiles to make the build succeed.

  • Thanks very much Wes. In fact, I switched to Faststart eucalyptus which is easier to install and saves time. Following that guide drove and ran into many issues. Thank you again . – Asma Aug 06 '14 at 02:11