tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Nordahl <da...@thinkology.org>
Subject Re: Detected Reentrant Flush - Trouble with merge / update
Date Mon, 09 Jul 2012 23:33:40 GMT
I got it running on the snap shot version, and that did away with those 
four startup exceptions.  I still get the error below though.. Is this 
added line to get the email address what you mean by doing a find on the 
ejb?

String currentEmail = result.getEmail();
result.setEmail("meow@meow.cat");
userFacade.edit(result);



On 7/9/2012 12:15 PM, Romain Manni-Bucau wrote:
> maybe try a find in your ejb before the merge to let you rentity be managed
> and to be allowed to merge.
>
> FYI the snapshot is not the beta-3 but the 1.1.0-SNAPSHOT.
>
> - Romain
>
>
> 2012/7/9 David Nordahl<david@thinkology.org>
>
>> I looked at it again today, and it looks like it is not deploying on the
>> beta3 version for some reason, but I don't see any errors or attempts in
>> the log.  I will look at it more later, but for now I would like to try to
>> work around any issues with the last production release if possible.
>>
>> I can now get queries and inserts to work, but am having trouble with the
>> updates.  It looks like it is also related to auto-increment/generated key
>> stuff.  Perhaps the way I'm going about it is incorrect:
>>
>> 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;
>> EntityManager em = userFacade.getEntityManager();
>> Query query = em.createNamedQuery("User.**findByUserName");
>> query.setParameter("userName", "admin");
>> User result;
>> try {
>>      result = (User) query.getSingleResult();
>> } catch (NoResultException e) {
>>      result = null;
>> }
>> result.setEmail("meow@meow.cat**");
>> userFacade.edit(result);
>>
>> I get the error:
>>
>> "Primary key field com.iball.server.entities.**User.userId of
>> com.iball.server.entities.**User@64def7 has non-default value. The
>> instance life cycle is in PNewState state and hence an existing non-default
>> value for the identity field is not permitted. You either need to remove
>> the @GeneratedValue annotation or modify the code to remove the initializer
>> processing."
>>
>> The generated value annotation present is:
>>
>> @Id
>> @GeneratedValue(strategy = GenerationType.IDENTITY)
>> @Basic
>> @Column(name = "user_id")
>> private Integer userId;
>>
>> I also tried GenerationType.AUTO and removing the auto increment setting
>> on the DB but it didn't help
>>
>> The userFacade.edit(result) method is calling getEntityManager().merge(**
>> entity);
>>
>>
>>
>> On 7/9/2012 12:11 AM, Romain Manni-Bucau wrote:
>>
>>> You should at least share your logs or (better) a sample otherwise helping
>>> you is hard. Generally it is faster than 'trying' things.
>>>
>>> - Romun
>>> Le 9 juil. 2012 03:20, "David Nordahl"<david@thinkology.org>   a écrit
:
>>>
>>>   Tried the snap shot.. I get an error in Netbeans saying that it can't
>>>> deploy the app and to check the server log, yet the server log has no
>>>> errors and shows the app deploying successfully yet I cannot open the web
>>>> host in the browser.  I give up... I could have written all the middle
>>>> ware
>>>> needed for this project myself by now.  Thanks for your efforts.
>>>>
>>>> On 7/8/2012 4:56 PM, Romain Manni-Bucau wrote:
>>>>
>>>>   hmm
>>>>> you use tomee 1.0.0
>>>>>
>>>>> can you give it a try to the snapshot please? we worked a bit on
>>>>> netbeans
>>>>> integration.
>>>>>
>>>>> - Romain
>>>>>
>>>>>
>>>>> 2012/7/8 David Nordahl<david@thinkology.org>
>>>>>
>>>>>    Btw.. Is it normal to have these exceptions on startup?  I saw another
>>>>>
>>>>>> post saying they were, but I thought I might double check.  I seem
to
>>>>>> be
>>>>>> able to query through open EJB, but not update and add.  I'm also
>>>>>> wondering
>>>>>> if there is anyway that the reentrant flush error is covering up
>>>>>> another
>>>>>> error.  I guess I can start working on a test case.. I wish I could
>>>>>> just
>>>>>> find a netbeans JSP2.0/EJB/TomEE sample project where everything
was
>>>>>> already setup correctly.
>>>>>>
>>>>>> SEVERE: Error in safeBind method
>>>>>> javax.naming.******NameNotFoundException: Name [openejb] is not bound
>>>>>> in
>>>>>> this
>>>>>> Context. Unable to find [openejb].
>>>>>>        at org.apache.naming.******NamingContext.lookup(****
>>>>>> NamingContext.java:820)
>>>>>>        at org.apache.naming.******NamingContext.lookup(****
>>>>>> NamingContext.java:168)
>>>>>>        at org.apache.tomee.catalina.******
>>>>>> TomcatWebAppBuilder.safeBind(******
>>>>>> TomcatWebAppBuilder.java:1196)
>>>>>>        at org.apache.tomee.catalina.******TomcatWebAppBuilder.****
>>>>>> afterStart(**
>>>>>> TomcatWebAppBuilder.java:776)
>>>>>>        at org.apache.tomee.catalina.******GlobalListenerSupport.****
>>>>>> lifecycleEvent(
>>>>>> **GlobalListenerSupport.java:******103)
>>>>>>        at org.apache.catalina.util.******LifecycleSupport.****
>>>>>> fireLifecycleEvent(**
>>>>>> LifecycleSupport.java:119)
>>>>>>        at org.apache.catalina.util.******LifecycleBase.****
>>>>>> fireLifecycleEvent(**
>>>>>> LifecycleBase.java:90)
>>>>>>        at org.apache.catalina.util.******LifecycleBase.****
>>>>>> setStateInternal(**
>>>>>> LifecycleBase.java:401)
>>>>>>        at org.apache.catalina.util.******LifecycleBase.start(**
>>>>>> LifecycleBase.java:168)
>>>>>>        at org.apache.catalina.core.******ContainerBase.****
>>>>>> addChildInternal(**
>>>>>> ContainerBase.java:895)
>>>>>>        at org.apache.catalina.core.******ContainerBase.addChild(**
>>>>>> ContainerBase.java:871)
>>>>>>        at org.apache.catalina.core.******StandardHost.addChild(**
>>>>>> StandardHost.java:615)
>>>>>>        at org.apache.catalina.startup.****
>>>>>> **HostConfig.deployDescriptor(****
>>>>>> HostConfig.java:649)
>>>>>>        at org.apache.catalina.startup.******HostConfig.deployApps(**
>>>>>> HostConfig.java:530)
>>>>>>        at org.apache.catalina.startup.****
>>>>>> **HostConfig.check(HostConfig.****
>>>>>> java:1471)
>>>>>>        at sun.reflect.******NativeMethodAccessorImpl.******
>>>>>> invoke0(Native
>>>>>> Method)
>>>>>>        at sun.reflect.******NativeMethodAccessorImpl.******invoke(**
>>>>>> NativeMethodAccessorImpl.java:******57)
>>>>>>        at sun.reflect.******DelegatingMethodAccessorImpl.***
>>>>>> ***invoke(**
>>>>>> DelegatingMethodAccessorImpl.******java:43)
>>>>>>        at java.lang.reflect.Method.******invoke(Method.java:601)
>>>>>>        at org.apache.tomcat.util.******modeler.BaseModelMBean.invoke(**
>>>>>> ****
>>>>>> BaseModelMBean.java:301)
>>>>>>        at com.sun.jmx.interceptor.******DefaultMBeanServerInterceptor.*
>>>>>> ***
>>>>>> **invoke(**
>>>>>> DefaultMBeanServerInterceptor.******java:819)
>>>>>>        at com.sun.jmx.mbeanserver.******JmxMBeanServer.invoke(**
>>>>>> JmxMBeanServer.java:791)
>>>>>>        at org.apache.catalina.manager.******ManagerServlet.check(**
>>>>>> ManagerServlet.java:1436)
>>>>>>        at org.apache.catalina.manager.******ManagerServlet.deploy(**
>>>>>> ManagerServlet.java:856)
>>>>>>        at org.apache.catalina.manager.******ManagerServlet.doGet(**
>>>>>> ManagerServlet.java:353)
>>>>>>        at javax.servlet.http.******HttpServlet.service(****
>>>>>> HttpServlet.java:621)
>>>>>>        at javax.servlet.http.******HttpServlet.service(****
>>>>>> HttpServlet.java:722)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.**
>>>>>> internalDoFilter(******ApplicationFilterChain.java:******305)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.****
>>>>>> doFilter(**
>>>>>> ApplicationFilterChain.java:******210)
>>>>>>        at org.apache.catalina.filters.****
>>>>>> **SetCharacterEncodingFilter.****
>>>>>> doFilter(******SetCharacterEncodingFilter.******java:108)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.**
>>>>>> internalDoFilter(******ApplicationFilterChain.java:******243)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.****
>>>>>> doFilter(**
>>>>>> ApplicationFilterChain.java:******210)
>>>>>>        at org.apache.catalina.core.******StandardWrapperValve.invoke(**
>>>>>> StandardWrapperValve.java:225)
>>>>>>        at org.apache.catalina.core.******StandardContextValve.invoke(**
>>>>>> StandardContextValve.java:169)
>>>>>>        at org.apache.tomee.catalina.******OpenEJBValve.invoke(**
>>>>>> OpenEJBValve.java:44)
>>>>>>        at org.apache.catalina.******authenticator.****
>>>>>> AuthenticatorBase.invoke(**
>>>>>> AuthenticatorBase.java:581)
>>>>>>        at org.apache.catalina.core.******StandardHostValve.invoke(**
>>>>>> StandardHostValve.java:168)
>>>>>>        at org.apache.catalina.valves.******ErrorReportValve.invoke(**
>>>>>> ErrorReportValve.java:98)
>>>>>>        at org.apache.catalina.valves.******AccessLogValve.invoke(**
>>>>>> AccessLogValve.java:927)
>>>>>>        at org.apache.catalina.core.******StandardEngineValve.invoke(**
>>>>>> StandardEngineValve.java:118)
>>>>>>        at org.apache.catalina.connector.******CoyoteAdapter.service(**
>>>>>> CoyoteAdapter.java:407)
>>>>>>        at org.apache.coyote.http11.******AbstractHttp11Processor.****
>>>>>> process(**
>>>>>> AbstractHttp11Processor.java:******999)
>>>>>>        at org.apache.coyote.******AbstractProtocol$****
>>>>>> AbstractConnectionHandler.**
>>>>>> process(AbstractProtocol.java:******565)
>>>>>>        at org.apache.tomcat.util.net.*****
>>>>>> *JIoEndpoint$SocketProcessor.****
>>>>>> run(JIoEndpoint.java:309)
>>>>>>        at java.util.concurrent.******ThreadPoolExecutor.runWorker(***
>>>>>> ***
>>>>>> ThreadPoolExecutor.java:1110)
>>>>>>        at java.util.concurrent.******ThreadPoolExecutor$Worker.run(**
>>>>>> ****
>>>>>> ThreadPoolExecutor.java:603)
>>>>>>        at java.lang.Thread.run(Thread.******java:722)
>>>>>>
>>>>>> Jul 08, 2012 4:40:06 PM org.apache.tomee.catalina.****
>>>>>> TomcatWebAppBuilder
>>>>>> safeBind
>>>>>> INFO: TransactionManager already bound, ignoring
>>>>>> Jul 08, 2012 4:40:06 PM org.apache.tomee.catalina.****
>>>>>> TomcatWebAppBuilder
>>>>>> safeBind
>>>>>> INFO: TransactionSynchronizationRegi******stry already bound, ignoring
>>>>>> Jul 08, 2012 4:40:06 PM org.apache.tomee.catalina.****
>>>>>> TomcatWebAppBuilder
>>>>>> safeBind
>>>>>> SEVERE: Error in safeBind method
>>>>>> javax.naming.******NameNotFoundException: No ORB registered with
the
>>>>>> OpenEJB
>>>>>> system
>>>>>>        at org.apache.openejb.core.ivm.******naming.****
>>>>>> SystemComponentReference.**
>>>>>> getObject(******SystemComponentReference.java:******38)
>>>>>>        at org.apache.openejb.core.ivm.****
>>>>>> **naming.Reference.getContent(****
>>>>>> Reference.java:40)
>>>>>>        at org.apache.xbean.naming.******reference.SimpleReference$**
>>>>>> SimpleObjectFactory.******getObjectInstance(******
>>>>>> SimpleReference.java:137)
>>>>>>        at javax.naming.spi.******NamingManager.******
>>>>>> getObjectInstance(**
>>>>>> NamingManager.java:321)
>>>>>>        at org.apache.naming.******NamingContext.lookup(****
>>>>>> NamingContext.java:843)
>>>>>>        at org.apache.naming.******NamingContext.lookup(****
>>>>>> NamingContext.java:168)
>>>>>>        at org.apache.tomee.catalina.******
>>>>>> TomcatWebAppBuilder.safeBind(******
>>>>>> TomcatWebAppBuilder.java:1196)
>>>>>>        at org.apache.tomee.catalina.******TomcatWebAppBuilder.****
>>>>>> afterStart(**
>>>>>> TomcatWebAppBuilder.java:806)
>>>>>>        at org.apache.tomee.catalina.******GlobalListenerSupport.****
>>>>>> lifecycleEvent(
>>>>>> **GlobalListenerSupport.java:******103)
>>>>>>        at org.apache.catalina.util.******LifecycleSupport.****
>>>>>> fireLifecycleEvent(**
>>>>>> LifecycleSupport.java:119)
>>>>>>        at org.apache.catalina.util.******LifecycleBase.****
>>>>>> fireLifecycleEvent(**
>>>>>> LifecycleBase.java:90)
>>>>>>        at org.apache.catalina.util.******LifecycleBase.****
>>>>>> setStateInternal(**
>>>>>> LifecycleBase.java:401)
>>>>>>        at org.apache.catalina.util.******LifecycleBase.start(**
>>>>>> LifecycleBase.java:168)
>>>>>>        at org.apache.catalina.core.******ContainerBase.****
>>>>>> addChildInternal(**
>>>>>> ContainerBase.java:895)
>>>>>>        at org.apache.catalina.core.******ContainerBase.addChild(**
>>>>>> ContainerBase.java:871)
>>>>>>        at org.apache.catalina.core.******StandardHost.addChild(**
>>>>>> StandardHost.java:615)
>>>>>>        at org.apache.catalina.startup.****
>>>>>> **HostConfig.deployDescriptor(****
>>>>>> HostConfig.java:649)
>>>>>>        at org.apache.catalina.startup.******HostConfig.deployApps(**
>>>>>> HostConfig.java:530)
>>>>>>        at org.apache.catalina.startup.****
>>>>>> **HostConfig.check(HostConfig.****
>>>>>> java:1471)
>>>>>>        at sun.reflect.******NativeMethodAccessorImpl.******
>>>>>> invoke0(Native
>>>>>> Method)
>>>>>>        at sun.reflect.******NativeMethodAccessorImpl.******invoke(**
>>>>>> NativeMethodAccessorImpl.java:******57)
>>>>>>        at sun.reflect.******DelegatingMethodAccessorImpl.***
>>>>>> ***invoke(**
>>>>>> DelegatingMethodAccessorImpl.******java:43)
>>>>>>        at java.lang.reflect.Method.******invoke(Method.java:601)
>>>>>>        at org.apache.tomcat.util.******modeler.BaseModelMBean.invoke(**
>>>>>> ****
>>>>>> BaseModelMBean.java:301)
>>>>>>        at com.sun.jmx.interceptor.******DefaultMBeanServerInterceptor.*
>>>>>> ***
>>>>>> **invoke(**
>>>>>> DefaultMBeanServerInterceptor.******java:819)
>>>>>>        at com.sun.jmx.mbeanserver.******JmxMBeanServer.invoke(**
>>>>>> JmxMBeanServer.java:791)
>>>>>>        at org.apache.catalina.manager.******ManagerServlet.check(**
>>>>>> ManagerServlet.java:1436)
>>>>>>        at org.apache.catalina.manager.******ManagerServlet.deploy(**
>>>>>> ManagerServlet.java:856)
>>>>>>        at org.apache.catalina.manager.******ManagerServlet.doGet(**
>>>>>> ManagerServlet.java:353)
>>>>>>        at javax.servlet.http.******HttpServlet.service(****
>>>>>> HttpServlet.java:621)
>>>>>>        at javax.servlet.http.******HttpServlet.service(****
>>>>>> HttpServlet.java:722)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.**
>>>>>> internalDoFilter(******ApplicationFilterChain.java:******305)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.****
>>>>>> doFilter(**
>>>>>> ApplicationFilterChain.java:******210)
>>>>>>        at org.apache.catalina.filters.****
>>>>>> **SetCharacterEncodingFilter.****
>>>>>> doFilter(******SetCharacterEncodingFilter.******java:108)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.**
>>>>>> internalDoFilter(******ApplicationFilterChain.java:******243)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.****
>>>>>> doFilter(**
>>>>>> ApplicationFilterChain.java:******210)
>>>>>>        at org.apache.catalina.core.******StandardWrapperValve.invoke(**
>>>>>> StandardWrapperValve.java:225)
>>>>>>        at org.apache.catalina.core.******StandardContextValve.invoke(**
>>>>>> StandardContextValve.java:169)
>>>>>>        at org.apache.tomee.catalina.******OpenEJBValve.invoke(**
>>>>>> OpenEJBValve.java:44)
>>>>>>        at org.apache.catalina.******authenticator.****
>>>>>> AuthenticatorBase.invoke(**
>>>>>> AuthenticatorBase.java:581)
>>>>>>        at org.apache.catalina.core.******StandardHostValve.invoke(**
>>>>>> StandardHostValve.java:168)
>>>>>>        at org.apache.catalina.valves.******ErrorReportValve.invoke(**
>>>>>> ErrorReportValve.java:98)
>>>>>>        at org.apache.catalina.valves.******AccessLogValve.invoke(**
>>>>>> AccessLogValve.java:927)
>>>>>>        at org.apache.catalina.core.******StandardEngineValve.invoke(**
>>>>>> StandardEngineValve.java:118)
>>>>>>        at org.apache.catalina.connector.******CoyoteAdapter.service(**
>>>>>> CoyoteAdapter.java:407)
>>>>>>        at org.apache.coyote.http11.******AbstractHttp11Processor.****
>>>>>> process(**
>>>>>> AbstractHttp11Processor.java:******999)
>>>>>>        at org.apache.coyote.******AbstractProtocol$****
>>>>>> AbstractConnectionHandler.**
>>>>>> process(AbstractProtocol.java:******565)
>>>>>>        at org.apache.tomcat.util.net.*****
>>>>>> *JIoEndpoint$SocketProcessor.****
>>>>>> run(JIoEndpoint.java:309)
>>>>>>        at java.util.concurrent.******ThreadPoolExecutor.runWorker(***
>>>>>> ***
>>>>>> ThreadPoolExecutor.java:1110)
>>>>>>        at java.util.concurrent.******ThreadPoolExecutor$Worker.run(**
>>>>>> ****
>>>>>> ThreadPoolExecutor.java:603)
>>>>>>        at java.lang.Thread.run(Thread.******java:722)
>>>>>>
>>>>>> Jul 08, 2012 4:40:43 PM org.apache.tomee.catalina.****
>>>>>> TomcatWebAppBuilder
>>>>>> safeBind
>>>>>> SEVERE: Error in safeBind method
>>>>>> javax.naming.******NameNotFoundException: No HandleDelegate registered
>>>>>> with
>>>>>> the OpenEJB system
>>>>>>        at org.apache.openejb.core.ivm.******naming.****
>>>>>> SystemComponentReference.**
>>>>>> getObject(******SystemComponentReference.java:******38)
>>>>>>        at org.apache.openejb.core.ivm.****
>>>>>> **naming.Reference.getContent(****
>>>>>> Reference.java:40)
>>>>>>        at org.apache.xbean.naming.******reference.SimpleReference$**
>>>>>> SimpleObjectFactory.******getObjectInstance(******
>>>>>> SimpleReference.java:137)
>>>>>>        at javax.naming.spi.******NamingManager.******
>>>>>> getObjectInstance(**
>>>>>> NamingManager.java:321)
>>>>>>        at org.apache.naming.******NamingContext.lookup(****
>>>>>> NamingContext.java:843)
>>>>>>        at org.apache.naming.******NamingContext.lookup(****
>>>>>> NamingContext.java:168)
>>>>>>        at org.apache.tomee.catalina.******
>>>>>> TomcatWebAppBuilder.safeBind(******
>>>>>> TomcatWebAppBuilder.java:1196)
>>>>>>        at org.apache.tomee.catalina.******TomcatWebAppBuilder.****
>>>>>> afterStart(**
>>>>>> TomcatWebAppBuilder.java:807)
>>>>>>        at org.apache.tomee.catalina.******GlobalListenerSupport.****
>>>>>> lifecycleEvent(
>>>>>> **GlobalListenerSupport.java:******103)
>>>>>>        at org.apache.catalina.util.******LifecycleSupport.****
>>>>>> fireLifecycleEvent(**
>>>>>> LifecycleSupport.java:119)
>>>>>>        at org.apache.catalina.util.******LifecycleBase.****
>>>>>> fireLifecycleEvent(**
>>>>>> LifecycleBase.java:90)
>>>>>>        at org.apache.catalina.util.******LifecycleBase.****
>>>>>> setStateInternal(**
>>>>>> LifecycleBase.java:401)
>>>>>>        at org.apache.catalina.util.******LifecycleBase.start(**
>>>>>> LifecycleBase.java:168)
>>>>>>        at org.apache.catalina.core.******ContainerBase.****
>>>>>> addChildInternal(**
>>>>>> ContainerBase.java:895)
>>>>>>        at org.apache.catalina.core.******ContainerBase.addChild(**
>>>>>> ContainerBase.java:871)
>>>>>>        at org.apache.catalina.core.******StandardHost.addChild(**
>>>>>> StandardHost.java:615)
>>>>>>        at org.apache.catalina.startup.****
>>>>>> **HostConfig.deployDescriptor(****
>>>>>> HostConfig.java:649)
>>>>>>        at org.apache.catalina.startup.******HostConfig.deployApps(**
>>>>>> HostConfig.java:530)
>>>>>>        at org.apache.catalina.startup.****
>>>>>> **HostConfig.check(HostConfig.****
>>>>>> java:1471)
>>>>>>        at sun.reflect.******NativeMethodAccessorImpl.******
>>>>>> invoke0(Native
>>>>>> Method)
>>>>>>        at sun.reflect.******NativeMethodAccessorImpl.******invoke(**
>>>>>> NativeMethodAccessorImpl.java:******57)
>>>>>>        at sun.reflect.******DelegatingMethodAccessorImpl.***
>>>>>> ***invoke(**
>>>>>> DelegatingMethodAccessorImpl.******java:43)
>>>>>>        at java.lang.reflect.Method.******invoke(Method.java:601)
>>>>>>        at org.apache.tomcat.util.******modeler.BaseModelMBean.invoke(**
>>>>>> ****
>>>>>> BaseModelMBean.java:301)
>>>>>>        at com.sun.jmx.interceptor.******DefaultMBeanServerInterceptor.*
>>>>>> ***
>>>>>> **invoke(**
>>>>>> DefaultMBeanServerInterceptor.******java:819)
>>>>>>        at com.sun.jmx.mbeanserver.******JmxMBeanServer.invoke(**
>>>>>> JmxMBeanServer.java:791)
>>>>>>        at org.apache.catalina.manager.******ManagerServlet.check(**
>>>>>> ManagerServlet.java:1436)
>>>>>>        at org.apache.catalina.manager.******ManagerServlet.deploy(**
>>>>>> ManagerServlet.java:856)
>>>>>>        at org.apache.catalina.manager.******ManagerServlet.doGet(**
>>>>>> ManagerServlet.java:353)
>>>>>>        at javax.servlet.http.******HttpServlet.service(****
>>>>>> HttpServlet.java:621)
>>>>>>        at javax.servlet.http.******HttpServlet.service(****
>>>>>> HttpServlet.java:722)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.**
>>>>>> internalDoFilter(******ApplicationFilterChain.java:******305)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.****
>>>>>> doFilter(**
>>>>>> ApplicationFilterChain.java:******210)
>>>>>>        at org.apache.catalina.filters.****
>>>>>> **SetCharacterEncodingFilter.****
>>>>>> doFilter(******SetCharacterEncodingFilter.******java:108)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.**
>>>>>> internalDoFilter(******ApplicationFilterChain.java:******243)
>>>>>>        at org.apache.catalina.core.******ApplicationFilterChain.****
>>>>>> doFilter(**
>>>>>> ApplicationFilterChain.java:******210)
>>>>>>        at org.apache.catalina.core.******StandardWrapperValve.invoke(**
>>>>>> StandardWrapperValve.java:225)
>>>>>>        at org.apache.catalina.core.******StandardContextValve.invoke(**
>>>>>> StandardContextValve.java:169)
>>>>>>        at org.apache.tomee.catalina.******OpenEJBValve.invoke(**
>>>>>> OpenEJBValve.java:44)
>>>>>>        at org.apache.catalina.******authenticator.****
>>>>>> AuthenticatorBase.invoke(**
>>>>>> AuthenticatorBase.java:581)
>>>>>>        at org.apache.catalina.core.******StandardHostValve.invoke(**
>>>>>> StandardHostValve.java:168)
>>>>>>        at org.apache.catalina.valves.******ErrorReportValve.invoke(**
>>>>>> ErrorReportValve.java:98)
>>>>>>        at org.apache.catalina.valves.******AccessLogValve.invoke(**
>>>>>> AccessLogValve.java:927)
>>>>>>        at org.apache.catalina.core.******StandardEngineValve.invoke(**
>>>>>> StandardEngineValve.java:118)
>>>>>>        at org.apache.catalina.connector.******CoyoteAdapter.service(**
>>>>>> CoyoteAdapter.java:407)
>>>>>>        at org.apache.coyote.http11.******AbstractHttp11Processor.****
>>>>>> process(**
>>>>>> AbstractHttp11Processor.java:******999)
>>>>>>        at org.apache.coyote.******AbstractProtocol$****
>>>>>> AbstractConnectionHandler.**
>>>>>> process(AbstractProtocol.java:******565)
>>>>>>        at org.apache.tomcat.util.net.*****
>>>>>> *JIoEndpoint$SocketProcessor.****
>>>>>> run(JIoEndpoint.java:309)
>>>>>>        at java.util.concurrent.******ThreadPoolExecutor.runWorker(***
>>>>>> ***
>>>>>> ThreadPoolExecutor.java:1110)
>>>>>>        at java.util.concurrent.******ThreadPoolExecutor$Worker.run(**
>>>>>> ****
>>>>>> ThreadPoolExecutor.java:603)
>>>>>>        at java.lang.Thread.run(Thread.******java:722)
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 7/8/2012 4:32 PM, Romain Manni-Bucau wrote:
>>>>>>
>>>>>>    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<david@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<david@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<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
View raw message