i don't think so, can you try moving your code in a unit test to see if it still happen?
- Romain 2012/7/8 David Nordahl <da...@thinkology.org> > Could it be the Tomcat JDBCRealm I have enforcing container managed > security from user data in the same table? > > > On 7/8/2012 4:14 PM, Romain Manni-Bucau wrote: > >> i can't say no but i'm pretty sure it is something in the container rather >> in the DB. >> >> - Romain >> >> >> 2012/7/8 David Nordahl<da...@thinkology.org> >> >> Maybe the DB settings could have something to do with it? I'm using MySQL >>> with it's default setup which uses InnoDB. I notice in the documentation >>> that "InnoDB, with innodb_flush_log_at_trx_commit set to 1, flushes the >>> transaction log after each transaction, greatly improving reliability." >>> >>> Could some DB setting like this be causing the issue? >>> >>> >>> >>> On 7/8/2012 3:39 PM, Romain Manni-Bucau wrote: >>> >>> can you share a small sample to reproduce it, will be easier to help >>>> you? >>>> >>>> - Romain >>>> >>>> >>>> 2012/7/8 David Nordahl<da...@thinkology.org> >>>> >>>> Not that I've configured.. Unless one of the annotations creates one: >>>> >>>>> @Entity >>>>> @Table(name = "user") >>>>> @XmlRootElement >>>>> @NamedQueries({ >>>>> @NamedQuery(name = "User.findAll", query = "SELECT u FROM User >>>>> u"), >>>>> @NamedQuery(name = "User.findByUserId", query = "SELECT u FROM >>>>> User >>>>> u >>>>> WHERE u.userId = :userId"), >>>>> @NamedQuery(name = "User.findByUserName", query = "SELECT u FROM >>>>> User >>>>> u WHERE u.userName = :userName"), >>>>> @NamedQuery(name = "User.findByPassword", query = "SELECT u FROM >>>>> User >>>>> u WHERE u.password = :password"), >>>>> @NamedQuery(name = "User.findByEmail", query = "SELECT u FROM >>>>> User u >>>>> WHERE u.email = :email"), >>>>> @NamedQuery(name = "User.findByFirstName", query = "SELECT u FROM >>>>> User >>>>> u WHERE u.firstName = :firstName"), >>>>> @NamedQuery(name = "User.findByLastName", query = "SELECT u FROM >>>>> User >>>>> u WHERE u.lastName = :lastName"), >>>>> @NamedQuery(name = "User.findByLoginFailures", query = "SELECT u >>>>> FROM >>>>> User u WHERE u.loginFailures = :loginFailures"), >>>>> @NamedQuery(name = "User.findByLastLoginFailure", query = >>>>> "SELECT u >>>>> FROM User u WHERE u.lastLoginFailure = :lastLoginFailure")}) >>>>> public class User implements Serializable { >>>>> private static final long serialVersionUID = 1L; >>>>> @Id >>>>> @GeneratedValue(strategy = GenerationType.IDENTITY) >>>>> @Basic(optional = false) >>>>> @Column(name = "user_id") >>>>> private Integer userId; >>>>> @Basic(optional = false) >>>>> @Column(name = "user_name") >>>>> private String userName; >>>>> @Basic(optional = false) >>>>> @Column(name = "password") >>>>> private String password; >>>>> @Column(name = "email") >>>>> private String email; >>>>> @Column(name = "first_name") >>>>> private String firstName; >>>>> @Column(name = "last_name") >>>>> private String lastName; >>>>> @Column(name = "login_failures") >>>>> private Integer loginFailures; >>>>> @Column(name = "last_login_failure") >>>>> @Temporal(TemporalType.******TIMESTAMP) >>>>> >>>>> >>>>> private Date lastLoginFailure; >>>>> @JoinColumn(name = "associated_customer", referencedColumnName = >>>>> "customer_id") >>>>> @ManyToOne >>>>> >>>>> >>>>> On 7/8/2012 3:25 PM, Romain Manni-Bucau wrote: >>>>> >>>>> Hi, >>>>> >>>>>> any entity listener playing with id or special field on User entity? >>>>>> >>>>>> - Romain >>>>>> >>>>>> >>>>>> 2012/7/8 David Nordahl<da...@thinkology.org> >>>>>> >>>>>> I'm attempting the code: >>>>>> >>>>>> Properties properties = new Properties(); >>>>>>> properties.setProperty(********Context.INITIAL_CONTEXT_******** >>>>>>> FACTORY, >>>>>>> "org.apache.openejb.client.********LocalInitialContextFactory"**); >>>>>>> >>>>>>> >>>>>>> >>>>>>> InitialContext initialContext = new InitialContext(properties); >>>>>>> Object object = initialContext.lookup("********UserFacadeLocal"); >>>>>>> >>>>>>> >>>>>>> >>>>>>> UserFacadeLocal userFacade = (UserFacadeLocal) object; >>>>>>> User newuser = new User(); >>>>>>> newuser.setEmail("c...@cow.moo"********); >>>>>>> >>>>>>> >>>>>>> >>>>>>> newuser.setUserName("steve"); >>>>>>> newuser.setPassword("cows"); >>>>>>> userFacade.create(newuser); >>>>>>> >>>>>>> but keep getting "org.apache.openjpa.********persistence.**** >>>>>>> >>>>>>> >>>>>>> InvalidStateException: >>>>>>> >>>>>>> Detected reentrant flush. Make sure your flush-time instance >>>>>>> callback >>>>>>> methods or event listeners do not invoke any operations that require >>>>>>> the >>>>>>> in-progress flush to complete." >>>>>>> >>>>>>> I tried setting "openjpa.FlushBeforeQueries" to false just to see if >>>>>>> I >>>>>>> can >>>>>>> get the error to go away, but it makes no difference. I can't find a >>>>>>> flush() call in my project and according to the table in the docs, >>>>>>> flush >>>>>>> is >>>>>>> not called if this parameter is set. What am I not doing correctly >>>>>>> here? >>>>>>> >>>>>>> Thank you, >>>>>>> David >>>>>>> >>>>>>> >>>>>>> >>>>>>>