inolen / titan-node

Wrapper around gremlin-node to provide out of the box support for Titan graph database
23 stars 13 forks source link

Exception when instantiating Gremlin #2

Closed jbmusso closed 10 years ago

jbmusso commented 10 years ago

Hi there!

I finally have some time to play around with gremlin-node/titan. I'm getting an exception when instantiating Gremlin with latest titan-node from npm:

var gremlin = new Titan.Gremlin({ loglevel: 'OFF' });

Exception caught:

Error: Could not create class com.thinkaurelius.titan.core.Order
java.lang.UnsupportedClassVersionError: com/thinkaurelius/titan/core/Order :
Unsupported major.minor version 51.0

This using Titan v0.4.1 with BerkeleyDB backend.

This is with the latest version of Java installed.

$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

Note that I'm under OS X 10.8.5, even though that shouldn't matter much.

Any thoughts?

Cheers,

inolen commented 10 years ago

Definitely looks like a node-java compilation issue.

Unsupported major.minor version 51.0

Means it's trying to load files compiled with a different runtime. I believe the general solution for this is to explicitly set JAVA_HOME before running npm install (I keep it set in my ~/.bash_profile).

inolen commented 10 years ago

@gulthor did that help at all?

jbmusso commented 10 years ago

Just updated ~/.bash_profile accordingly: problem solved. Thanks!

(Sorry for the long reply, I was a bit busy yesterday.)