[deepamehta-devel] Question about "org.neo4j.graphdb.NotInTransactionException" when creating TopicType

Jörg Richter jri at deepamehta.de
Sat Sep 13 20:36:01 CEST 2014

On Sep 13, 2014, at 3:15, Martin Tippmann wrote:

> It's working now with 4.4-SNAPSHOT after adding the transaction code. 

That's good to hear :-)

2014-09-12 21:39 GMT+02:00 Jörg Richter <jri at deepamehta.de>:

> However, if your code is NOT invoked via a HTTP request -- e.g. when you are in a migration or in a test -- you must create the transaction manually [...]

Here I like to correct myself: migrations ARE performed inside a transaction by default. You're NOT required to create a transaction manually in your migrations.

I guess your original mistake was using the @Transactional annotation on a non-resource method. (A "resource method" is one invoked via a HTTP request, that is a method with a @GET, @PUT, ... annotation).


More information about the devel mailing list