Can you provide a stacktrace with the exception you're getting? My gut
feeling is that it's a classpath issue. Reading the stacktrace is
tromendously helpful and will often state exactly what the problem is. And
also if you could provide the source code for it (maybe as the next step
though).

2011/7/5 Vaccaro, Kristen M <kvacc...@mitre.org>

> Hi Mattias and Eelco,****
>
> I was writing to you because you’d both answered my question last week
> saying that it is possible to open a new (or the same old)
> GraphDatabaseService and run new queries on it. I was hoping  you might be
> able to take a minute or two to point out where I’m going wrong (ie. why
> it’s not working for me).****
>
> ** **
>
> The outline of my code works like this: I add a very large amount of data
> (not through batch inserter), but in a program I wrote that opens a
> GraphDatabaseService and adds data from a csv using transactions.****
>
> Say I’m calling it startNeo4j, I run:****
>
> ** **
>
> public class startNeo4j{ …****
>
>        public static void main (String[] args) {****
>
>               GraphDatabaseService graphDb = new EmbeddedGraphDatabase(
> "data/test/base" );****
>
>               Transaction tx = graphDb.beginTx();****
>
>               IndexManager index = graphDb.index();****
>
>               Index<Node> userIds = index.forNodes("userIds");****
>
>               RelationshipIndex follows =
> index.forRelationships("follows");****
>
>               Node subreference = graphDb.createNode();****
>
>                                 [ here I input a very large csv (several
> million relationships), also giving relationship and userId indices ]****
>
>               tx.finish();****
>
>               graphDb.shutdown(); }}****
>
> ** **
>
> I then try to run a second program called, say, examineNeo4j.java some time
> later where I could open that graph database up again and query those
> relationships… but, I get an error where the Lucene index (userIds from
> above) can’t be resolved. So what I’m wondering is how I access all that
> data, after I close one session of the GraphDatabaseService and want to open
> it again…****
>
> ** **
>
> Any help would be greatly appreciated!****
>
> Kristen****
>
> ** **
>
> ** **
>
> Everything written to the database with successful transactions is
> persisted****
>
> and will be accessible in any following sessions. Just _don't_ think of a*
> ***
>
> GraphDatabaseService instance as a short lived object (like a SQL****
>
> connection), but instead see it more as your database server which benefits
> ****
>
> from being long lived... even days, weeks...)****
>
> ** **
>
> 2011/7/1 Vaccaro, Kristen M <kvacc...@mitre.org>****
>
> ** **
>
> > Hi, I have a question about sessions in Neo4j. I'm working with the****
>
> > embedded Java (not as a server) and I can load my data and query it
> between****
>
> > transactions without trouble. My question is whether/how it's possible to
> ****
>
> > shut down my database at the end of a session and then access it in a new
> ****
>
> > session later.****
>
> >** **
>
> > Something like first doing:****
>
> > GraphDatabaseService graphDb = new EmbeddedGraphDatabase( "var/test/base"
> ****
>
> > );****
>
> > ...Add all my data using transactions****
>
> > graphDb.shutdown();****
>
> >** **
>
> > Then later opening a new session and accessing that database and indices
> ****
>
> > I've already made. Is that possible (I didn't see anything covering that
> in****
>
> > the wiki/documentation)? Or will I need to convert to the server version?
> ****
>
> > Kristen****
>
> >** **
>
> > _______________________________________________****
>
> > Neo4j mailing list****
>
> > User@lists.neo4j.org****
>
> > https://lists.neo4j.org/mailman/listinfo/user****
>
> >** **
>
> ** **
>
> ** **
>
> ** **
>
> -- ****
>
> Mattias Persson, [matt...@neotechnology.com]****
>
> Hacker, Neo Technology****
>
> www.neotechnology.com****
>
> _______________________________________________****
>
> Neo4j mailing list****
>
> User@lists.neo4j.org****
>
> https://lists.neo4j.org/mailman/listinfo/user****
>
> ** **
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to