OK,

Frustration was running hight just now, so before anyone answers:

I'm not sure in what way, but I messed up my classpath. I've updated
http://wiki.neo4j.org/content/Neo_Shell_Guide to use the jar names
that are included in the current versions so that might help some.

However, I'm still getting

$ java -cp neo-1.0-b6.jar:jta-spec1_0_1.jar:shell-1.0-b6.jar
org.neo4j.util.shell.StartRemoteClient neobase/
Can't start client shell: java.lang.NumberFormatException: For input
string: "neobase/"

It seems that the first argument is being interpreted as an integer --
port number maybe?

Also, adding lines to the code that actuall "do" something
(neo.getReferenceNode()) seems to have made things less strange, the
program is now returning. Most people are probably wondering, like me,
how to get keep Java running and how to make it shut down nicely
(something about a timeout loop and a shutdown signal?) so adding that
to the example code would be helpful.

Philip

On 4/27/08, Philip Jägenstedt <[EMAIL PROTECTED]> wrote:
> Greetings.
>
>  Concerning http://wiki.neo4j.org/content/Neo_Shell_Guide
>
>  This document is very difficult to understand for me as someone who
>  has just studied a Java course on university level and written a few
>  smaller things. I just can't get it working.
>
>  The two lines of code I get are
>
>  NeoService neo = new EmbeddedNeo( "neo" );
>  neo.enableRemoteShell();
>
>  My first guess for a main-function (class called NeoShell)
>
>     public static void main(String[] args) {
>         NeoService neo = new EmbeddedNeo("neobase");
>         neo.enableRemoteShell();
>     }
>
>  $ java -classpath .:shell-1.0-b6.jar NeoShell
>
>  INFO: Shell library not available. Neo shell not started. Please add
>  the Neo4j shell jar to the classpath
>
>  OK, why can't I use the classpath flag? I copy the jar to
>  /usr/lib/jvm/java-1.5.0-sun-1.5.0.13/jre/lib/ext/ and move along.
>  Starting the second time the program doesn't return. Seems good.
>
>  $ java -jar shell-1.0-b6.jar (only after also putting the jar in ext...)
>
>  NOTE: No port or RMI name specified, using default port 1337 and name 
> 'shell'.
>  Welcome to NeoShell
>  Available commands: quit
>  Use man <command> for info about each command.
>  org.neo4j.impl.persistence.PersistenceException:
>  org.neo4j.impl.transaction.NotInTransactionException: No transaction
>  found for current thread
>
>  The last message prints forever...
>
>  In the other terminal (where I started NeoShell) I get this:
>
>  Apr 27, 2008 7:37:56 PM org.neo4j.impl.core.NodeManager getNodeById
>  SEVERE: Persistence error while trying to get node #0 by id.
>  org.neo4j.impl.persistence.PersistenceException:
>  org.neo4j.impl.transaction.NotInTransactionException: No transaction
>  found for current thread
>
>  Until I kill the shell or NeoShell.
>
>  Last hope:
>
>  $ java -cp neo-1.0-rc1.jar:jta-1.0.1.jar:shell-1.0-rc1.jar
>  org.neo4j.util.shell.StartRemoteClient neobase/
>  Can't start client shell: java.lang.NumberFormatException: For input
>  string: "neobase/"
>
>  I've tried adding a line with "Transaction tx = Transaction.begin();"
>  to all of 3 possible positions (first/between/after the two existing
>  lines), all failing in spectacular ways.
>
>  Also, how can I shut down NeoShell in a nice way? Just killing is of
>  course bad, and messages to that effect (rebuilding/fsck/whatever)
>  when starting.
>
>  What am I doing so wrong? I should note that the database doesn't have
>  a single node or relation in it, I just wanted to play with the shell.
>
>
>  Philip...
>
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to