Ahmed, I tried it both on MacOS and Ubuntu with the following example and it worked fine.
public class Test { public static void main(String[] args) throws IOException { final ImpermanentGraphDatabase graphDb = new ImpermanentGraphDatabase(); try { createNode(graphDb); Transaction outer = graphDb.beginTx(); try { Transaction inner = graphDb.beginTx(); Node node = graphDb.index().forNodes("index").get("name", "Ahmed").getSingle(); node.delete(); graphDb.index().forNodes("index").remove(node); inner.success(); inner.finish(); } finally { outer.success(); outer.finish(); } } finally { graphDb.shutdown(); } } private static void createNode(ImpermanentGraphDatabase graphDb) { final Transaction tx = graphDb.beginTx(); Node node = graphDb.createNode(); graphDb.index().forNodes("index").add(node, "name", "Ahmed"); tx.success(); tx.finish(); } } pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.neo4j</groupId> <artifactId>test</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>neo4j-test</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.neo4j</groupId> <artifactId>neo4j</artifactId> <version>1.4</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> <compilerArgument>-Xlint:all</compilerArgument> <showWarnings>true</showWarnings> <showDeprecation>false</showDeprecation> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <goals> <goal>java</goal> </goals> </execution> </executions> <configuration> <mainClass>org.neo4j.test.Test</mainClass> </configuration> </plugin> </plugins> </build> </project> Am 08.08.2011 um 09:41 schrieb ahmed.elsharkasy: > no the commit of the inner transaction is the which fails (the commit on the > deletion of the node). > > i tried before using only the outer transaction before adding the node > deletion code and it was going on just fine . the inner commit together with > the node deletion is the cause of the problem , this exception is thrown in > tx.finish() of the inner commit > > -- > View this message in context: > http://neo4j-community-discussions.438527.n3.nabble.com/cant-use-index-after-commit-tp3233038p3234793.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