Re: [Resin-interest] database config shouldbeinitializedbeforeany singleton beans
Hi Scott, Congratulations for the new release. It seems that 3.1.6 release does not have this bug fixed. It's really a stop bug for me and prevents the whole webapp from starting. -Wesley - Original Message - From: Scott Ferguson [EMAIL PROTECTED] To: General Discussion for the Resin application server resin-interest@caucho.com Sent: Monday, May 05, 2008 9:54 PM Subject: Re: [Resin-interest] database config shouldbeinitializedbeforeany singleton beans On May 4, 2008, at 8:39 PM, wesley wrote: I've set logging to finer and found datasource being initialized after AmberContainer parsing persistence.xml. After some tracing, I think the issue is also an order problem. After resin server initialized, it began to init the webapp, at the order below: 1. Look at persistence.xml and try to init an AmberContainer. 2. Parse resin-web.xml to init DataSource, JCA connectors, EJBs and Singletons. Note, at the first step method getJtaDataSource() of com.caucho.amber.cfg.PersistenceUnitConfig will be called. It tried to find a DataSource in JNDI and failed, because a DataSource will be available in JNDI until the 2nd step finished. Ok. This use of PersistenceUnitConfig should be lazy. Resin can register the PersistenceUnit/PersistenceContext before initializing the provider. thanks, I'd missed that case. http://bugs.caucho.com/view.php?id=2648 I'm using hibernate persistence provider. Now I'm frustrated. How could we managed to garantee these init orders? 1. First of all, DataSource in resin-web.xml to make sure a DataSource being registered. 2. persisence.xml to make sure any @PersistenceUnit and @PersistenceContext injection available. * This would be split into two parts: registering the @PersistenceUnit and a later start() phase. 3. JCA connectors (if any) in resin-web.xml. * 4. EJBs in resin-web.xml (if any). Why should EJBs be initialized after persistence.xml? It may need to inject a @PersistenceUnit. EJBs also have a 2-phase init process, so the same idea applies. -- Scott 5. Singletons in resin-web.xml. * 2 3 may be reversed. Any ideas? -Wesley - Original Message - From: Scott Ferguson [EMAIL PROTECTED] To: General Discussion for the Resin application server resin-interest@caucho.com Sent: Monday, May 05, 2008 6:11 AM Subject: Re: [Resin-interest] database config should beinitializedbeforeany singleton beans On May 4, 2008, at 1:17 PM, wesley wrote: Hi Scott, Is this issue resolved in snapshot0502? I've tried 0502 snapshot and found my singleton beans still throwing the same exception: java.lang.UnsupportedOperationException: The user must supply a JDBC connection I believe that the same problem still exists: DataSource SHOULD be initialized and be put in JNDI registry before the singletons try to find it. That should be a different issue. That stack trace is happening at the end of the initialization, so all the data sources would already be initialized. If you set the logging to finer do you see the database getting registered? -- Scott stacktrace at web-app initialing phase == [04:08:57.373] {resin-15} java.lang.UnsupportedOperationException: The user must supply a JDBC connection [04:08:57.373] {resin-15} at org .hibernate .connection .UserSuppliedConnectionProvider .getConnection(UserSuppliedConnectionProvider.java:30) [04:08:57.373] {resin-15} at org .hibernate .jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) [04:08:57.373] {resin-15} at org .hibernate .jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) [04:08:57.373] {resin-15} at org .hibernate .jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java: 139) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.doQuery(Loader.java:673) [04:08:57.373] {resin-15} at org .hibernate .loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java: 236) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.doList(Loader.java:2213) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.list(Loader.java:2099) [04:08:57.373] {resin-15} at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) [04:08:57.373] {resin-15} at org .hibernate .hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java: 338) [04:08:57.373] {resin-15} at org .hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java: 172) [04:08:57.373] {resin-15} at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) [04:08:57.373] {resin-15} at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) [04:08:57.373] {resin-15} at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:65)
Re: [Resin-interest] database config shouldbeinitializedbeforeanysingleton beans
As you can see for yourself the bug is still marked as open in Mantis so it will probably/hopefully be fixed until next release. If you want to increase the chances of the bug being fixed soon (and have a workaround meanwhile), fix it yourself and attach your suggested patch to the bug report. /Mattias - Original Message - Subject: Re: [Resin-interest] config shouldbeinitializedbeforeanysingleton beans Date: Thu, 8 May 2008 01:30:35 +0800 From: wesley Hi Scott, Congratulations for the new release. It seems that 3.1.6 release does not have this bug fixed. It's really a stop bug for me and prevents the whole webapp from starting. -Wesley - Original Message - From: Scott Ferguson To: General Discussion for the Resin application server Sent: Monday, May 05, 2008 9:54 PM Subject: Re: [Resin-interest] config shouldbeinitializedbeforeany singleton beans On May 4, 2008, at 8:39 PM, wesley wrote: I've set logging to finer and found datasource being initialized after AmberContainer parsing persistence.xml. After some tracing, I think the issue is also an order problem. After resin server initialized, it began to init the webapp, at the order below: 1. Look at persistence.xml and try to init an AmberContainer. 2. Parse resin-web.xml to init DataSource, JCA connectors, EJBs and Singletons. Note, at the first step method getJtaDataSource() of com.caucho.amber.cfg.PersistenceUnitConfig will be called. It tried to find a DataSource in JNDI and failed, because a DataSource will be available in JNDI until the 2nd step finished. Ok. This use of PersistenceUnitConfig should be lazy. Resin can register the PersistenceUnit/PersistenceContext before initializing the provider. thanks, I'd missed that case. http://bugs.caucho.com/view.php?id=2648 I'm using hibernate persistence provider. Now I'm frustrated. How could we managed to garantee these init orders? 1. First of all, DataSource in resin-web.xml to make sure a DataSource being registered. 2. persisence.xml to make sure any @PersistenceUnit and @PersistenceContext injection available. * This would be split into two parts: registering the @PersistenceUnit and a later start() phase. 3. JCA connectors (if any) in resin-web.xml. * 4. EJBs in resin-web.xml (if any). Why should EJBs be initialized after persistence.xml? It may need to inject a @PersistenceUnit. EJBs also have a 2-phase init process, so the same idea applies. -- Scott 5. Singletons in resin-web.xml. * 2 3 may be reversed. Any ideas? -Wesley - Original Message - From: Scott Ferguson To: General Discussion for the Resin application server Sent: Monday, May 05, 2008 6:11 AM Subject: Re: [Resin-interest] config should beinitializedbeforeany singleton beans On May 4, 2008, at 1:17 PM, wesley wrote: Hi Scott, Is this issue resolved in snapshot0502? I've tried 0502 snapshot and found my singleton beans still throwing the same exception: java.lang.UnsupportedOperationException: The user must supply a JDBC connection I believe that the same problem still exists: DataSource SHOULD be initialized and be put in JNDI registry before the singletons try to find it. That should be a different issue. That stack trace is happening at the end of the initialization, so all the data sources would already be initialized. If you set the logging to finer do you see the database getting registered? -- Scott stacktrace at web-app initialing phase == [04:08:57.373] {resin-15} java.lang.UnsupportedOperationException: The user must supply a JDBC connection [04:08:57.373] {resin-15} at org .hibernate .connection .UserSuppliedConnectionProvider .getConnection(UserSuppliedConnectionProvider.java:30) [04:08:57.373] {resin-15} at org .hibernate .jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) [04:08:57.373] {resin-15} at org .hibernate .jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) [04:08:57.373] {resin-15} at org .hibernate .jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java: 139) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.doQuery(Loader.java:673) [04:08:57.373] {resin-15} at org .hibernate .loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java: 236) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.doList(Loader.java:2213) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.list(Loader.java:2099) [04:08:57.373] {resin-15} at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) [04:08:57.373]
Re: [Resin-interest] database config shouldbeinitializedbeforeanysingleton beans
This issue may be a little hard for me to fix due to the lazy loading of DataSource. I'll wait for the next release. :-) Thanks. -Wesley - Original Message - From: Mattias Jiderhamn [EMAIL PROTECTED] To: resin-interest@caucho.com Sent: Thursday, May 08, 2008 2:22 AM Subject: Re: [Resin-interest] database config shouldbeinitializedbeforeanysingleton beans As you can see for yourself the bug is still marked as open in Mantis so it will probably/hopefully be fixed until next release. If you want to increase the chances of the bug being fixed soon (and have a workaround meanwhile), fix it yourself and attach your suggested patch to the bug report. /Mattias - Original Message - Subject: Re: [Resin-interest] config shouldbeinitializedbeforeanysingleton beans Date: Thu, 8 May 2008 01:30:35 +0800 From: wesley Hi Scott, Congratulations for the new release. It seems that 3.1.6 release does not have this bug fixed. It's really a stop bug for me and prevents the whole webapp from starting. -Wesley - Original Message - From: Scott Ferguson To: General Discussion for the Resin application server Sent: Monday, May 05, 2008 9:54 PM Subject: Re: [Resin-interest] config shouldbeinitializedbeforeany singleton beans On May 4, 2008, at 8:39 PM, wesley wrote: I've set logging to finer and found datasource being initialized after AmberContainer parsing persistence.xml. After some tracing, I think the issue is also an order problem. After resin server initialized, it began to init the webapp, at the order below: 1. Look at persistence.xml and try to init an AmberContainer. 2. Parse resin-web.xml to init DataSource, JCA connectors, EJBs and Singletons. Note, at the first step method getJtaDataSource() of com.caucho.amber.cfg.PersistenceUnitConfig will be called. It tried to find a DataSource in JNDI and failed, because a DataSource will be available in JNDI until the 2nd step finished. Ok. This use of PersistenceUnitConfig should be lazy. Resin can register the PersistenceUnit/PersistenceContext before initializing the provider. thanks, I'd missed that case. http://bugs.caucho.com/view.php?id=2648 I'm using hibernate persistence provider. Now I'm frustrated. How could we managed to garantee these init orders? 1. First of all, DataSource in resin-web.xml to make sure a DataSource being registered. 2. persisence.xml to make sure any @PersistenceUnit and @PersistenceContext injection available. * This would be split into two parts: registering the @PersistenceUnit and a later start() phase. 3. JCA connectors (if any) in resin-web.xml. * 4. EJBs in resin-web.xml (if any). Why should EJBs be initialized after persistence.xml? It may need to inject a @PersistenceUnit. EJBs also have a 2-phase init process, so the same idea applies. -- Scott 5. Singletons in resin-web.xml. * 2 3 may be reversed. Any ideas? -Wesley - Original Message - From: Scott Ferguson To: General Discussion for the Resin application server Sent: Monday, May 05, 2008 6:11 AM Subject: Re: [Resin-interest] config should beinitializedbeforeany singleton beans On May 4, 2008, at 1:17 PM, wesley wrote: Hi Scott, Is this issue resolved in snapshot0502? I've tried 0502 snapshot and found my singleton beans still throwing the same exception: java.lang.UnsupportedOperationException: The user must supply a JDBC connection I believe that the same problem still exists: DataSource SHOULD be initialized and be put in JNDI registry before the singletons try to find it. That should be a different issue. That stack trace is happening at the end of the initialization, so all the data sources would already be initialized. If you set the logging to finer do you see the database getting registered? -- Scott stacktrace at web-app initialing phase == [04:08:57.373] {resin-15} java.lang.UnsupportedOperationException: The user must supply a JDBC connection [04:08:57.373] {resin-15} at org .hibernate .connection .UserSuppliedConnectionProvider .getConnection(UserSuppliedConnectionProvider.java:30) [04:08:57.373] {resin-15} at org .hibernate .jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) [04:08:57.373] {resin-15} at org .hibernate .jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) [04:08:57.373] {resin-15} at org .hibernate .jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java: 139) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.doQuery(Loader.java:673) [04:08:57.373] {resin-15} at org .hibernate .loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:
Re: [Resin-interest] Resin 3.1.6
Scott, Just upgraded 1 test server to 3.1.6. Am using a watchdog conf file with the following in it watchdog id=commswiki resin-conf/var/web/conf/commswiki.conf/resin-conf !-- resin-root/var/web/resin-root -- open-port address=150.237.47.46 port=80/ jvm-arg-Xmx256m/jvm-arg Had to comment out the resin-root... Config entry as it generated an error when I started it Alex On 06/05/2008 23:32, Scott Ferguson [EMAIL PROTECTED] wrote: Resin 3.1.6 is now available. The 3.1.x tree is now the stable version and will contain only bug fixes. New development will go into the 3.2.x tree. The release notes are at http://caucho.com/resin/changes/resin-3.1.6.xtp The detailed changelog is at http://caucho.com/resin/changes/changes.xtp 1. Resin JSF Resin's JSF implementation has been promoted to the 3.1.6 release. The JSF implementation includes a large number of bug fixes and compatibility testing. Resin's JSF includes to important enhancements: direct JSP implementation and Hessian serialization, both of which improve performance and reduce session size. 2. Quercus (PHP) A large number of bug fixes are included in the Quercus release. We've moved our focus to a killer app strategy, where the first priority of Quercus is keeping up to date with new killer app versions. The killer apps are currently: Mediawiki 1.12 (wikipedia) Drupal 6.0 phpBB3 Typo3 Wordpress 2.5.1 3. HMTP (Hessian Message Transport Protocol) http://caucho.com/resin/doc/hmtp.xtp HMTP is all about putting the interactive in RIA (rich interactive applications.) It's a high-performance, bidirectional, asynchronous messaging system based on Hessian and XMPP (Jabber IM). The current implementations are in Java and Flash. The underlying model is a Brokered Agent Messaging (bam), which is the XMPP model. Essentially, it's a hub-and-spoke messaging model with dynamic services. Agents are things like a chat login, or a chat room nickname, or a game's player. We think HMTP is the next step in web interactivity, leapfrogging over the interim Ajax/Comet techniques. 4. scheduled-task http://caucho.com/resin/doc/resources.xtp scheduled-task is a nice convenience bean for scheduling cron jobs. The full cron syntax is supported. scheduled-task can start Runnable beans automatically, or invoke an EL method expression, or execute a URL (convenient for PHP cron scripts.) 5. administration/reliability http://caucho.com/resin/doc/resin-admin.xtp For Resin-Pro, the administration task now checks CPU usage every 60 seconds, either logging the results, or logging a thread dump if the cpu is excessive. It's possible to configure the admin to restart Resin if the CPU usage it too high as wel. 6. logging http://caucho.com/resin/doc/config-log.xtp We've cleaned up the logging a bit, making it easier to configure custom logging Handlers and Formatting tools. In addition, we've split out log-handler as a separate configuration item, which configures the log handlers directly. logger configures the Loggers. (The older log is now discouraged since it combines both and is a bit confusing.) The logging has some new handlers: event:, jms:, and hmtp: which lets you publish logging messages to WebBeans events, JMS, and HMTP respectively. share and enjoy! -- Scott ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest * To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html * ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] database config shouldbeinitializedbeforeany singleton beans
On May 7, 2008, at 10:30 AM, wesley wrote: Hi Scott, Congratulations for the new release. It seems that 3.1.6 release does not have this bug fixed. Yep. The bug was reported way too late to get added in 3.1.6. It should be available in a snapshot by next week. -- Scott It's really a stop bug for me and prevents the whole webapp from starting. -Wesley - Original Message - From: Scott Ferguson [EMAIL PROTECTED] To: General Discussion for the Resin application server resin-interest@caucho.com Sent: Monday, May 05, 2008 9:54 PM Subject: Re: [Resin-interest] database config shouldbeinitializedbeforeany singleton beans On May 4, 2008, at 8:39 PM, wesley wrote: I've set logging to finer and found datasource being initialized after AmberContainer parsing persistence.xml. After some tracing, I think the issue is also an order problem. After resin server initialized, it began to init the webapp, at the order below: 1. Look at persistence.xml and try to init an AmberContainer. 2. Parse resin-web.xml to init DataSource, JCA connectors, EJBs and Singletons. Note, at the first step method getJtaDataSource() of com.caucho.amber.cfg.PersistenceUnitConfig will be called. It tried to find a DataSource in JNDI and failed, because a DataSource will be available in JNDI until the 2nd step finished. Ok. This use of PersistenceUnitConfig should be lazy. Resin can register the PersistenceUnit/PersistenceContext before initializing the provider. thanks, I'd missed that case. http://bugs.caucho.com/view.php?id=2648 I'm using hibernate persistence provider. Now I'm frustrated. How could we managed to garantee these init orders? 1. First of all, DataSource in resin-web.xml to make sure a DataSource being registered. 2. persisence.xml to make sure any @PersistenceUnit and @PersistenceContext injection available. * This would be split into two parts: registering the @PersistenceUnit and a later start() phase. 3. JCA connectors (if any) in resin-web.xml. * 4. EJBs in resin-web.xml (if any). Why should EJBs be initialized after persistence.xml? It may need to inject a @PersistenceUnit. EJBs also have a 2-phase init process, so the same idea applies. -- Scott 5. Singletons in resin-web.xml. * 2 3 may be reversed. Any ideas? -Wesley - Original Message - From: Scott Ferguson [EMAIL PROTECTED] To: General Discussion for the Resin application server resin-interest@caucho.com Sent: Monday, May 05, 2008 6:11 AM Subject: Re: [Resin-interest] database config should beinitializedbeforeany singleton beans On May 4, 2008, at 1:17 PM, wesley wrote: Hi Scott, Is this issue resolved in snapshot0502? I've tried 0502 snapshot and found my singleton beans still throwing the same exception: java.lang.UnsupportedOperationException: The user must supply a JDBC connection I believe that the same problem still exists: DataSource SHOULD be initialized and be put in JNDI registry before the singletons try to find it. That should be a different issue. That stack trace is happening at the end of the initialization, so all the data sources would already be initialized. If you set the logging to finer do you see the database getting registered? -- Scott stacktrace at web-app initialing phase == [04:08:57.373] {resin-15} java.lang.UnsupportedOperationException: The user must supply a JDBC connection [04:08:57.373] {resin-15} at org .hibernate .connection .UserSuppliedConnectionProvider .getConnection(UserSuppliedConnectionProvider.java:30) [04:08:57.373] {resin-15} at org .hibernate .jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) [04:08:57.373] {resin-15} at org .hibernate .jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) [04:08:57.373] {resin-15} at org .hibernate .jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java: 139) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java: 1547) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.doQuery(Loader.java:673) [04:08:57.373] {resin-15} at org .hibernate .loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java: 236) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.doList(Loader.java:2213) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) [04:08:57.373] {resin-15} at org.hibernate.loader.Loader.list(Loader.java:2099) [04:08:57.373] {resin-15} at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) [04:08:57.373] {resin-15} at org .hibernate .hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java: 338) [04:08:57.373] {resin-15} at org .hibernate .engine.query.HQLQueryPlan.performList(HQLQueryPlan.java: 172) [04:08:57.373] {resin-15} at