-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: automatic dialect detection
PostPosted: Thu Jun 30, 2005 11:44 am 
Newbie

Joined: Wed Oct 08, 2003 6:19 am
Posts: 9
Hello,
after hibernate 3.0.3 there automatic dialect detection feature, but i get an error. Anyone can help me ?

- my hibernate version 3.0.5

- 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.datasource">java:comp/env/jdbc/database</property>
<property name="show_sql">false</property>
<property name="hbm2ddl.auto">create</property>

<!-- Mapping files -->
<mapping resource="petstore/domain/Customer.hbm.xml"/>
<mapping resource="petstore/domain/Order.hbm.xml"/>
<mapping resource="petstore/domain/Product.hbm.xml"/>
<mapping resource="petstore/domain/Category.hbm.xml"/>
<mapping resource="petstore/domain/Item.hbm.xml"/>
<mapping resource="petstore/domain/OrderItem.hbm.xml"/>
<mapping resource="petstore/domain/User.hbm.xml"/>
<mapping resource="petstore/domain/Role.hbm.xml"/>

</session-factory>

</hibernate-configuration>


- error:


30 Jun 2005 17:35:09,029 INFO Environment Hibernate 3.0.5
30 Jun 2005 17:35:09,033 INFO Environment hibernate.properties not found
30 Jun 2005 17:35:09,071 INFO Environment using CGLIB reflection optimizer
30 Jun 2005 17:35:09,078 INFO Environment using JDK 1.4 java.sql.Timestamp handling
30 Jun 2005 17:35:09,409 INFO Configuration configuring from resource: /hibernate.cfg.xml
30 Jun 2005 17:35:09,410 INFO Configuration Configuration resource: /hibernate.cfg.xml
30 Jun 2005 17:35:09,666 INFO Configuration Mapping resource: petstore/domain/Customer.hbm.xml
30 Jun 2005 17:35:09,977 INFO HbmBinder Mapping class: petstore.domain.Customer -> CUSTOMERS
30 Jun 2005 17:35:10,062 INFO Configuration Mapping resource: petstore/domain/Order.hbm.xml
30 Jun 2005 17:35:10,112 INFO HbmBinder Mapping class: petstore.domain.Order -> ORDERS
30 Jun 2005 17:35:10,370 INFO Configuration Mapping resource: petstore/domain/Product.hbm.xml
30 Jun 2005 17:35:10,461 INFO HbmBinder Mapping class: petstore.domain.Product -> PRODUCTS
30 Jun 2005 17:35:10,469 INFO Configuration Mapping resource: petstore/domain/Category.hbm.xml
30 Jun 2005 17:35:10,534 INFO HbmBinder Mapping class: petstore.domain.Category -> CATEGORIES
30 Jun 2005 17:35:10,535 INFO Configuration Mapping resource: petstore/domain/Item.hbm.xml
30 Jun 2005 17:35:10,566 INFO HbmBinder Mapping class: petstore.domain.Item -> ITEMS
30 Jun 2005 17:35:10,568 INFO Configuration Mapping resource: petstore/domain/OrderItem.hbm.xml
30 Jun 2005 17:35:10,599 INFO HbmBinder Mapping class: petstore.domain.OrderItem -> ORDER_ITEMS
30 Jun 2005 17:35:10,599 INFO Configuration Mapping resource: petstore/domain/User.hbm.xml
30 Jun 2005 17:35:10,647 INFO HbmBinder Mapping class: petstore.domain.User -> USERS
30 Jun 2005 17:35:10,669 INFO HbmBinder Mapping collection: petstore.domain.User.roles -> USER_ROLES
30 Jun 2005 17:35:10,670 INFO Configuration Mapping resource: petstore/domain/Role.hbm.xml
30 Jun 2005 17:35:10,710 INFO HbmBinder Mapping class: petstore.domain.Role -> ROLES
30 Jun 2005 17:35:10,711 INFO HbmBinder Mapping collection: petstore.domain.Role.users -> USER_ROLES
30 Jun 2005 17:35:10,712 INFO Configuration Configured SessionFactory: null
30 Jun 2005 17:35:10,712 INFO Configuration processing extends queue
30 Jun 2005 17:35:10,713 INFO Configuration processing collection mappings
30 Jun 2005 17:35:10,713 INFO HbmBinder Mapping collection: petstore.domain.Order.orderItems -> ORDER_ITEMS
30 Jun 2005 17:35:10,714 INFO HbmBinder Mapping collection: petstore.domain.Product.items -> ITEMS
30 Jun 2005 17:35:10,716 INFO HbmBinder Mapping collection: petstore.domain.Category.products -> PRODUCTS
30 Jun 2005 17:35:10,717 INFO Configuration processing association property references
30 Jun 2005 17:35:10,717 INFO Configuration processing foreign key constraints
30 Jun 2005 17:35:11,355 INFO NamingHelper JNDI InitialContext properties:{}
30 Jun 2005 17:35:11,358 INFO DatasourceConnectionProvider Using datasource: java:comp/env/jdbc/database
30 Jun 2005 17:35:11,777 INFO SettingsFactory RDBMS: MySQL, version: 4.1.11-Debian_1-log
30 Jun 2005 17:35:11,778 INFO SettingsFactory JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.8 ( $Date: 2005/04/14 20:36:13 $, $Revision: 1.27.4.64 $ )
30 Jun 2005 17:35:11,925 INFO Dialect Using dialect: org.hibernate.dialect.MySQLDialect
30 Jun 2005 17:35:11,955 INFO TransactionFactoryFactory Using default transaction strategy (direct JDBC transactions)
30 Jun 2005 17:35:11,965 INFO TransactionManagerLookupFactory No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
30 Jun 2005 17:35:11,966 INFO SettingsFactory Automatic flush during beforeCompletion(): disabled
30 Jun 2005 17:35:11,966 INFO SettingsFactory Automatic session close at end of transaction: disabled
30 Jun 2005 17:35:11,967 INFO SettingsFactory JDBC batch size: 15
30 Jun 2005 17:35:11,967 INFO SettingsFactory JDBC batch updates for versioned data: disabled
30 Jun 2005 17:35:11,978 INFO SettingsFactory Scrollable result sets: enabled
30 Jun 2005 17:35:11,979 INFO SettingsFactory JDBC3 getGeneratedKeys(): enabled
30 Jun 2005 17:35:11,979 INFO SettingsFactory Connection release mode: null
30 Jun 2005 17:35:11,983 INFO SettingsFactory Maximum outer join fetch depth: 2
30 Jun 2005 17:35:11,984 INFO SettingsFactory Default batch fetch size: 1
30 Jun 2005 17:35:11,984 INFO SettingsFactory Generate SQL with comments: disabled
30 Jun 2005 17:35:11,984 INFO SettingsFactory Order SQL updates by primary key: disabled
30 Jun 2005 17:35:11,985 INFO SettingsFactory Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
30 Jun 2005 17:35:11,996 INFO ASTQueryTranslatorFactory Using ASTQueryTranslatorFactory
30 Jun 2005 17:35:11,998 INFO SettingsFactory Query language substitutions: {}
30 Jun 2005 17:35:11,998 INFO SettingsFactory Second-level cache: enabled
30 Jun 2005 17:35:11,998 INFO SettingsFactory Query cache: disabled
30 Jun 2005 17:35:11,998 INFO SettingsFactory Cache provider: org.hibernate.cache.EhCacheProvider
30 Jun 2005 17:35:12,012 INFO SettingsFactory Optimize cache for minimal puts: disabled
30 Jun 2005 17:35:12,013 INFO SettingsFactory Structured second-level cache entries: disabled
30 Jun 2005 17:35:12,075 INFO SettingsFactory Statistics: disabled
30 Jun 2005 17:35:12,076 INFO SettingsFactory Deleted entity synthetic identifier rollback: disabled
30 Jun 2005 17:35:12,079 INFO SettingsFactory Default entity-mode: pojo
30 Jun 2005 17:35:12,876 INFO SessionFactoryImpl building session factory
30 Jun 2005 17:35:12,919 WARN Configurator No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/Users/mario/project_cvs/demo/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
30 Jun 2005 17:35:14,373 INFO SessionFactoryObjectFactory Not binding factory to JNDI, no JNDI name configured
30 Jun 2005 17:35:14,395 ERROR [action] Servlet.service() for servlet action threw exception
java.lang.ExceptionInInitializerError
at petstore.tools.HibernateUtil.<clinit>(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at org.xmoon.node.BeanNode.getContextBean(Unknown Source)
at org.xmoon.node.BeanNode.getBean(Unknown Source)
at org.xmoon.node.BsfNode.evalService(Unknown Source)
at org.xmoon.GenericStrutsAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:552)
Caused by: org.hibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect.
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:494)
at org.hibernate.dialect.Dialect.getDialect(Dialect.java:516)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:57)
at org.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:49)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:264)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
... 27 more
30 Jun 2005 17:35:58,009 ERROR [action] Servlet.service() for servlet action threw exception
java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at org.xmoon.node.BeanNode.getContextBean(Unknown Source)
at org.xmoon.node.BeanNode.getBean(Unknown Source)
at org.xmoon.node.BsfNode.evalService(Unknown Source)
at org.xmoon.GenericStrutsAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:552)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.