-->
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.  [ 2 posts ] 
Author Message
 Post subject: SDO_GEOMETRY to STRUCT - Wrong column type: GATEWAY_POSITION
PostPosted: Fri Dec 08, 2006 7:05 pm 
Newbie

Joined: Mon Jun 12, 2006 4:59 pm
Posts: 13
Problem,
I'm mapping an oracle.sql.STRUCT to a SDO_GEOMETRY within the database.

On startup (not actually doing anything but opening and creating the EntityManager) I get this errror:

Code:
[b]javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: GATEWAY_POSITION, expected: raw(255)[/b]


I haven't found anything on Google or in these forums about this issue.


Hibernate version:
3.2.1.ga

Mapping documents:
ejb3 -
private oracle.sql.STRUCT gatewayPosition;

Code between sessionFactory.openSession() and session.close():
None... on initalization

Full stack trace of any exception that occurs:

Code:
Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: GATEWAY_POSITION, expected: raw(255)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
   at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)

Caused by: org.hibernate.HibernateException: Wrong column type: GATEWAY_POSITION, expected: raw(255)
   at org.hibernate.mapping.Table.validateColumns(Table.java:261)
   at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1080)
   at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:317)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
   ... 4 more


Name and version of the database you are using:
Oracle 10g

The generated SQL (show_sql=true):
N/A

Debug level Hibernate log excerpt:

