Sudhakar,
first, the impl over REST sounds a bit expensive roundtrip-wise.
Secondly, could you extract a simple test that gets this problem? I
think it might be that since you are using the iterator index hits,
the second time, it is already empty?
On Tue, Sep 11, 2012 at 7:53 AM, Sudhakar G <sudhakar.t...@gmail.com> wrote:
> Hi,,
> I am using blueprints 1.2 over Java REST API for Neo4J.
> I have an usecase where I need to retrieve the same vertex from Neo4J twice
> in a single transaction.
> First call is working perfectly fine where as the second call is failing
> with the below exception.
> java.lang.NullPointerException
> at
> org.neo4j.rest.graphdb.index.SimpleIndexHits.hasNext(SimpleIndexHits.java:8 0)
> at
> com.tinkerpop.blueprints.pgm.impls.neo4j.util.Neo4jVertexSequence.hasNext(N eo4jVertexSequence.java:35)
> at
> com.pg.social.dao.graphdb.IteratorUtil.getSingle(IteratorUtil.java:18)
> at
> com.pg.social.dao.graphdb.service.profile.SocialProfileManager.getSocialVer tex(SocialProfileManager.java:273)
> at
> com.pg.social.dao.graphdb.service.network.NetworkProfileManager.importNetwo rkProfile(NetworkProfileManager.java:234)
> Can someone let me know why and when this error comes....
We are fine with the round trip delay as we have multiple services connecting to the same Neo4j node and communicating through REST API is the only way in which that can be done(Correct me if am wrong).
Secondly, the same vertex is being queried multiple times. So the result should be consistent across all the calls. Here is my sample code. * * * Index<Vertex> sampleIndex= indexableGraph.getIndex(* * indexName, Vertex.class);* * * * * * Vertex sampleVertex= IteratorUtil.getSingle(sampleIndex.get(* * index, indexValue)* * .iterator());*
The same is being called multiple times in a single transaction with the same value. For first call, everything is fine. But for the second call, the below exception is coming......
On Tuesday, September 11, 2012 12:20:37 PM UTC+5:30, Peter Neubauer wrote:
> Sudhakar, > first, the impl over REST sounds a bit expensive roundtrip-wise. > Secondly, could you extract a simple test that gets this problem? I > think it might be that since you are using the iterator index hits, > the second time, it is already empty?
> Wanna learn something new? Come to @graphconnect.
> On Tue, Sep 11, 2012 at 7:53 AM, Sudhakar G <sudhak...@gmail.com<javascript:>> > wrote: > > Hi,,
> > I am using blueprints 1.2 over Java REST API for Neo4J. > > I have an usecase where I need to retrieve the same vertex from Neo4J > twice > > in a single transaction.
> > First call is working perfectly fine where as the second call is failing > > with the below exception.
Which versions are you using? (neo4j, batch-rest-api)
Do you use batching or tx boundaries (in the newer versions of the java-rest-binding?)
If so, your requests are batched and only be available after tx.finish() / end of batch callback, to go back to the non-batching tx you should set the system property.
> I am using blueprints 1.2 over Java REST API for Neo4J. > I have an usecase where I need to retrieve the same vertex from Neo4J twice in a single transaction.
> First call is working perfectly fine where as the second call is failing with the below exception.
> java.lang.NullPointerException
> at org.neo4j.rest.graphdb.index.SimpleIndexHits.hasNext(SimpleIndexHits.java:8 0)
> at com.tinkerpop.blueprints.pgm.impls.neo4j.util.Neo4jVertexSequence.hasNext(N eo4jVertexSequence.java:35)
> at com.pg.social.dao.graphdb.IteratorUtil.getSingle(IteratorUtil.java:18)
> at com.pg.social.dao.graphdb.service.profile.SocialProfileManager.getSocialVer tex(SocialProfileManager.java:273)
> at com.pg.social.dao.graphdb.service.network.NetworkProfileManager.importNetwo rkProfile(NetworkProfileManager.java:234)
> Can someone let me know why and when this error comes....
I am using Blueprints 1.2 over Neo4J database running on 1.8M06. The rest API Impl version is blueprints-neo4j-graph-1.2.
The problems that I am facing is that sometimes I am able to read vertex/node from a previously completed transaction and sometimes I am not able to read the same vertex/node with the same node id.
I am running my application with the property org.neo4j.rest.batch_transactions set to true.
Also I would like to know if the latest blueprints-neo4j-graph that runs over blueprints 2.0
On Tuesday, September 11, 2012 12:20:37 PM UTC+5:30, Peter Neubauer wrote:
> Sudhakar, > first, the impl over REST sounds a bit expensive roundtrip-wise. > Secondly, could you extract a simple test that gets this problem? I > think it might be that since you are using the iterator index hits, > the second time, it is already empty?
> Wanna learn something new? Come to @graphconnect.
> On Tue, Sep 11, 2012 at 7:53 AM, Sudhakar G <sudhak...@gmail.com<javascript:>> > wrote: > > Hi,,
> > I am using blueprints 1.2 over Java REST API for Neo4J. > > I have an usecase where I need to retrieve the same vertex from Neo4J > twice > > in a single transaction.
> > First call is working perfectly fine where as the second call is failing > > with the below exception.
Mmh,
can you recreate the test in some way that you can share? Would love
to debug it. I am working on the upgrade to Blueprints 2.1, hope to
get it into master soonish.
On Tue, Sep 11, 2012 at 7:10 PM, Sudhakar G <sudhakar.t...@gmail.com> wrote:
> Hi Peter,
> I am using Blueprints 1.2 over Neo4J database running on 1.8M06.
> The rest API Impl version is blueprints-neo4j-graph-1.2.
> The problems that I am facing is that sometimes I am able to read
> vertex/node from a previously completed transaction and sometimes I am not
> able to read the same vertex/node with the same node id.
> I am running my application with the property
> org.neo4j.rest.batch_transactions set to true.
> Also I would like to know if the latest blueprints-neo4j-graph that runs
> over blueprints 2.0
> Thanks,
> Sudhakar Gurram
> On Tuesday, September 11, 2012 12:20:37 PM UTC+5:30, Peter Neubauer wrote:
>> Sudhakar,
>> first, the impl over REST sounds a bit expensive roundtrip-wise.
>> Secondly, could you extract a simple test that gets this problem? I
>> think it might be that since you are using the iterator index hits,
>> the second time, it is already empty?
>> Wanna learn something new? Come to @graphconnect.
>> On Tue, Sep 11, 2012 at 7:53 AM, Sudhakar G <sudhak...@gmail.com> wrote:
>> > Hi,,
>> > I am using blueprints 1.2 over Java REST API for Neo4J.
>> > I have an usecase where I need to retrieve the same vertex from Neo4J
>> > twice
>> > in a single transaction.
>> > First call is working perfectly fine where as the second call is failing
>> > with the below exception.
Could you please let me know when the upgradation to Blueprints 2.1 will be
commited.
If the ETA is within our project deadlines, we will wait for the upgraded
version.
peter.neuba...@neotechnology.com> wrote:
> Mmh,
> can you recreate the test in some way that you can share? Would love
> to debug it. I am working on the upgrade to Blueprints 2.1, hope to
> get it into master soonish.
> Wanna learn something new? Come to @graphconnect.
> On Tue, Sep 11, 2012 at 7:10 PM, Sudhakar G <sudhakar.t...@gmail.com>
> wrote:
> > Hi Peter,
> > I am using Blueprints 1.2 over Neo4J database running on 1.8M06.
> > The rest API Impl version is blueprints-neo4j-graph-1.2.
> > The problems that I am facing is that sometimes I am able to read
> > vertex/node from a previously completed transaction and sometimes I am
> not
> > able to read the same vertex/node with the same node id.
> > I am running my application with the property
> > org.neo4j.rest.batch_transactions set to true.
> > Also I would like to know if the latest blueprints-neo4j-graph that runs
> > over blueprints 2.0
> > Thanks,
> > Sudhakar Gurram
> > On Tuesday, September 11, 2012 12:20:37 PM UTC+5:30, Peter Neubauer
> wrote:
> >> Sudhakar,
> >> first, the impl over REST sounds a bit expensive roundtrip-wise.
> >> Secondly, could you extract a simple test that gets this problem? I
> >> think it might be that since you are using the iterator index hits,
> >> the second time, it is already empty?
> >> Wanna learn something new? Come to @graphconnect.
> >> On Tue, Sep 11, 2012 at 7:53 AM, Sudhakar G <sudhak...@gmail.com>
> wrote:
> >> > Hi,,
> >> > I am using blueprints 1.2 over Java REST API for Neo4J.
> >> > I have an usecase where I need to retrieve the same vertex from Neo4J
> >> > twice
> >> > in a single transaction.
> >> > First call is working perfectly fine where as the second call is
> failing
> >> > with the below exception.
Just came to know that this issue is coming when the same node index is queried before the previous iterator is closed. Can you check from that angle and let us know if that is the actual issue.
Also, can you let us know when the REST API impl over blueprints 2.1 would be committed.
On Tuesday, September 11, 2012 12:20:37 PM UTC+5:30, Peter Neubauer wrote:
> Sudhakar, > first, the impl over REST sounds a bit expensive roundtrip-wise. > Secondly, could you extract a simple test that gets this problem? I > think it might be that since you are using the iterator index hits, > the second time, it is already empty?
> Wanna learn something new? Come to @graphconnect.
> On Tue, Sep 11, 2012 at 7:53 AM, Sudhakar G <sudhak...@gmail.com<javascript:>> > wrote: > > Hi,,
> > I am using blueprints 1.2 over Java REST API for Neo4J. > > I have an usecase where I need to retrieve the same vertex from Neo4J > twice > > in a single transaction.
> > First call is working perfectly fine where as the second call is failing > > with the below exception.
> Just came to know that this issue is coming when the same node index is
> queried before the previous iterator is closed.
> Can you check from that angle and let us know if that is the actual issue.
> Also, can you let us know when the REST API impl over blueprints 2.1 would
> be committed.
> Thanks in Advance..
> On Tuesday, September 11, 2012 12:20:37 PM UTC+5:30, Peter Neubauer wrote:
>> Sudhakar,
>> first, the impl over REST sounds a bit expensive roundtrip-wise.
>> Secondly, could you extract a simple test that gets this problem? I
>> think it might be that since you are using the iterator index hits,
>> the second time, it is already empty?
>> Wanna learn something new? Come to @graphconnect.
>> On Tue, Sep 11, 2012 at 7:53 AM, Sudhakar G <sudhak...@gmail.com> wrote:
>> > Hi,,
>> > I am using blueprints 1.2 over Java REST API for Neo4J.
>> > I have an usecase where I need to retrieve the same vertex from Neo4J
>> twice
>> > in a single transaction.
>> > First call is working perfectly fine where as the second call is
>> failing
>> > with the below exception.
>> > java.lang.NullPointerException
>> > at
>> > org.neo4j.rest.graphdb.index.**SimpleIndexHits.hasNext(**SimpleIndexHits.ja va:80)
>> > at
>> > com.tinkerpop.blueprints.pgm.**impls.neo4j.util.**
>> Neo4jVertexSequence.hasNext(**Neo4jVertexSequence.java:35)
>> > at
>> > com.pg.social.dao.graphdb.**IteratorUtil.getSingle(**IteratorUtil.java:18)
>> > at
>> > com.pg.social.dao.graphdb.**service.profile.**SocialProfileManager.**
>> getSocialVertex(**SocialProfileManager.java:273)
>> > at
>> > com.pg.social.dao.graphdb.**service.network.**NetworkProfileManager.**
>> importNetworkProfile(**NetworkProfileManager.java:**234)
>> > Can someone let me know why and when this error comes....