-->
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.  [ 3 posts ] 
Author Message
 Post subject: No Dialect mapping for JDBC type: 1852802018
PostPosted: Wed Sep 12, 2012 6:13 pm 
Newbie

Joined: Wed Sep 12, 2012 6:03 pm
Posts: 9
We have upgraded from PostgreSQL 8.4.3 to PostgreSQL 9.1.4 and we are getting the following errors when attempting to auto-gen schema DDL.

Old Configuration:

WEB-INF/lib/postgis-jdbc-1.3.3.jar,
WEB-INF/lib/postgis-stubs-1.3.3.jar,
WEB-INF/lib/postgresql-8.3-603.jdbc4.jar,

New Configuration:

Tomcat 7
Java 1.6.0_35

Spring Framework 3.1.2, hibernate sessionFactory via 'org.springframework.orm.hibernate4.LocalSessionFactoryBean'
Hibernate Core 4.1.6.Final
Hibernate Spatial 4.0.M1
PostgreSQL JDBC4 9.1-901
postgis-jdbc 1.5.2
c3p0 0.9.1.2

auto DDL update phase fails with Exception:

11:59:23,736 [localhost-startStop-1] INFO java.sql.DatabaseMetaData:120 -
HHH000262: Table not found: EMPLOYERS
11:59:23,738 [localhost-startStop-1] ERROR
org.hibernate.tool.hbm2ddl.SchemaUpdate:245 - HHH000299: Could not complete schema update

org.hibernate.MappingException: No Dialect mapping for JDBC type: 1852802018 (**Changes at each webapp startup)
at org.hibernate.dialect.TypeNames.get(TypeNames.java:76)
at org.hibernate.dialect.TypeNames.get(TypeNames.java:99)
at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:299)
at org.hibernate.spatial.dialect.postgis.PostgisDialect.getTypeName(PostgisDialect.java:247)
at org.hibernate.mapping.Column.getSqlType(Column.java:227)
at org.hibernate.mapping.Table.sqlCreateString(Table.java:481)
at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:1140)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:212)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:178)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:492)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1746)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1784)
at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:242)
at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:372)
at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:357)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Dialect specification in hibernate.properties is:
hibernate.dialect=org.hibernate.spatial.dialect.postgis.PostgisDialect

Any assistance will be greatly appreciated.

thanks


Top
 Profile  
 
 Post subject: Re: No Dialect mapping for JDBC type: 1852802018
PostPosted: Sat Sep 15, 2012 1:13 am 
Beginner
Beginner

Joined: Fri Sep 14, 2012 10:41 am
Posts: 20
Given the explainations that you gave, the error seems clear to me. On the second line of the diagnostic, we can read 'HHH000262: Table not found: EMPLOYERS'.

Table EMPLOYERS can't be found.

I suspect that you need to specify the schema and/or catalog of your tables. Try entering the schema first. Most modern databases put their tables in a schema. That is a location. In other words, the name of your tables needs a prefix separated by a point and name of your table. You can specify in your configuration file the name of the schema to be used for all tables.

Using the utilities that come with your new PostGre database, find a possible schema and/or catalog name for all your tables.

I hope that helps and gives you avenues of solution.


Top
 Profile  
 
 Post subject: Re: No Dialect mapping for JDBC type: 1852802018
PostPosted: Mon Sep 17, 2012 1:52 pm 
Newbie

Joined: Wed Sep 12, 2012 6:03 pm
Posts: 9
We were able to make the necessary adjustments to the way Hibernate manages the data types differently in version 4.1.6, so we got pass this error. Our table structures reside in the public schema (not the most secure implementation that was done before my time) so that in this configuration the prefix of public.EMPLOYERS is not necessary and this schema which includes The EMPLOYERS table hasn't changed from our PostgreSQL 8.4.3 instance, we are in the process of upgrading Hibernate from 3.22 GA to Hibernate 4.1.6 and we ran into this error because certain column data types text, geometry, timestamp, etc. that reside in the EMPLOYERS table had to be configured differently from the hibernate DAO perspective.

thanks


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

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.