Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
Hi Chris. I don't mean to pressure, I write OSS myself and I know time is available whenever it is, so i just have some quick questions about this issue. Basically I just need to decided whether to shelf this feature of our project for now or if i can get any idea on how much work / how long it would take to get it working. 1) Do you think it's an issue with atomikos itself and I should I bring the issue to them ? 2) Is that something that would be fixed in neo4j itself, if so do you have any rough estimates ? 3) Is there some sort of workaround you could think of that I could implement ? Any other suggestions or ammount of work/time needed would be appreciated. Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3411656.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolartco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
Thanks Chris, that's exactly the issue I had in our real system, I actually did notice that null Tx in the cow map code while stepping through with the debugger. I don't really see why this is happening however, let me know if you think it's more of an atomikos issue, or if it can be dealt with. Thanks. On 10/9/11 7:54 AM, Chris Gioran wrote: This appears to be a different issue, having to do with the implementation of Atomikos. From some preliminary testing it seems that during commit the transaction returned by Atomikos' TransactionManager#getTransaction() is null, which makes commiting of the property COW maps to fail, making impossible to see the changes in the properties of the node. The native Neo4j TransactionManager returns the Transaction object and so the LockReleaser#commitCows() call works correctly. I will get back to you on this. cheers, CG ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolar tco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioran chris.gio...@neotechnology.com wrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolar tco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
Right, id is an implicit field ... works when not in transaction. If i remove that test, then I fail on the later index.get. As far as deleting the db, it's not in my test, but i removed the folder in y real code and manually before running the test. On 10/8/11 11:10 AM, Rick Bullotta wrote: If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioranchris.gio...@neotechnology.com wrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolartco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
Actually you are right, seems like id is the only one that fails ... i really thought that was implicitly created, could it be possible than somehow it should be but doesn't when using the transaction manager ? On 10/8/11 11:41 AM, Thibaut Colar wrote: Right, id is an implicit field ... works when not in transaction. If i remove that test, then I fail on the later index.get. As far as deleting the db, it's not in my test, but i removed the folder in y real code and manually before running the test. On 10/8/11 11:10 AM, Rick Bullotta wrote: If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioranchris.gio...@neotechnology.com wrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolartco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
The implicit key is _id_ but that's an implementation detail and shouldn't be used to assert correctness of the index in unit tests. 2011/10/8 Thibaut Colar tco...@colar.net Actually you are right, seems like id is the only one that fails ... i really thought that was implicitly created, could it be possible than somehow it should be but doesn't when using the transaction manager ? On 10/8/11 11:41 AM, Thibaut Colar wrote: Right, id is an implicit field ... works when not in transaction. If i remove that test, then I fail on the later index.get. As far as deleting the db, it's not in my test, but i removed the folder in y real code and manually before running the test. On 10/8/11 11:10 AM, Rick Bullotta wrote: If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioran chris.gio...@neotechnology.com wrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolartco...@colar.net wrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo
Re: [Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
You are right, was just using that in this (poor) unit test I made quickly late last week, it's not used in the real code. So the unit test does work and does not have the issue I have in the real and much more complex code. I guess I'll try to bring more of it in this unit test until i break it too. One of the thing we use, is the neo4j events mechanism(to sync data to another system), so i wonder if maybe using that in the context of transactions might cause the issue, or maybe some other sort of threading issue(what it looked like when i was debugging). Anyway will try to see if i can give you a failing test and/or better info tomorrow or Monday. Thanks On 10/8/11 1:51 PM, Mattias Persson wrote: The implicit key is _id_ but that's an implementation detail and shouldn't be used to assert correctness of the index in unit tests. 2011/10/8 Thibaut Colartco...@colar.net Actually you are right, seems like id is the only one that fails ... i really thought that was implicitly created, could it be possible than somehow it should be but doesn't when using the transaction manager ? On 10/8/11 11:41 AM, Thibaut Colar wrote: Right, id is an implicit field ... works when not in transaction. If i remove that test, then I fail on the later index.get. As far as deleting the db, it's not in my test, but i removed the folder in y real code and manually before running the test. On 10/8/11 11:10 AM, Rick Bullotta wrote: If I remember correctly, neo has an implicit field on each index, and the name is either id or _id. On Oct 8, 2011, at 1:58 PM, Chris Gioran chris.gio...@neotechnology.comwrote: Hi Thibaut, I noticed the following snippet in your test case code: long id = node.getId(); node.setProperty(testProp, test); index.add(node, testProp, test); Assert.assertEquals(node.getProperty(testProp), test); // Lookup By id Assert.assertNotNull(graphDb.getNodeById(id)); // Now via Index Node found = index.get(id, id).getSingle(); Assert.assertNotNull(found); Assert.assertEquals(found.getId(), id); which leads to the first test failure with a null result returned. Here you are indexing a node with key testProp and value test but you go on to ask it from the index with key id and value its id. Since you haven't added that key/value pair in the index, rightfully you don't get any results - the test fails in my setup even with the native Neo4j transaction manager. I changed that to ask the node from the index with the proper key/value pair and the test passes - the same thing happens a bit further down where you ask the index for a node with a key/value of testProp/prop (instead of testProp/test). Moreover, it passes with both the native Transaction Manager and the Atomikos implementation. Also, you are not deleting the db for the test - this means that since you add to the index nodes with the same key/value the test will pass only on the first run as getSingle() on the index hits will find the previously added nodes and it will fail. Could you try that out and see if it solves your issues? I am glad that this functionality is being used in production - please provide any feedback on any problems and what you think of this feature. hope that helps, CG On Thu, Oct 6, 2011 at 7:50 PM, tcolartco...@colar.netwrote: I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list
[Neo4j] Trying to use Neo4J with Atomikos transaction manager, issues with Lucene index
I've been trying to make this work for a few days but while it mostly works, the Lucene index just won't. We have a fairly complex setup including neo4j, mysql, mongo and JMS ad trying to do transactions accross all that with Atomikos. Since that is quite complex, I've made a smaller unit test just using Atomikos and Neo4j to demonstrate the issue: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j The main test is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/test/java/net/colar/atomikosNeo4j/AtomikosNeo4jTest.java and results: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/test.log I used http://digitalstain.blogspot.com/2010/11/using-jotm-as-transactionmanager-in.html to get me going. And my code for that part is here: https://bitbucket.org/tcolar/stuff/src/ddd17191e9a4/AtomikosNeo4j/src/main/java/net/colar/atomikosNeo4j I'm thinking that's probably where I'm doing something wrong maybe ? I'm probably not doing something right but i can't seem to find what's going on with Lucene. The test works if not using Atomikos but just plain Neo4j Transactions. Anybody as an idea what is wrong? Thanks. -- View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Trying-to-use-Neo4J-with-Atomikos-transaction-manager-issues-with-Lucene-index-tp3400319p3400319.html Sent from the Neo4j Community Discussions mailing list archive at Nabble.com. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user