JBoss Community

Re: Hibernate Dialect for DefaultDS

created by Frank Langelage in Datasource Configuration - View the full discussion

I have at least two databases in use.

The DefaultDS as described for jboss instance data (timers, users and roles, etc.). Just the tables the App server needs.

And then a second database used by my application deployed as an ear file.

The ear file comes with an persistence.xml file to choose the right dialect (Informix or Oracle).

 

But the DefaultDS is only used by the JBossAS itself.

So the question for me is, how to specify for this one the right hibernate dialect?

 

On startup I have this exception:

22:29:26,275 INFO  [DatabaseMetadata] table not found: hibernate_sequence
22:29:26,277 ERROR [SchemaUpdate] could not complete schema update: org.hibernate.MappingException: Dialect does not support pooled sequences
    at org.hibernate.dialect.Dialect.getCreateSequenceString(Dialect.java:734) [:3.5.5-Final]
    at org.hibernate.dialect.Dialect.getCreateSequenceStrings(Dialect.java:692) [:3.5.5-Final]
    at org.hibernate.id.enhanced.SequenceStructure.sqlCreateStrings(SequenceStructure.java:156) [:3.5.5-Final]
    at org.hibernate.id.enhanced.SequenceStyleGenerator.sqlCreateStrings(SequenceStyleGenerator.java:363) [:3.5.5-Final]
    at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:1142) [:3.5.5-Final]
    at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:187) [:3.5.5-Final]
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:386) [:3.5.5-Final]
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385) [:3.5.5-Final]
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954) [:3.5.5-Final]
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:891) [:3.5.5-Final]
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [:3.5.5-Final]

 

Only the base class Dialect seems to be used, not a database specific one.

Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community