You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Vineet Mishra <cl...@gmail.com> on 2014/07/01 14:15:22 UTC

Giraph Basic Job Run

Hi All,

I am new to Giraph and I am running quick example from

http://giraph.apache.org/quick_start.html

While running the Giraph job it is throwing java class version error,
although I am having Java and Javac set to version 7 still I don't have any
nerve why is this happening.

*Running command :*

hadoop jar
/usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-1.2.1-jar-with-dependencies.jar
org.apache.giraph.GiraphRunner
org.apache.giraph.examples.SimpleShortestPathsComputation -vif
org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat
-vip /home/user/input/tiny_graph.txt -vof
org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op
/home/user/output/shortestpaths -w 1


*Error Trace :*

Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/apache/giraph/GiraphRunner : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at org.apache.hadoop.util.RunJar.main(RunJar.java:149)

Version Used :
Hadoop 1.1.2
Java 1.7

Any help would be highly appreciated.
Thanks in advance!

Re: Giraph Basic Job Run

Posted by Vineet Mishra <cl...@gmail.com>.
Thanks man!

This works. (Y)


On Wed, Jul 2, 2014 at 12:51 PM, Sundara Raghavan Sankaran <
sundar@crayondata.com> wrote:

> Hi,
>
> I've had this error before.
>
> Code compiled on Java 7 and bashrc file setting JAVA_HOME to Java 7, but
> still get this error.
>
> For me, the reason was because the Hadoop processes were still running on
> Java 6. This is was because, in hadoop-env.sh, I had set JAVA_HOME to point
> to Java 6. So, the processes were running on Java 6 and it wasn't able to
> run the code compiled in Java 7.
>
> Check out on which Java your Hadoop processes are running.
>
> Hope this helps
>
> Regards,
> Sundar
>
>
> On Wed, Jul 2, 2014 at 12:18 PM, Vineet Mishra <cl...@gmail.com>
> wrote:
>
>> Hi Ritesh,
>>
>> As far as I have checked this error
>>
>>
>> Exception in thread "main" java.lang.UnsupportedClassVersionError:
>> org/apache/giraph/GiraphRunner : Unsupported major.minor version 51.0
>>
>> usually comes when the code compilation is done in one version and code
>> is run in another version(usually lower) but I have explicitly set java 7
>> for compilation while packaging the project and moreover I have Java 7 set
>> in classpath(referred bashrc) and this error Unsupported major.minor
>> version 51.0 itself says that the compilation is done in java 7.
>>
>> So does that mean my Java is taking lower version than Java 7 even though
>> I am able to see the classpath set to Java 7.
>>
>> java version "1.7.0_21"
>> Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
>> Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
>>
>> Although I have faced this classversion error several times while running
>> code from eclipse but this is the first time I am facing this issue with
>> maven build and I don't find any reason for it to behave vague.
>>
>> Experts suggestions will be highly appreciated.
>>
>> Thanks!
>>
>>
>> On Tue, Jul 1, 2014 at 8:29 PM, Ritesh Kumar Singh <
>> riteshoneinamillion@gmail.com> wrote:
>>
>>> I guess u have both Java 6 and Java 7 installed in your PC. And now when
>>> you are trying to run hadoop, its forcing Giraph which is made for java 7
>>> to to run on a java 6 jvm.
>>> I will suggest you to have a look in your .bashrc file for the default
>>> java version and try to make java 7 as the default JVM.
>>> Hope this helps
>>>
>>>
>>> On Tue, Jul 1, 2014 at 5:45 PM, Vineet Mishra <cl...@gmail.com>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I am new to Giraph and I am running quick example from
>>>>
>>>> http://giraph.apache.org/quick_start.html
>>>>
>>>> While running the Giraph job it is throwing java class version error,
>>>> although I am having Java and Javac set to version 7 still I don't have any
>>>> nerve why is this happening.
>>>>
>>>> *Running command :*
>>>>
>>>> hadoop jar
>>>> /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-1.2.1-jar-with-dependencies.jar
>>>> org.apache.giraph.GiraphRunner
>>>> org.apache.giraph.examples.SimpleShortestPathsComputation -vif
>>>> org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat
>>>> -vip /home/user/input/tiny_graph.txt -vof
>>>> org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op
>>>> /home/user/output/shortestpaths -w 1
>>>>
>>>>
>>>> *Error Trace :*
>>>>
>>>> Exception in thread "main" java.lang.UnsupportedClassVersionError:
>>>> org/apache/giraph/GiraphRunner : Unsupported major.minor version 51.0
>>>>  at java.lang.ClassLoader.defineClass1(Native Method)
>>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
>>>>  at
>>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>>>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
>>>>  at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
>>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
>>>>  at java.security.AccessController.doPrivileged(Native Method)
>>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>>>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>>>>  at java.lang.Class.forName0(Native Method)
>>>> at java.lang.Class.forName(Class.java:266)
>>>> at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
>>>>
>>>> Version Used :
>>>> Hadoop 1.1.2
>>>> Java 1.7
>>>>
>>>> Any help would be highly appreciated.
>>>> Thanks in advance!
>>>>
>>>
>>>
>>
>

