tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Detected Reentrant Flush
Date Sun, 08 Jul 2012 20:39:32 GMT
can you share a small sample to reproduce it, will be easier to help you?

- Romain


2012/7/8 David Nordahl <david@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<david@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("cow@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
>>>
>>>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message