hi
i tried to implement an example to integrate hibernate with jboss.
i always get an exception message after this statement:
Configuration cfg = new Configuration();
error message:
net.sf.hibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect.
i see the service in the cmx-console and that the dialect is set?!
any ideas, where i missed something
regards pascal
here the hibernate-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=HibernateFactory,
name=HibernateFactory">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=DefaultDS</depends>
<classpath codebase="C:\Programme\jboss-3.2.3\server\hibernate\deploy\lib\hibernate2.jar"
lib="C:\Programme\jboss-3.2.3\server\hibernate\deploy\hibernate.jar"/>
<attribute name="CacheProvider">net.sf.ehcache.hibernate.Provider</attribute>
<!-- Make it deploy ONLY after DataSource had been started -->
<attribute name="MapResources">hibernate/Kunde.hbm.xml</attribute>
<attribute name="JndiName">java:/hibernate/HibernateFactory</attribute>
<attribute name="Datasource">java:/DefaultDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="UseOuterJoin">false</attribute>
<attribute name="ShowSql">false</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
</mbean>
</server>
and the lookup, that seems to work:
[list] Context ctx;
try
{
ctx = new InitialContext();
factory = (SessionFactory) ctx.lookup("java:/hibernate/HibernateFactory");
} catch (NamingException e)
{
e.printStackTrace();
}[/list