Re: Giraph Basic Job Run

Posted by Sundara Raghavan Sankaran <su...@crayondata.com>.
Hi,

I've had this error before.

Code compiled on Java 7 and bashrc file setting JAVA_HOME to Java 7, but
still get this error.

For me, the reason was because the Hadoop processes were still running on
Java 6. This is was because, in hadoop-env.sh, I had set JAVA_HOME to point
to Java 6. So, the processes were running on Java 6 and it wasn't able to
run the code compiled in Java 7.

Check out on which Java your Hadoop processes are running.

Hope this helps

Regards,
Sundar


On Wed, Jul 2, 2014 at 12:18 PM, Vineet Mishra <cl...@gmail.com>
wrote:

> Hi Ritesh,
>
> As far as I have checked this error
>
>
> Exception in thread "main" java.lang.UnsupportedClassVersionError:
> org/apache/giraph/GiraphRunner : Unsupported major.minor version 51.0
>
> usually comes when the code compilation is done in one version and code is
> run in another version(usually lower) but I have explicitly set java 7 for
> compilation while packaging the project and moreover I have Java 7 set in
> classpath(referred bashrc) and this error Unsupported major.minor version
> 51.0 itself says that the compilation is done in java 7.
>
> So does that mean my Java is taking lower version than Java 7 even though
> I am able to see the classpath set to Java 7.
>
> java version "1.7.0_21"
> Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
>
> Although I have faced this classversion error several times while running
> code from eclipse but this is the first time I am facing this issue with
> maven build and I don't find any reason for it to behave vague.
>
> Experts suggestions will be highly appreciated.
>
> Thanks!
>
>
> On Tue, Jul 1, 2014 at 8:29 PM, Ritesh Kumar Singh <
> riteshoneinamillion@gmail.com> wrote:
>
>> I guess u have both Java 6 and Java 7 installed in your PC. And now when
>> you are trying to run hadoop, its forcing Giraph which is made for java 7
>> to to run on a java 6 jvm.
>> I will suggest you to have a look in your .bashrc file for the default
>> java version and try to make java 7 as the default JVM.
>> Hope this helps
>>
>>
>> On Tue, Jul 1, 2014 at 5:45 PM, Vineet Mishra <cl...@gmail.com>
>> wrote:
>>
>>> Hi All,
>>>
>>> I am new to Giraph and I am running quick example from
>>>
>>> http://giraph.apache.org/quick_start.html
>>>
>>> While running the Giraph job it is throwing java class version error,
>>> although I am having Java and Javac set to version 7 still I don't have any
>>> nerve why is this happening.
>>>
>>> *Running command :*
>>>
>>> hadoop jar
>>> /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-1.2.1-jar-with-dependencies.jar
>>> org.apache.giraph.GiraphRunner
>>> org.apache.giraph.examples.SimpleShortestPathsComputation -vif
>>> org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat
>>> -vip /home/user/input/tiny_graph.txt -vof
>>> org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op
>>> /home/user/output/shortestpaths -w 1
>>>
>>>
>>> *Error Trace :*
>>>
>>> Exception in thread "main" java.lang.UnsupportedClassVersionError:
>>> org/apache/giraph/GiraphRunner : Unsupported major.minor version 51.0
>>>  at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
>>>  at
>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
>>>  at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
>>>  at java.security.AccessController.doPrivileged(Native Method)
>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>>>  at java.lang.Class.forName0(Native Method)
>>> at java.lang.Class.forName(Class.java:266)
>>> at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
>>>
>>> Version Used :
>>> Hadoop 1.1.2
>>> Java 1.7
>>>
>>> Any help would be highly appreciated.
>>> Thanks in advance!
>>>
>>
>>
>

