|
From: Colin S. <col...@ex...> - 2004-11-13 00:08:56
|
I am seeing extremely strange, completely repeatable behaviour, where
Petclinc in both the JDBC and the hibernate deployment, using HSQL,
starts up ok in JBoss 3.2.5, but hangs after a certain point in JBoss
3.2.6. The ejbtest sample does exactly the same thing. Weird thing in
3.2.6 is that if I shut down the external HSQL db (started with the
server.bat file), then the app starts fine (getting some obvious errors
since it can't actually talk to the db, but doesn't hang). This means
the issues are somehow related to HSQL in the 3.2.6 environment.
Here's the sequence from the JDBC version:
18:51:31,218 INFO [DefaultListableBeanFactory] Creating shared instance of sing
leton bean 'dataSource'
18:51:31,234 INFO [DriverManagerDataSource] Loaded JDBC driver: org.hsqldb.jdbc
Driver
18:51:31,234 INFO [DefaultListableBeanFactory] Creating shared instance of sing
leton bean 'transactionManager'
18:51:31,250 INFO [DefaultListableBeanFactory] Creating shared instance of sing
leton bean 'clinic'
18:51:31,296 INFO [DefaultListableBeanFactory] Creating shared instance of sing
leton bean 'hsqlClinic'
18:51:31,406 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from c
lass path resource [org/springframework/jdbc/support/sql-error-codes.xml]
18:51:31,421 INFO [XmlBeanFactory] Creating shared instance of singleton bean '
DB2'
18:51:31,437 INFO [XmlBeanFactory] Creating shared instance of singleton bean '
HSQL'
18:51:31,437 INFO [XmlBeanFactory] Creating shared instance of singleton bean '
MS-SQL'
18:51:31,437 INFO [XmlBeanFactory] Creating shared instance of singleton bean '
MySQL'
18:51:31,437 INFO [XmlBeanFactory] Creating shared instance of singleton bean '
Oracle'
18:51:31,437 INFO [XmlBeanFactory] Creating shared instance of singleton bean '
Informix'
18:51:31,437 INFO [XmlBeanFactory] Creating shared instance of singleton bean '
PostgreSQL'
18:51:31,437 INFO [XmlBeanFactory] Creating shared instance of singleton bean '
Sybase'
18:51:31,437 INFO [SQLErrorCodesFactory] SQLErrorCodes loaded: [HSQL Database E
ngine, Oracle, Sybase SQL Server, Informix Dynamic Server, Microsoft SQL Server,
PostgreSQL, MySQL, DB2*]
at this point, in JBoss 3.2.6, there is a hang, while 3.2.5 continues with items below:
18:51:31,500 INFO [AbstractJdbcClinic$VetsQuery] RdbmsOperation with SQL [SELEC
T id,first_name,last_name FROM vets ORDER BY last_name,first_name] compiled
18:51:31,500 INFO [AbstractJdbcClinic$SpecialtiesQuery] RdbmsOperation with SQL
[SELECT id,name FROM specialties] compiled
18:51:31,515 INFO [AbstractJdbcClinic$VetSpecialtiesQuery] RdbmsOperation with
SQL [SELECT specialty_id FROM vet_specialties WHERE vet_id=?] compiled
... and so on
The Hibernate version has this sequence:
18:55:57,421 INFO [DefaultListableBeanFactory] Creating shared instance of sing
leton bean 'dataSource'
18:55:57,421 INFO [DriverManagerDataSource] Loaded JDBC driver: org.hsqldb.jdbc
Driver
18:55:57,437 INFO [DefaultListableBeanFactory] Creating shared instance of sing
leton bean 'sessionFactory'
18:55:57,468 INFO [Environment] Hibernate 2.1.6
18:55:57,468 INFO [Environment] hibernate.properties not found
18:55:57,484 INFO [Environment] using CGLIB reflection optimizer
18:55:57,640 INFO [Binder] Mapping class: org.springframework.samples.petclinic
.Vet -> vets
18:55:57,812 INFO [Binder] Mapping collection: org.springframework.samples.petc
linic.Vet.specialtiesInternal -> vet_specialties
18:55:57,890 INFO [Binder] Mapping class: org.springframework.samples.petclinic
.Specialty -> specialties
18:55:57,890 INFO [Binder] Mapping class: org.springframework.samples.petclinic
.Owner -> owners
18:55:57,906 INFO [Binder] Mapping class: org.springframework.samples.petclinic
.Pet -> pets
18:55:57,906 INFO [Binder] Mapping class: org.springframework.samples.petclinic
.PetType -> types
18:55:57,906 INFO [Binder] Mapping class: org.springframework.samples.petclinic
.Visit -> visits
18:55:57,906 INFO [LocalSessionFactoryBean] Building new Hibernate SessionFacto
ry
18:55:57,906 INFO [Configuration] processing one-to-many association mappings
18:55:57,906 INFO [Binder] Mapping collection: org.springframework.samples.petc
linic.Owner.petsInternal -> pets
18:55:57,906 INFO [Binder] Mapping collection: org.springframework.samples.petc
linic.Pet.visitsInternal -> visits
18:55:57,906 INFO [Configuration] processing one-to-one association property re
ferences
18:55:57,906 INFO [Configuration] processing foreign key constraints
18:55:57,953 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.HSQLDialect
18:55:57,953 INFO [SettingsFactory] Use outer join fetching: true
18:55:57,968 INFO [ConnectionProviderFactory] Initializing connection provider:
org.springframework.orm.hibernate.LocalDataSourceConnectionProvider
18:55:57,968 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup
configured (in JTA environment, use of process level read-write cache is not re
commended)
at this point, in JBoss 3.2.6, there is a hang, while 3.2.5 continues with items below:
18:55:57,984 INFO [SettingsFactory] Use scrollable result sets: true
18:55:57,984 INFO [SettingsFactory] Use JDBC3 getGeneratedKeys(): false
18:55:57,984 INFO [SettingsFactory] Optimize cache for minimal puts: false
18:55:57,984 INFO [SettingsFactory] Query language substitutions: {}
18:55:57,984 INFO [SettingsFactory] cache provider: net.sf.hibernate.cache.EhCa
cheProvider
18:55:58,000 INFO [Configuration] instantiating and configuring caches
18:55:58,234 INFO [SessionFactoryImpl] building session factory
18:55:58,671 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no
JNDI name configured
18:55:58,671 INFO [DefaultListableBeanFactory] Creating shared instance of sing
leton bean 'transactionManager'
18:55:58,734 INFO [HibernateTransactionManager] Using DataSource [org.springfra
mework.jdbc.datasource.DriverManagerDataSource@139491b] of Hibernate SessionFact
ory for HibernateTransactionManager
18:55:58,734 INFO [DefaultListableBeanFactory] Creating shared instance of sing
leton bean 'clinic'
18:55:58,843 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from c
lass path resource [org/springframework/jdbc/support/sql-error-codes.xml]
18:55:58,875 INFO [XmlBeanFactory] Creating shared instance of singleton bean '
DB2'
... and so on
Can anybody else duplicate this?
Colin
|
|
From: Colin S. <col...@ex...> - 2004-11-13 00:49:35
|
I believe the issue I mentioned below is due to the fact that JBoss 3.2.5 and earlier was using HSQLDB 1.7.1 (from late 2002), while JBoss 3.2.6 uses HSQLDB 1.7.2 (one of the point releases, dated some time in august. The last point release, from Oct is actually 1.7.2.7). I was going to try slipping in 1.7.2 in our own codebase, which you would think would not be an issue going from 1.7.1 to 1.7.2, but in fact there are some major changes internally, and the new version barfs on the stored db as well as the setup script for petclinic for example, with an error on some of the formerly legal SQL. http://hsqldb.sourceforge.net/web/changelog.html I think this kind of incompatibility is an major bad move for the developer of HSQLDB; this should have been called 1.8 then... So I am wondering if we should try to make a switch, and what the implications really are. If we stay with 1.7.1, we can't run in the newer JBoss, and will not pick up any HSQLDB enhancements, plus Spring users are probably going to want to switch later if not now anyways. On the other hand, if we go to 1.7.2, I think that kills compatibility with older JBoss versions, and will kill db compatibility for somebody just upgrading the spring version and blindly dropping in the new jar, although they should be ok if they just copy over their old jar... Any thoughts? Colin Sampaleanu wrote: > I am seeing extremely strange, completely repeatable behaviour, where > Petclinc in both the JDBC and the hibernate deployment, using HSQL, > starts up ok in JBoss 3.2.5, but hangs after a certain point in JBoss > 3.2.6. The ejbtest sample does exactly the same thing. Weird thing in > 3.2.6 is that if I shut down the external HSQL db (started with the > server.bat file), then the app starts fine (getting some obvious > errors since it can't actually talk to the db, but doesn't hang). This > means the issues are somehow related to HSQL in the 3.2.6 environment. |
|
From: Ben A. <ben...@ac...> - 2004-11-13 01:04:55
|
Colin Sampaleanu wrote: > I was going to try slipping in 1.7.2 in our own codebase, which you > would think would not be an issue going from 1.7.1 to 1.7.2, but in > fact there are some major changes internally, and the new version > barfs on the stored db as well as the setup script for petclinic for > example, with an error on some of the formerly legal SQL. > http://hsqldb.sourceforge.net/web/changelog.html > I think this kind of incompatibility is an major bad move for the > developer of HSQLDB; this should have been called 1.8 then... > Both Spring Rich and Acegi Security are using HSQLDB 1.7.2 RC 6D because it provides a more robust in-memory database implementation. Whilst these projects don't push HSQLDB's features, it was only a minor couple of changes to get the later version running successfully. Also, in Spring Rich there's an InMemoryClinic that extends HsqlJdbcClinic, so it runs fine with 1.7.2 RC 6D at least. I agree users will want to move to the later versions (as the above projects needed to), so it's probably desirable to perform the upgrade. Best regards Ben |