The property
profilo is mapped into sql CLOB type it should result in
LVARCHAR or CLOB or TEXT.
In InformixDialect class there is this code:
Code:
registerColumnType(Types.LONGVARCHAR, "clob"); // or TEXT?
but the results is the stack trace below.
I've tried also with "text", "clob", but the result is the same.
If i use "string" with lenght 300 i get "varchar(300)" which is over the maximum lenght allowed (255).
Can anyone help me?
Thanks.
Gianni
Hibernate version: 3.1RC3
Mapping documents:
<hibernate-mapping>
<class name="it.tdgroup.anagrafe.beans.UtenteTemporaneo" table="utenti_temporanei">
<meta attribute="generated-class" inherit="false">it.tdgroup.anagrafe.beans.AbstractUtenteTemporaneo</meta>
<meta attribute="scope-class">public abstract</meta>
<meta attribute="extends">BaseObject</meta>
<id name="id" column="id_utente" type="int" unsaved-value="0">
<generator class="increment"/>
</id>
<property name="descrizioneUtente" column="descr_utente" type="string" />
<property name="nomeUtente" column="user_name" type="string" />
<property name="password" column="password" type="string" not-null="true" />
<property name="email" column="email" type="string" />
<property name="profilo" column="profilo" type="java.sql.Clob"/>
<property name="codiceFiscale" column="codicefiscale" type="string" />
<many-to-one name="ente" class="it.tdgroup.anagrafe.beans.Ente" column="id_ente" />
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:
Buildfile: E:\Eclipse_workspace\GUA\build.xml
db:
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2ddl (Generates database schema)
[hibernatetool] - MLog clients using log4j logging.
[hibernatetool] - Initializing c3p0-0.9.0 [built 11-July-2005 00:43:29 -0400; debug? true; trace: 10]
[hibernatetool] - Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@14dd758 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@983d95 [ acquireIncrement -> 1, acquireRetryAttempts -> 100000, acquireRetryDelay -> 30, autoCommitOnClose -> false, automaticTestTable -> test_c3p0, breakAfterAcquireFailure -> false, checkoutTimeout -> 10000, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 983d95, idleConnectionTestPeriod -> 30, initialPoolSize -> 1, maxIdleTime -> 0, maxPoolSize -> 20, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 1, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@1e2befa [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> 1e2befa, jdbcUrl -> jdbc:informix-sqli://titano.regione.toscana.it:1625/anagrafe1:informixserver=dbsvi64_net, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 300, testConnectionOnCheckin -> true, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ], factoryClassLocation -> null, identityToken -> 14dd758, numHelperThreads -> 3 ]
[hibernatetool] - could not complete schema update
[hibernatetool] org.hibernate.MappingException: No Dialect mapping for JDBC type: 2005
[hibernatetool] at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
[hibernatetool] at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
[hibernatetool] at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:170)
[hibernatetool] at org.hibernate.mapping.Column.getSqlType(Column.java:181)
[hibernatetool] at org.hibernate.mapping.Table.sqlCreateString(Table.java:349)
[hibernatetool] at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:842)
[hibernatetool] at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:144)
[hibernatetool] at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:36)
[hibernatetool] at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:144)
[hibernatetool] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hibernatetool] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatetool] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatetool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hibernatetool] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[hibernatetool] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[hibernatetool] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[hibernatetool] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[hibernatetool] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[hibernatetool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[hibernatetool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[hibernatetool] - could not complete schema update
[hibernatetool] org.hibernate.MappingException: No Dialect mapping for JDBC type: 2005
[hibernatetool] at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
[hibernatetool] at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
[hibernatetool] at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:170)
[hibernatetool] at org.hibernate.mapping.Column.getSqlType(Column.java:181)
[hibernatetool] at org.hibernate.mapping.Table.sqlCreateString(Table.java:349)
[hibernatetool] at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:842)
[hibernatetool] at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:144)
[hibernatetool] at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:36)
[hibernatetool] at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:144)
[hibernatetool] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hibernatetool] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatetool] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatetool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hibernatetool] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[hibernatetool] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[hibernatetool] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[hibernatetool] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[hibernatetool] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[hibernatetool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[hibernatetool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
BUILD SUCCESSFUL
Total time: 8 seconds
Name and version of the database you are using:
nformix Dynamic Server
9.40.FC6
IBM Informix JDBC Driver for IBM Informix Dynamic Server 2.21.JC3