Re: Giraph Basic Job Run

Posted by Vineet Mishra <cl...@gmail.com>.
Hi Ritesh,

As far as I have checked this error

Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/apache/giraph/GiraphRunner : Unsupported major.minor version 51.0

usually comes when the code compilation is done in one version and code is
run in another version(usually lower) but I have explicitly set java 7 for
compilation while packaging the project and moreover I have Java 7 set in
classpath(referred bashrc) and this error Unsupported major.minor version
51.0 itself says that the compilation is done in java 7.

So does that mean my Java is taking lower version than Java 7 even though I
am able to see the classpath set to Java 7.

java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

Although I have faced this classversion error several times while running
code from eclipse but this is the first time I am facing this issue with
maven build and I don't find any reason for it to behave vague.

Experts suggestions will be highly appreciated.

Thanks!


On Tue, Jul 1, 2014 at 8:29 PM, Ritesh Kumar Singh <
riteshoneinamillion@gmail.com> wrote:

> I guess u have both Java 6 and Java 7 installed in your PC. And now when
> you are trying to run hadoop, its forcing Giraph which is made for java 7
> to to run on a java 6 jvm.
> I will suggest you to have a look in your .bashrc file for the default
> java version and try to make java 7 as the default JVM.
> Hope this helps
>
>
> On Tue, Jul 1, 2014 at 5:45 PM, Vineet Mishra <cl...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> I am new to Giraph and I am running quick example from
>>
>> http://giraph.apache.org/quick_start.html
>>
>> While running the Giraph job it is throwing java class version error,
>> although I am having Java and Javac set to version 7 still I don't have any
>> nerve why is this happening.
>>
>> *Running command :*
>>
>> hadoop jar
>> /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-1.2.1-jar-with-dependencies.jar
>> org.apache.giraph.GiraphRunner
>> org.apache.giraph.examples.SimpleShortestPathsComputation -vif
>> org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat
>> -vip /home/user/input/tiny_graph.txt -vof
>> org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op
>> /home/user/output/shortestpaths -w 1
>>
>>
>> *Error Trace :*
>>
>> Exception in thread "main" java.lang.UnsupportedClassVersionError:
>> org/apache/giraph/GiraphRunner : Unsupported major.minor version 51.0
>>  at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
>>  at
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
>>  at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
>> at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
>>  at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>>  at java.lang.Class.forName0(Native Method)
>> at java.lang.Class.forName(Class.java:266)
>> at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
>>
>> Version Used :
>> Hadoop 1.1.2
>> Java 1.7
>>
>> Any help would be highly appreciated.
>> Thanks in advance!
>>
>
>

Re: Giraph Basic Job Run

Posted by Ritesh Kumar Singh <ri...@gmail.com>.
I guess u have both Java 6 and Java 7 installed in your PC. And now when
you are trying to run hadoop, its forcing Giraph which is made for java 7
to to run on a java 6 jvm.
I will suggest you to have a look in your .bashrc file for the default java
version and try to make java 7 as the default JVM.
Hope this helps


On Tue, Jul 1, 2014 at 5:45 PM, Vineet Mishra <cl...@gmail.com>
wrote:

> Hi All,
>
> I am new to Giraph and I am running quick example from
>
> http://giraph.apache.org/quick_start.html
>
> While running the Giraph job it is throwing java class version error,
> although I am having Java and Javac set to version 7 still I don't have any
> nerve why is this happening.
>
> *Running command :*
>
> hadoop jar
> /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-1.2.1-jar-with-dependencies.jar
> org.apache.giraph.GiraphRunner
> org.apache.giraph.examples.SimpleShortestPathsComputation -vif
> org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat
> -vip /home/user/input/tiny_graph.txt -vof
> org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op
> /home/user/output/shortestpaths -w 1
>
>
> *Error Trace :*
>
> Exception in thread "main" java.lang.UnsupportedClassVersionError:
> org/apache/giraph/GiraphRunner : Unsupported major.minor version 51.0
>  at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
>  at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
>  at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
>  at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>  at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:266)
> at org.apache.hadoop.util.RunJar.main(RunJar.java:149)
>
> Version Used :
> Hadoop 1.1.2
> Java 1.7
>
> Any help would be highly appreciated.
> Thanks in advance!
>