Code:
2006-12-08 23:01:08,089 4453 [main] DEBUG org.hibernate.loader.collection.OneToManyLoader  - Static select for one-to-many com.navsys.trauma.dal.model.TidgetDevice.tidgetDatas: select tidgetdata0_.TIDGET_DEVICE_FK as TIDGET20_1_, tidgetdata0_.TIDGET_DATA_PK as TIDGET1_1_, tidgetdata0_.TIDGET_DATA_PK as TIDGET1_2_0_, tidgetdata0_.PROCESSED_FLAG as PROCESSED2_2_0_, tidgetdata0_.TIMES as TIMES2_0_, tidgetdata0_.TIDGET_HEADER_FK as TIDGET21_2_0_, tidgetdata0_.TIDGET_DEVICE_FK as TIDGET20_2_0_, tidgetdata0_.GATEWAY_ID_FK as GATEWAY22_2_0_, tidgetdata0_.ERROR_CNT as ERROR4_2_0_, tidgetdata0_.MESSAGE_CNT as MESSAGE5_2_0_, tidgetdata0_.MESSAGE_TYPE as MESSAGE6_2_0_, tidgetdata0_.MESSAGE_LENGTH as MESSAGE7_2_0_, tidgetdata0_.GPSWEEK as GPSWEEK2_0_, tidgetdata0_.GPSSEC as GPSSEC2_0_, tidgetdata0_.FHFIELD3 as FHFIELD10_2_0_, tidgetdata0_.FHFIELD4 as FHFIELD11_2_0_, tidgetdata0_.TEMP as TEMP2_0_, tidgetdata0_.FEFIELD2 as FEFIELD13_2_0_, tidgetdata0_.FEFIELD3 as FEFIELD14_2_0_, tidgetdata0_.FEFIELD4 as FEFIELD15_2_0_, tidgetdata0_.HEALTHY as HEALTHY2_0_, tidgetdata0_.OSC_OFFSET as OSC17_2_0_, tidgetdata0_.CREATED_TIMES as CREATED18_2_0_, tidgetdata0_.MESSAGE as MESSAGE2_0_ from TRAUMA.TIDGET_DATA tidgetdata0_ where tidgetdata0_.TIDGET_DEVICE_FK=?
2006-12-08 23:01:08,089 4453 [main] DEBUG org.hibernate.loader.collection.OneToManyLoader  - Static select for one-to-many com.navsys.trauma.dal.model.GatewayId.tidgetDatas: select tidgetdata0_.GATEWAY_ID_FK as GATEWAY22_1_, tidgetdata0_.TIDGET_DATA_PK as TIDGET1_1_, tidgetdata0_.TIDGET_DATA_PK as TIDGET1_2_0_, tidgetdata0_.PROCESSED_FLAG as PROCESSED2_2_0_, tidgetdata0_.TIMES as TIMES2_0_, tidgetdata0_.TIDGET_HEADER_FK as TIDGET21_2_0_, tidgetdata0_.TIDGET_DEVICE_FK as TIDGET20_2_0_, tidgetdata0_.GATEWAY_ID_FK as GATEWAY22_2_0_, tidgetdata0_.ERROR_CNT as ERROR4_2_0_, tidgetdata0_.MESSAGE_CNT as MESSAGE5_2_0_, tidgetdata0_.MESSAGE_TYPE as MESSAGE6_2_0_, tidgetdata0_.MESSAGE_LENGTH as MESSAGE7_2_0_, tidgetdata0_.GPSWEEK as GPSWEEK2_0_, tidgetdata0_.GPSSEC as GPSSEC2_0_, tidgetdata0_.FHFIELD3 as FHFIELD10_2_0_, tidgetdata0_.FHFIELD4 as FHFIELD11_2_0_, tidgetdata0_.TEMP as TEMP2_0_, tidgetdata0_.FEFIELD2 as FEFIELD13_2_0_, tidgetdata0_.FEFIELD3 as FEFIELD14_2_0_, tidgetdata0_.FEFIELD4 as FEFIELD15_2_0_, tidgetdata0_.HEALTHY as HEALTHY2_0_, tidgetdata0_.OSC_OFFSET as OSC17_2_0_, tidgetdata0_.CREATED_TIMES as CREATED18_2_0_, tidgetdata0_.MESSAGE as MESSAGE2_0_ from TRAUMA.TIDGET_DATA tidgetdata0_ where tidgetdata0_.GATEWAY_ID_FK=?
2006-12-08 23:01:08,105 4469 [main] DEBUG org.hibernate.loader.collection.OneToManyLoader  - Static select for one-to-many com.navsys.trauma.dal.model.TidgetHeader.tidgetDatas: select tidgetdata0_.TIDGET_HEADER_FK as TIDGET21_1_, tidgetdata0_.TIDGET_DATA_PK as TIDGET1_1_, tidgetdata0_.TIDGET_DATA_PK as TIDGET1_2_0_, tidgetdata0_.PROCESSED_FLAG as PROCESSED2_2_0_, tidgetdata0_.TIMES as TIMES2_0_, tidgetdata0_.TIDGET_HEADER_FK as TIDGET21_2_0_, tidgetdata0_.TIDGET_DEVICE_FK as TIDGET20_2_0_, tidgetdata0_.GATEWAY_ID_FK as GATEWAY22_2_0_, tidgetdata0_.ERROR_CNT as ERROR4_2_0_, tidgetdata0_.MESSAGE_CNT as MESSAGE5_2_0_, tidgetdata0_.MESSAGE_TYPE as MESSAGE6_2_0_, tidgetdata0_.MESSAGE_LENGTH as MESSAGE7_2_0_, tidgetdata0_.GPSWEEK as GPSWEEK2_0_, tidgetdata0_.GPSSEC as GPSSEC2_0_, tidgetdata0_.FHFIELD3 as FHFIELD10_2_0_, tidgetdata0_.FHFIELD4 as FHFIELD11_2_0_, tidgetdata0_.TEMP as TEMP2_0_, tidgetdata0_.FEFIELD2 as FEFIELD13_2_0_, tidgetdata0_.FEFIELD3 as FEFIELD14_2_0_, tidgetdata0_.FEFIELD4 as FEFIELD15_2_0_, tidgetdata0_.HEALTHY as HEALTHY2_0_, tidgetdata0_.OSC_OFFSET as OSC17_2_0_, tidgetdata0_.CREATED_TIMES as CREATED18_2_0_, tidgetdata0_.MESSAGE as MESSAGE2_0_ from TRAUMA.TIDGET_DATA tidgetdata0_ where tidgetdata0_.TIDGET_HEADER_FK=?
2006-12-08 23:01:08,105 4469 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory  - initializing class SessionFactoryObjectFactory
2006-12-08 23:01:08,105 4469 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory  - registered: 2c90851d0f644c6a010f644c6f890000 (unnamed)
2006-12-08 23:01:08,105 4469 [main] DEBUG org.hibernate.impl.SessionFactoryImpl  - instantiated session factory
2006-12-08 23:01:08,105 4469 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - total checked-out connections: 0
2006-12-08 23:01:08,105 4469 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - using pooled JDBC connection, pool size: 0
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration  - Execute first pass mapping processing
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration  - Process hbm files
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration  - Process annotated classes
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.AnnotationConfiguration  - processing manytoone fk mappings
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.Configuration  - processing extends queue
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.Configuration  - processing collection mappings
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.Configuration  - processing native query and ResultSetMapping mappings
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.Configuration  - processing association property references
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.Configuration  - processing foreign key constraints
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.Configuration  - resolving reference to class: com.navsys.trauma.dal.model.TidgetHeader
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.Configuration  - resolving reference to class: com.navsys.trauma.dal.model.GatewayId
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.Configuration  - resolving reference to class: com.navsys.trauma.dal.model.TidgetDevice
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.cfg.Configuration  - resolving reference to class: com.navsys.trauma.dal.model.TidgetData
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in thread context classloader
2006-12-08 23:01:08,355 4719 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
2006-12-08 23:01:08,370 4734 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in thread context classloader
2006-12-08 23:01:08,370 4734 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
2006-12-08 23:01:08,370 4734 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in thread context classloader
2006-12-08 23:01:08,370 4734 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
2006-12-08 23:01:08,402 4766 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in thread context classloader
2006-12-08 23:01:08,402 4766 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
2006-12-08 23:01:08,402 4766 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in thread context classloader
2006-12-08 23:01:08,402 4766 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
2006-12-08 23:01:08,402 4766 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in thread context classloader
2006-12-08 23:01:08,402 4766 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
2006-12-08 23:01:08,417 4781 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in thread context classloader
2006-12-08 23:01:08,417 4781 [main] DEBUG org.hibernate.validator.ClassValidator  - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
2006-12-08 23:01:08,433 4797 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - total checked-out connections: 0
2006-12-08 23:01:08,433 4797 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - opening new JDBC connection
2006-12-08 23:01:08,667 5031 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - created connection to: jdbc:oracle:thin:@odm:1521:odm, Isolation Level: 2
2006-12-08 23:01:08,667 5031 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - returning connection to pool, pool size: 1
2006-12-08 23:01:08,667 5031 [main] DEBUG org.hibernate.cfg.SettingsFactory  - Wrap result sets: disabled
2006-12-08 23:01:08,683 5047 [main] DEBUG org.hibernate.exception.SQLExceptionConverterFactory  - Using dialect defined converter
2006-12-08 23:01:08,870 5234 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - total checked-out connections: 0
2006-12-08 23:01:08,870 5234 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - opening new JDBC connection
2006-12-08 23:01:09,089 5453 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - created connection to: jdbc:oracle:thin:@odm:1521:odm, Isolation Level: 2
2006-12-08 23:01:09,089 5453 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - returning connection to pool, pool size: 1
2006-12-08 23:01:09,089 5453 [main] DEBUG org.hibernate.cfg.SettingsFactory  - Wrap result sets: disabled
2006-12-08 23:01:09,089 5453 [main] DEBUG org.hibernate.exception.SQLExceptionConverterFactory  - Using dialect defined converter
Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: GATEWAY_POSITION, expected: raw(255)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
   at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
   at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
   at com.navsys.trauma.dal.TTDal.main(TTDal.java:97)2006-12-08 23:01:09,120 5484 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider  - returning connection to pool, pool size: 1

Caused by: org.hibernate.HibernateException: Wrong column type: GATEWAY_POSITION, expected: raw(255)
   at org.hibernate.mapping.Table.validateColumns(Table.java:261)
   at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1080)
   at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:317)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
   at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
   ... 4 more


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 12, 2006 3:46 pm 
Newbie

Joined: Mon Jun 12, 2006 4:59 pm
Posts: 13
I've figured much of this out now:

http://www.hibernate.org/Documentation/ ... oJGeometry


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.