[jboss-user] [Installation, Configuration & Deployment] - Re: jboss 4.2 Hibernate 3.2 entity mapping problem

cgrahamatip do-not-reply at jboss.com
Fri Jun 1 01:09:41 EDT 2007


So, I deleted the hibernate.properties file and added the jdbc connection info to the hibernate.cfg.xml file.  The file is still at the root of the web app (same directory as the jsp/jsf files).  There appears to be a problem with jboss 2.4.0 and hibernate.  

you can see in the stack trace that it didn't find the hibernate.properties file however it doesn't seem to be reading the hibernate.cfg.xml file which has the dialect value set. Do you know for sure where the hibernate.cfg.xml file should be located on jboss? 




  | #################  hibernate.cfg.xml ##################
  | 
  | <?xml version='1.0' encoding='utf-8'?>
  | <!DOCTYPE hibernate-configuration PUBLIC
  | "-//Hibernate/Hibernate Configuration DTD//EN"
  | "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
  | 
  | <hibernate-configuration>
  | <session-factory>
  |         <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
  |         <property name="connection.password">xxxx</property>
  |         <property name="connection.url">jdbc:mysql://localhost/myDB</property>
  |         <property name="connection.username">username</property>
  |         <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
  | 		<property name="show_sql">true</property>
  |       <!-- Mapping files -->
  |       <mapping resource="com/ipi/InformationPortal/model/People.hbm.xml"/>
  | </session-factory>
  | </hibernate-configuration>
  | 
  | ############## stack trace #########################
  | 
  | 21:53:04,218 INFO  [Environment] Hibernate 3.2.3
  | 21:53:04,234 INFO  [Environment] hibernate.properties not found
  | 21:53:04,234 INFO  [Environment] Bytecode provider name : javassist
  | 21:53:04,250 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
  | 21:53:04,359 WARN  [UserSuppliedConnectionProvider] No connection properties specified - the user must supply JDBC conne
  | ctions
  | 21:53:04,375 FATAL [application] org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
  | javax.faces.el.EvaluationException: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
  |         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:9
  | 1)
  |         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
  |         at javax.faces.component.UICommand.broadcast(UICommand.java:383)
  |         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
  |         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
  |         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
  |         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  |         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  |         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  |         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  |         at java.lang.Thread.run(Thread.java:619)
  | Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
  |         at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
  |         at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
  |         at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:422)
  |         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
  |         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
  |         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
  |         at com.ipi.InformationPortal.web.suggestionUtils.getSuggestionBean(suggestionUtils.java:27)
  |         at com.ipi.InformationPortal.web.registrationBean.register(registrationBean.java:36)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:597)
  |         at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
  |         at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  |         at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
  |         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:7
  | 7)
  |         ... 25 more
  | 21:53:04,375 WARN  [lifecycle] #{registrationBean.register}: org.hibernate.HibernateException: Hibernate Dialect must be
  |  explicitly set
  | javax.faces.FacesException: #{registrationBean.register}: org.hibernate.HibernateException: Hibernate Dialect must be ex
  | plicitly set
  |         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
  |         at javax.faces.component.UICommand.broadcast(UICommand.java:383)
  |         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
  |         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
  |         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
  |         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  |         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  |         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  |         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  |         at java.lang.Thread.run(Thread.java:619)
  | Caused by: javax.faces.el.EvaluationException: org.hibernate.HibernateException: Hibernate Dialect must be explicitly se
  | t
  |         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:9
  | 1)
  |         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
  |         ... 24 more
  | Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
  |         at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
  |         at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
  |         at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:422)
  |         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
  |         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
  |         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
  |         at com.ipi.InformationPortal.web.suggestionUtils.getSuggestionBean(suggestionUtils.java:27)
  |         at com.ipi.InformationPortal.web.registrationBean.register(registrationBean.java:36)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:597)
  |         at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
  |         at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  |         at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
  |         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:7
  | 7)
  |         ... 25 more
  | 21:53:04,390 WARN  [lifecycle] executePhase(INVOKE_APPLICATION 5,com.sun.faces.context.FacesContextImpl at d2e55e) threw ex
  | ception
  | javax.faces.FacesException: #{registrationBean.register}: org.hibernate.HibernateException: Hibernate Dialect must be ex
  | plicitly set
  |         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:105)
  |         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  |         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  |         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  |         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  |         at java.lang.Thread.run(Thread.java:619)
  | Caused by: javax.faces.FacesException: #{registrationBean.register}: org.hibernate.HibernateException: Hibernate Dialect
  |  must be explicitly set
  |         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
  |         at javax.faces.component.UICommand.broadcast(UICommand.java:383)
  |         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
  |         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
  |         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
  |         ... 20 more
  | Caused by: javax.faces.el.EvaluationException: org.hibernate.HibernateException: Hibernate Dialect must be explicitly se
  | t
  |         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:9
  | 1)
  |         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
  |         ... 24 more
  | Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
  |         at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
  |         at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
  |         at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:422)
  |         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
  |         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
  |         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
  |         at com.ipi.InformationPortal.web.suggestionUtils.getSuggestionBean(suggestionUtils.java:27)
  |         at com.ipi.InformationPortal.web.registrationBean.register(registrationBean.java:36)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:597)
  |         at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
  |         at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  |         at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
  |         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:7
  | 7)
  |         ... 25 more
  | 21:53:04,390 ERROR [FacesServlet]] Servlet.service() for servlet javax.faces.FacesServlet threw exception
  | org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
  |         at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
  |         at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
  |         at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:422)
  |         at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
  |         at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
  |         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
  |         at com.ipi.InformationPortal.web.suggestionUtils.getSuggestionBean(suggestionUtils.java:27)
  |         at com.ipi.InformationPortal.web.registrationBean.register(registrationBean.java:36)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:597)
  |         at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
  |         at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
  |         at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
  |         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:7
  | 7)
  |         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
  |         at javax.faces.component.UICommand.broadcast(UICommand.java:383)
  |         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
  |         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
  |         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
  |         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  |         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
  |         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  |         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  |         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  |         at java.lang.Thread.run(Thread.java:619)
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050374#4050374

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050374



More information about the jboss-user mailing list