Could not instantiate dialect class


#1

Hi,

I just download the lucee WAR 5.1 and installed on the Tomcat 8.5.5. I can
get into Lucee web admin and Lucee server admin. I have a problem running
the ORM. I am using MySQL and set in the ormsetting dialect MySQL and gave
me the error below:

Here is my ORMSettings inside Application.cfc:

this.datasource = 'ROOT';
this.ormenabled = true;
this.ormsettings = {
        flushatrequestend = false,
        automanagesession = false,
        cfclocation = "model/beans",
        eventhandling = true,
        eventhandler = "model.aop.GlobalEventHandler",
        logsql = "No",
        dialect = "mysql"
};
this.ormsettings.dbcreate = "update";

Could you please help!. Thanks.

Message Could not instantiate dialect class
Cause org.hibernate.HibernateException
Java Stacktrace lucee.runtime.exp.NativeException: Could not instantiate 
dialect class
  at 
org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:157)
  at 
org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:100)
  at 
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:120)
  at 
org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
  at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159)
  at 
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383)
  at 
org.lucee.extension.orm.hibernate.SessionFactoryData.buildSessionFactory(SessionFactoryData.java:219)
  at 
org.lucee.extension.orm.hibernate.HibernateORMEngine.getSessionFactoryData(HibernateORMEngine.java:202)
  at 
org.lucee.extension.orm.hibernate.HibernateORMEngine.init(HibernateORMEngine.java:67)
  at lucee.runtime.config.ConfigImpl.getORMEngine(ConfigImpl.java:2987)
  at lucee.runtime.config.ConfigImpl.resetORMEngine(ConfigImpl.java:2971)
  at lucee.runtime.orm.ORMUtil.resetEngine(ORMUtil.java:74)
  at 
lucee.runtime.listener.ModernAppListener.initApplicationContext(ModernAppListener.java:455)
  at 
lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:116)
  at 
lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
  at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2394)
  at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2385)
  at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2353)
  at 
lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:907)
  at 
lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102)
  at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
  at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
  at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
  at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
  at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
  at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
  at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
  at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
  at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
  at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
  at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784)
  at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
  at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
  at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
  at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  at java.lang.Thread.run(Thread.java:745)
 Caused by: java.lang.ClassCastException: 
org.hibernate.dialect.MySQLDialect cannot be cast to 
org.hibernate.dialect.Dialect
  ... 43 more

Timestamp 3/9/17 6:42:59 PM PST

#2

Did you ever resolve this issue?


#3

No. I haven’t resolve it yet.


#4

Not sure I can offer any help, but for me I moved all ORM settings to a singe ormsettings line; also I had to recreate a number of my datasources in the Lucee Administrator to get it working.