[Resin-interest] resin 4.0.37 : a closed EntityManager
Hello I'm testing 4.0.37 on a real app (on macosx 10.8.5) and I have a frequent error that cannot be reproduced in small sample. Scenario : - when I open the home page, that contains many sql and entity manager requests, I have no error - then I try to login, this starts an ajax call with : * entitymanager.find(Status.class,maintainanceflag); = ok * entitymanager.createQuery(select mb from Memberpro mb); = ok * ListMemberpro list=(ListMemberpro)hqr.getResultList(); = generates the error (see below stacktrace). I have nowhere closed the Entity Manager, I don't know how to do that ! If I go step by step in java code thanks to intellij debugger, the error does not appear. I used to have this error sometimes on night processes with 4.0.13, but now it is all the time and in http requests. I cannot find information on resin 4 documentation, and nothing on google. The only tutorial I found was about resin 3 with amber :) The entity manager is declared this way in java : @Inject public EntityManager m_entitymanager; and in resin.xml : ejb-server data-source=realty/jdbc create-database-schema=false/ Can someone explain what's probably wrong ? Thanks a lot. ERR[13-09-30 17:43:39.739] {resin-port-8000-45} java.lang.IllegalStateException: Attempting to execute an operation on a closed EntityManager. ERR[13-09-30 17:43:39.739] {resin-port-8000-45} at org.eclipse.persistence.internal.jpa.EntityManagerImpl.verifyOpen(EntityManagerImpl.java:1704) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:390) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at rearequesthandler.JsPro.ProLogin(JsPro.java:340) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at rearequesthandler.JsPro.Service(JsPro.java:48) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at realty.UrlRouter.service(UrlRouter.java:78) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at javax.servlet.http.HttpServlet.service(HttpServlet.java:97) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.filters.GzipFilter.doFilter(GzipFilter.java:149) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.server.httpcache.ProxyCacheFilterChain.doFilter(ProxyCacheFilterChain.java:170) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1346) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1302) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1286) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1194) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:993) ERR[13-09-30 17:43:39.740] {resin-port-8000-45} at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117) ERR[13-09-30 17:43:39.741] {resin-port-8000-45} at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93) ERR[13-09-30 17:43:39.741] {resin-port-8000-45} at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169) ERR[13-09-30 17:43:39.741] {resin-port-8000-45} at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61) ERR[13-09-30 17:43:39.741] {resin-port-8000-45} at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173) ERR[13-09-30 17:43:39.741] {resin-port-8000-45} at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118) -- Riccardo Cohen +33 (0)6 09 83 64 49 Société Realty-Property.com 16 rue de Belle Isle 37100 Tours France http://www.appartement-maison.fr ___ resin-interest mailing list resin-interest@caucho.com
[Resin-interest] Resin 4.0.37 via Eclipse Plugin
Within Eclipse I did the following: 1) Went to New -- Dynamic Web Project 2) Selected Resin 4.0 as my Target runtime on the dialog that pops up 3) Left Default Configuration for Resin 4.0 selected under Configuration 4) Selected Generate web.xml deployment descriptor 5) On the Server tab, I right-click -- New -- Server and select Resin -- Resin 4.0 and mainly Next, Next, Next until done. Now when I try to start the new Server (which should be sitting on port 8080) it errors out with: com.caucho.config.core.ResinImport.init(): Required file 'C:\...\Servers\Resin 4.0 at localhost-config\cluster-default.xml' can not be read for resin:import. Is this expected? Can someone point me to a web page that shows me how to create or setup the cluster-default.xml? Or is there a better way to get a Resin Server up and running using Eclipse than the steps I took? Or maybe my plugin is too old? I'm just sorta lost on where to go from here. Thanks, Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Resin 4.0.37 via Eclipse Plugin
Ah, I just tried going about it a completely different way. I started with Help -- Install new updates, threw in Caucho and found the Resin URL and installed it. Now it's all working nicely. Must have been due to my old plugin or something. Thanks, Aaron -Original Message- From: resin-interest-boun...@caucho.com [mailto:resin-interest- boun...@caucho.com] On Behalf Of Aaron Freeman Sent: Monday, September 30, 2013 3:28 PM To: 'General Discussion for the Resin application server' Subject: [Resin-interest] Resin 4.0.37 via Eclipse Plugin Within Eclipse I did the following: 1) Went to New -- Dynamic Web Project 2) Selected Resin 4.0 as my Target runtime on the dialog that pops up 3) Left Default Configuration for Resin 4.0 selected under Configuration 4) Selected Generate web.xml deployment descriptor 5) On the Server tab, I right-click -- New -- Server and select Resin -- Resin 4.0 and mainly Next, Next, Next until done. Now when I try to start the new Server (which should be sitting on port 8080) it errors out with: com.caucho.config.core.ResinImport.init(): Required file 'C:\...\Servers\Resin 4.0 at localhost-config\cluster-default.xml' can not be read for resin:import. Is this expected? Can someone point me to a web page that shows me how to create or setup the cluster-default.xml? Or is there a better way to get a Resin Server up and running using Eclipse than the steps I took? Or maybe my plugin is too old? I'm just sorta lost on where to go from here. Thanks, Aaron ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest