discriminator type="integer" blows up
-------------------------------------
Key: HHH-2444
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2444
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.2
Environment: Hibernate 3.2.2, Postgresql 8.2
Reporter: Mark Grand
Attachments: z.cfg.xml, z.hbm.xml
If the type of discriminator is integer, SessionFactoryImpl.<init> blows up with
org.hibernate.MappingException: Could not format discriminator value to SQL string
...
Caused by: java.lang.NumberFormatException: For input string:
"com.hytaps.dataDictionary.FieldDescription"
Here is the full log:
[main] INFO com.hytaps.main.Z - Entering main method.
[main] INFO com.hytaps.recordManager.HibernateSessionFactory - Creating hibernate session
factory.
[main] INFO org.hibernate.cfg.Environment - Hibernate 3.2.2
[main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
[main] INFO org.hibernate.cfg.Environment - Bytecode provider name : cglib
[main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
[main] INFO org.hibernate.cfg.Configuration - configuring from resource: /z.cfg.xml
[main] INFO org.hibernate.cfg.Configuration - Configuration resource: /z.cfg.xml
[main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource :
com/hytaps/dataDictionary/z.hbm.xml
[main] INFO org.hibernate.cfg.HbmBinder - Mapping class:
com.hytaps.dataDictionary.FieldDescription -> field_description
[main] INFO org.hibernate.cfg.HbmBinder - Mapping subclass:
com.hytaps.dataDictionary.TimeFieldDescription -> field_description
[main] INFO org.hibernate.cfg.HbmBinder - Mapping class join:
com.hytaps.dataDictionary.TimeFieldDescription -> time_field_description
[main] INFO org.hibernate.cfg.HbmBinder - Mapping subclass:
com.hytaps.dataDictionary.ColorFieldDescription -> field_description
[main] INFO org.hibernate.cfg.HbmBinder - Mapping class join:
com.hytaps.dataDictionary.ColorFieldDescription -> color_field_description
[main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
[main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate
built-in connection pool (not for production use!)
[main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate
connection pool size: 20
[main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode:
false
[main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver:
org.postgresql.Driver at URL: jdbc:postgresql://127.0.0.1:5432/hytaps_db
[main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection
properties: {user=hytaps, password=****}
[main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: PostgreSQL, version: 8.2.0
[main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: PostgreSQL Native Driver,
version: PostgreSQL 8.2 JDBC3 with SSL (build 504)
[main] INFO org.hibernate.dialect.Dialect - Using dialect:
org.hibernate.dialect.PostgreSQLDialect
[main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default
transaction strategy (direct JDBC transactions)
[main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No
TransactionManagerLookup configured (in JTA environment, use of read-write or
transactional second-level cache is not recommended)
[main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion():
disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of
transaction: disabled
[main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
[main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data:
disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
[main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
[main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
[main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key:
disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Query translator:
org.hibernate.hql.ast.ASTQueryTranslatorFactory
[main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using
ASTQueryTranslatorFactory
[main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
[main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
[main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Cache provider:
org.hibernate.cache.NoCacheProvider
[main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries:
disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier
rollback: disabled
[main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
[main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
[main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
[main] FATAL com.hytaps.main.Z - An exception is being thrown out of
HytapsInstaller.main()
org.hibernate.MappingException: Could not format discriminator value to SQL string
at
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:307)
at
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at
com.hytaps.recordManager.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:81)
at
com.hytaps.recordManager.HibernateSessionFactory.createSession(HibernateSessionFactory.java:61)
at com.hytaps.main.Z.main(Z.java:49)
Caused by: java.lang.NumberFormatException: For input string:
"com.hytaps.dataDictionary.FieldDescription"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.<init>(Unknown Source)
at org.hibernate.type.IntegerType.stringToObject(IntegerType.java:55)
at
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:300)
... 6 more
[main] INFO com.hytaps.main.Z - Exiting main method
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira