Using: Hibernate3.1, Hibernate-tools3.1beta2, Oracle10g.
Attempting to upgrade from Hibernate3.0 to Hibernate3.1. This all used to work before the upgrade.
Having a problem starting up my application in JBOSS server (It's a JBOSS service). I get the folowing errors (the lines marked with ">>>>" are my own debug lines). Essentially it's having problems with a custom identifer in one of my mapping files. After debugging the Hibernate3.1 source, I found that the dialect "Oracle9Dialect" can't find the type for custom identifier (specifically, in file TypeNames.java at method get()).
The exceptions I get are:
Code:
>>>> About to call contextClassLoader for com.util.common.type.GuidType
[2005-12-20 12:07:53,490] - main - INFO - ing.util.LoggerStream.write(LoggerStream.java:140) - >>>> After calling contextClassLoader
[2005-12-20 12:14:24,436] - main - INFO - rnateService.start(MyCompanyHibernateService.java:115) - Could not build SessionFactory using the MBean classpath - will try again using client classpath: No Dialect mapping for JDBC type: -2
...
>>>> About to call contextClassLoader for com.util.common.type.GuidType
[2005-12-20 12:21:37,593] - main - INFO - ing.util.LoggerStream.write(LoggerStream.java:140) - >>>> After calling contextClassLoader
[2005-12-20 12:22:00,136] - main - WARN - erviceController.start(ServiceController.java:429) - Problem starting service MyCompany.com:service=LogHibernate
org.hibernate.HibernateException: org.hibernate.MappingException: No Dialect mapping for JDBC type: -2
at com.util.common.jmx.MyCompanyHibernateService.start(MyCompanyHibernateService.java:135)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:914)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:418)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:418)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)
at org.jboss.Main.boot(Main.java:195)
at org.jboss.Main$1.run(Main.java:463)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.MappingException: No Dialect mapping for JDBC type: -2
at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:216)
at org.hibernate.mapping.Column.getSqlType(Column.java:181)
at org.hibernate.mapping.Table.sqlTemporaryTableCreateString(Table.java:302)
at org.hibernate.mapping.PersistentClass.prepareTemporaryTables(PersistentClass.java:636)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:199)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1167)
at com.util.common.jmx.MyCompanyHibernateService.internalBuildSessionFactory(MyCompanyHibernateService.java:102)
at com.util.common.jmx.SessionFactoryStub.getImpl(SessionFactoryStub.java:79)
at com.util.common.jmx.SessionFactoryStub.getStatistics(SessionFactoryStub.java:177)
at org.hibernate.jmx.StatisticsService.setSessionFactory(StatisticsService.java:108)
at org.hibernate.jmx.StatisticsService.setSessionFactoryJNDIName(StatisticsService.java:78)
at com.util.common.jmx.MyCompanyHibernateService.start(MyCompanyHibernateService.java:130)
... 91 more
Specifically, the lines in the above exceptions that may hint at some problem are:
Code:
Could not build SessionFactory using the MBean classpath - will try again using client classpath: No Dialect mapping for JDBC type: -2
...
Problem starting service MyCompany.com:service=LogHibernate
org.hibernate.HibernateException: org.hibernate.MappingException: No Dialect mapping for JDBC type: -2
The identifier definition in my mapping file: Code:
<id name="evtLogId" type="mycompany.util.common.type.GuidType">
<generator class="mycompany.util.common.id.GuidIdentifierGenerator"/>
</id>
The method in TypeNames.java that is having trouble finding the type for the identifier:
Code:
public String get(int typecode) throws MappingException {
String result = (String) defaults.get( new Integer(typecode) );
if (result==null) throw new MappingException("No Dialect mapping for JDBC type: " + typecode);
return result;
}
Any help would be appreciated.
Thank You.