Batch problem with Spring Batch + Neo4j

387 views
Skip to first unread message

Gwendal Mousset

unread,
Dec 16, 2013, 11:21:22 AM12/16/13
to ne...@googlegroups.com
Hi,

I've got a problem with Neo4j 2.0.0.M06 + SDN 3.0.0.M1 + Spring Batch 2.2.3

I configured a job that select users in a Neo4j database, perform a very simple operation in the ItemProcessor class and write the result.
The batch starts normally and works until it seems to be freeze or blocked after it processes 2 chunks.

The last line logged is : 
DEBUG: org.springframework.batch.core.step.item.ChunkOrientedTasklet - Inputs not busy, ended: false

Is there anybody here who have encountered this problem ?

I joined the configuration and the logs files.

Thanks

batch-conf.xml
batch-logs.txt

vincent fraboulet

unread,
Feb 18, 2014, 12:23:24 PM2/18/14
to ne...@googlegroups.com
Hi,

I have the same problem, but no issue.

Help?

Michael Hunger

unread,
Feb 18, 2014, 4:38:09 PM2/18/14
to ne...@googlegroups.com
Can you share what your batch jobs do? I.e. code?

Also a threaddump of the JVM would be helpful.

Michael

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

Michael Hunger

unread,
Feb 18, 2014, 4:40:20 PM2/18/14
to ne...@googlegroups.com
How many user do you have in your db?

START n=node(0) MATCH (user:User) WHERE user.isSubscriber=true RETURN user ORDER BY user.totalCoins SKIP 20 LIMIT 20

This statement is also not correct.

MATCH (user:User) WHERE user.isSubscriber=true RETURN user ORDER BY user.totalCoins SKIP 20 LIMIT 20

Make sure to have an index like this:

create index on :User(isSubscriber)

Michael

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<batch-logs.txt><batch-conf.xml>

Gwendal Mousset

unread,
Feb 19, 2014, 9:21:07 AM2/19/14
to ne...@googlegroups.com
Hi,

I've found the solution to this issue.
With Neo4j used with server, I have to modify default transaction manager configuration and add this to tasklet conf:

<batch:transaction-attributes isolation="DEFAULT" propagation="NOT_SUPPORTED" />


For the query, Spring Batch neo4j item reader required to specify a START statement. 
I copy/past the class org.springframework.batch.item.data.Neo4jItemReader and in my own class and override methods to make START statement optional.

Thanks,

Michael Hunger

unread,
Feb 19, 2014, 9:22:50 AM2/19/14
to ne...@googlegroups.com
Oh I didn't know there was a Neo4jItemReader in Spring batch.

Sent from mobile device
Reply all
Reply to author
Forward
0 new messages