Hi,
I'm trying to develop a simple JavaFX + hibernate(Firebird) application but I get a strange error:
Code:
Initial SessionFactory creation failed.org.hibernate.HibernateException: Could not instantiate dialect class
Exception in thread "Thread-3" java.lang.ExceptionInInitializerError
at hibernate.Hibernate.buildSessionFactory(Hibernate.java:30)
at hibernate.Hibernate.<clinit>(Hibernate.java:14)
at hibernate.ReadingThread.run(ReadingThread.java:34)
Caused by: org.hibernate.HibernateException: Could not instantiate dialect class
When I run the file from "Run file" everything works, but when I run the whole project by Run button this error occurs, why?
Please help, thanks.
Code:
Exception in thread "Thread-3" java.lang.ExceptionInInitializerError
at hibernate.Hibernate.buildSessionFactory(Hibernate.java:33)
at hibernate.Hibernate.<clinit>(Hibernate.java:17)
at hibernate.ReadingThread.run(ReadingThread.java:33)
Caused by: org.hibernate.HibernateException: Could not instantiate dialect class
at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:82)
at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:142)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:81)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:160)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:133)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2259)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2255)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1724)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1764)
at hibernate.Hibernate.buildSessionFactory(Hibernate.java:29)
... 2 more
Caused by: java.lang.ClassCastException: org.hibernate.dialect.FirebirdDialect cannot be cast to org.hibernate.dialect.Dialect
at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
... 13 more