I'm trying to test out the HXTT JDBC drivers for use with Access and I seem to have a problem with Hibernate during startup. It seems to find the database OK but gets the following error.
Any idea what the issue is?
2010-10-08 12:15:43,703 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
2010-10-08 12:15:44,078 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JN
DI name configured
2010-10-08 12:15:44,078 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - Running hbm2ddl schema update
2010-10-08 12:15:44,078 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - fetching database metadata
2010-10-08 12:15:44,125 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not get database metadata
java.sql.SQLException: Please assign the operating table name directly
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.access.ae.a(Unknown Source)
at com.hxtt.sql.access.ae.new(Unknown Source)
at com.hxtt.sql.access.ae.if(Unknown Source)
at com.hxtt.sql.br.do(Unknown Source)
at com.hxtt.sql.br.if(Unknown Source)
at com.hxtt.sql.dj.a(Unknown Source)
at com.hxtt.sql.dj.a(Unknown Source)
at com.hxtt.sql.br.a(Unknown Source)
at com.hxtt.sql.br.a(Unknown Source)
at com.hxtt.sql.ai.a(Unknown Source)
at com.hxtt.sql.ai.a(Unknown Source)
at com.hxtt.sql.ai.executeQuery(Unknown Source)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:151)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:69)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:62)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:170)
at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:386)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:891)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalCont
|
>java.sql.SQLException: Please assign the operating table name directly
Pleae check your jdbc url. It seems that your jdbc url and sql should has a wrong setting.
For instance, you can use
jdbc:access:////adatapath/abc.mdb select * from atable;
or
jdbc:access:////adatapath/ select * from abc.atable;
|
My URL is stored in a property file that is used to build the connection string and is very simple --
database.url=jdbc:access:///c:/access/rule.mdb
The processing that is failing is during app start up when Hibernate is trying to access the database metadata.
Are there any known issues using Hibernate with Access and your driver?
|
>Are there any known issues using Hibernate with Access and your driver?
No issue.
>java.sql.SQLException: Please assign the operating table name directly
That issue should be resulted by one autogenerated sql by spring framework or hibernate. The latest package should have supported it. Please download it.
|