Sql – Grails OC4J trouble deploying to 10.1.3.1

grailshsqldboc4j

I've got a Grails app that's deployed successfully on a stand-alone OC4J instance, but when I try and deploy it to the full version via the GUI I get this problem:

[Nov 5, 2009 10:50:41 AM] Binding diploma-1.0.1 web-module for application diploma to site default-web-site under context root diploma
[Nov 5, 2009 10:50:48 AM] Operation failed with error: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The database is already in use by another process: org.hsqldb.persist.NIOLockFile@882e422e[file =D:\product\10.1.3.1\OracleAS_1\j2ee\home\prodDb.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file : D:\product\10.1.3.1\OracleAS_1\j2ee\home\prodDb.lck)

Does anyone have a clue about what my problem might be?

Best Answer

I guess the relevant information is The database is already in use by another process: org.hsqldb.persist.NIOLockFile@882e422e[file =D:\product\10.1.3.1\OracleAS_1\j2ee\home\prodDb.lck

Seems like there has been an unclean shutdown of the application or something like that and the HSQL database wasn't able release the lock. Or the user the application is running with has no privileges to access the file D:\product\10.1.3.1\OracleAS_1\j2ee\home\prodDb.lck

I would strongly encourage you to use a different type of database in the production environment. Alternatives are MySQL, PostgreSQL, Oracle, MSSQL, Derby, etc.

Related Topic