<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: HibernateException: Dialect class not found in HBM2DDL ant task
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/saemmy2011">Saemmy -</a> in <i>JBoss Tools</i> - <a href="https://community.jboss.org/message/764035#764035">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Yes, works fine with org.hibernate.dialect.Oracle10gDialect:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>[hibernatetool] 2012-10-10 10:08:23,250 INFO&#160; [Version.&lt;clinit&gt;(15)] : Hibernate Tools 4.0.0</p><p>[hibernatetool] 2012-10-10 10:08:23,328 WARN&#160; [ConnectionProviderInitiator.initiateService(143)] : HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections</p><p>[hibernatetool] 2012-10-10 10:08:23,421 INFO&#160; [Dialect.&lt;init&gt;(122)] : HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect</p><p>[hibernatetool] 2012-10-10 10:08:23,437 INFO&#160; [LobCreatorBuilder.useContextualLobCreation(85)] : HHH000422: Disabling contextual LOB creation as connection was null</p><p>[hibernatetool] 2012-10-10 10:08:23,640 INFO&#160; [SchemaExport.execute(343)] : HHH000227: Running hbm2ddl schema export</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>[hibernatetool] Executing Hibernate Tool with a Standard Configuration</p><p>[hibernatetool] 1. task: hbm2ddl (Generates database schema)</p><p>[hibernatetool] 2012-10-10 10:11:16,421 INFO&#160; [Version.&lt;clinit&gt;(37)] : HCANN000001: Hibernate Commons Annotations {4.0.1.Final}</p><p>[hibernatetool] 2012-10-10 10:11:16,453 INFO&#160; [Version.logVersion(41)] : HHH000412: Hibernate Core {4.1.4.Final}</p><p>[hibernatetool] 2012-10-10 10:11:16,468 INFO&#160; [Environment.&lt;clinit&gt;(239)] : HHH000206: hibernate.properties not found</p><p>[hibernatetool] 2012-10-10 10:11:16,468 INFO&#160; [Environment.buildBytecodeProvider(342)] : HHH000021: Bytecode provider name : javassist</p><p>[hibernatetool] 2012-10-10 10:11:16,515 INFO&#160; [Configuration.configure(1985)] : HHH000042: Configuring from file: hibernate.cfg.xml</p><p>[hibernatetool] 2012-10-10 10:11:16,656 INFO&#160; [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/BusinessDivision.hbm.xml</p><p>[hibernatetool] 2012-10-10 10:11:17,000 INFO&#160; [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/CommodityCode.hbm.xml</p><p>[hibernatetool] 2012-10-10 10:11:17,015 INFO&#160; [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/CompanyCode.hbm.xml</p><p>[hibernatetool] 2012-10-10 10:11:17,062 INFO&#160; [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/Country.hbm.xml</p><p>[hibernatetool] 2012-10-10 10:11:17,171 INFO&#160; [Configuration.addResource(718)] : HHH000221: Reading mappings from resource: com/mycompany/myproduct/common/model/hbm/Customer.hbm.xml</p><p>...</p><p>[hibernatetool] 2012-10-10 10:11:17,750 INFO&#160; [Configuration.doConfigure(2068)] : HHH000041: Configured SessionFactory: null</p><p>[hibernatetool] 2012-10-10 10:11:18,468 INFO&#160; [Version.&lt;clinit&gt;(15)] : Hibernate Tools 4.0.0</p><p>[hibernatetool] 2012-10-10 10:11:18,546 WARN&#160; [ConnectionProviderInitiator.initiateService(143)] : HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections</p><p>[hibernatetool] An exception occurred while running exporter #2:hbm2ddl (Generates database schema)</p><p>[hibernatetool] To get the full stack trace run ant with -verbose</p><p>[hibernatetool] org.hibernate.HibernateException: Dialect class not found: com.mycompany.myproduct.integration.dao.hibernate.Oracle10nDialect</p><p>[hibernatetool] org.hibernate.service.classloading.spi.ClassLoadingException: Unable to load class [com.mycompany.myproduct.integration.dao.hibernate.Oracle10nDialect]</p><p>[hibernatetool] java.lang.ClassNotFoundException: Could not load requested class : com.mycompany.myproduct.integration.dao.hibernate.Oracle10nDialect</p><p>[hibernatetool] A class were not found in the classpath of the Ant task.</p><p>[hibernatetool] Ensure that the classpath contains the classes needed for Hibernate and your code are in the classpath.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/764035#764035">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>