[jboss-user] [JBoss Tools] - Re: HibernateException: Dialect class not found in HBM2DDL ant task

Saemmy - do-not-reply at jboss.com
Wed Oct 10 04:16:58 EDT 2012


Saemmy - [https://community.jboss.org/people/saemmy2011] created the discussion

"Re: HibernateException: Dialect class not found in HBM2DDL ant task"

To view the discussion, visit: https://community.jboss.org/message/764035#764035

--------------------------------------------------------------
Yes, works fine with org.hibernate.dialect.Oracle10gDialect:

[hibernatetool] 2012-10-10 10:08:23,250 INFO  [Version.<clinit>(15)] : Hibernate Tools 4.0.0
[hibernatetool] 2012-10-10 10:08:23,328 WARN  [ConnectionProviderInitiator.initiateService(143)] : HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections
[hibernatetool] 2012-10-10 10:08:23,421 INFO  [Dialect.<init>(122)] : HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect
[hibernatetool] 2012-10-10 10:08:23,437 INFO  [LobCreatorBuilder.useContextualLobCreation(85)] : HHH000422: Disabling contextual LOB creation as connection was null
[hibernatetool] 2012-10-10 10:08:23,640 INFO  [SchemaExport.execute(343)] : HHH000227: Running hbm2ddl schema export

But with my own dialect, schema exports throws exception. The hibernate.cfg.xml and all my mapping files could be read, but not the dialect. And both are on classpath:

[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
[hibernatetool] 2012-10-10 10:11:16,421 INFO  [Version.<clinit>(37)] : HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
[hibernatetool] 2012-10-10 10:11:16,453 INFO  [Version.logVersion(41)] : HHH000412: Hibernate Core {4.1.4.Final}
[hibernatetool] 2012-10-10 10:11:16,468 INFO  [Environment.<clinit>(239)] : HHH000206: hibernate.properties not found
[hibernatetool] 2012-10-10 10:11:16,468 INFO  [Environment.buildBytecodeProvider(342)] : HHH000021: Bytecode provider name : javassist
[hibernatetool] 2012-10-10 10:11:16,515 INFO  [Configuration.configure(1985)] : HHH000042: Configuring from file: hibernate.cfg.xml
[hibernatetool] 2012-10-10 10:11:16,656 INFO  [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/BusinessDivision.hbm.xml
[hibernatetool] 2012-10-10 10:11:17,000 INFO  [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/CommodityCode.hbm.xml
[hibernatetool] 2012-10-10 10:11:17,015 INFO  [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/CompanyCode.hbm.xml
[hibernatetool] 2012-10-10 10:11:17,062 INFO  [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/Country.hbm.xml
[hibernatetool] 2012-10-10 10:11:17,171 INFO  [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/Customer.hbm.xml
...
[hibernatetool] 2012-10-10 10:11:17,750 INFO  [Configuration.doConfigure(2068)] : HHH000041: Configured SessionFactory: null
[hibernatetool] 2012-10-10 10:11:18,468 INFO  [Version.<clinit>(15)] : Hibernate Tools 4.0.0
[hibernatetool] 2012-10-10 10:11:18,546 WARN  [ConnectionProviderInitiator.initiateService(143)] : HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections
[hibernatetool] An exception occurred while running exporter #2:hbm2ddl (Generates database schema)
[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.HibernateException: Dialect class not found: com.mycompany.myproduct.integration.dao.hibernate.Oracle10nDialect
[hibernatetool] org.hibernate.service.classloading.spi.ClassLoadingException: Unable to load class [com.mycompany.myproduct.integration.dao.hibernate.Oracle10nDialect]
[hibernatetool] java.lang.ClassNotFoundException: Could not load requested class : com.mycompany.myproduct.integration.dao.hibernate.Oracle10nDialect
[hibernatetool] A class were not found in the classpath of the Ant task.
[hibernatetool] Ensure that the classpath contains the classes needed for Hibernate and your code are in the classpath.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/764035#764035]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121010/3f3e2b7b/attachment.html 


More information about the jboss-user mailing list