NoClassDefFoundError Trying to Start orientdb-gremlin

79 views
Skip to first unread message

Jonathan Cook

unread,
Feb 27, 2014, 5:50:27 PM2/27/14
to orient-...@googlegroups.com
I'm trying to start the gremlin console and I get this java error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/tinkerpop/gremlin/groovy/console/Console
Caused by: java.lang.ClassNotFoundException: com.tinkerpop.gremlin.groovy.console.Console
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

I'm sure it's a simple class path problem but I don't know what I should be doing to fix it ...

Any help would be appreciated.

Regards,
J5

Luca Garulli

unread,
Feb 27, 2014, 5:57:26 PM2/27/14
to orient-database
What release are you using?

Lvc@



--
 
---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jonathan Cook

unread,
Feb 27, 2014, 6:18:17 PM2/27/14
to orient-...@googlegroups.com
1.7rc1

Jonathan Cook

unread,
Mar 7, 2014, 4:44:42 PM3/7/14
to orient-...@googlegroups.com
This problem is really getting to me.  My codebase uses both SQL and Gremlin/Groovy and I need to be able to prototype / write my queries interactively.

I am on OS X, using OrientDB 1.7rc1, executing orientdb-gremlin command.

Please help! :)

J5
Message has been deleted

Damian Bronecki

unread,
Mar 8, 2014, 2:06:59 AM3/8/14
to orient-...@googlegroups.com
If you are using Maven, then you must add this to your pom.xml:

<dependency>
   
<groupId>com.tinkerpop.gremlin</groupId>
   
<artifactId>gremlin-groovy</artifactId>
   
<version>2.4.0</version>
</dependency>

Otherwise you must download jar and add it to classpath.

Just read instructions from this site:
https://github.com/tinkerpop/gremlin/wiki

Jonathan Cook

unread,
Mar 8, 2014, 9:56:59 PM3/8/14
to orient-...@googlegroups.com
This issue isn't with including GremlinGroovy in my project / maven pom, it's with figuring out where the orientdb-gremlin console is trying to look for libs so I can put gremlin-groovy into the path there.


--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/lINm5rbUjT8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
jonathan 'j5' cook   |  lead developer  |   always prepped

cell:      
540.822.0180

Damian Bronecki

unread,
Mar 9, 2014, 4:55:09 AM3/9/14
to orient-...@googlegroups.com
I think this will be ORIENTDB_HOME/lib folder
Try to download gremlin-groovy jar and put there.

Jonathan Cook

unread,
Mar 9, 2014, 4:03:59 PM3/9/14
to orient-...@googlegroups.com
For anyone else who has this problem, it happens because of symlinks.  The scripts don't take into account the fact that they might be executed as symlinks and so the classpath is not properly set.  The line to change is:

cd `dirname $0`

if you have an $ORIENTDB_HOME environment variable, I believe you can change it to:

cd "$ORIENTDB_HOME\bin"

I use some other bash code that resolves the symlink:

SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
#set current working directory
cd $DIR

J5


On Sun, Mar 9, 2014 at 4:55 AM, Damian Bronecki <broneck...@gmail.com> wrote:
I think this will be ORIENTDB_HOME/lib folder
Try to download gremlin-groovy jar and put there.

--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/lINm5rbUjT8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luca Garulli

unread,
Mar 9, 2014, 10:57:16 PM3/9/14
to orient-database
Hi Jonathan,
is this universal (Linux, MacOSX, Unix in general) we can apply on default distribution?

Lvc@



--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages