Regular |
|
Joined: Tue Jul 13, 2004 2:27 am Posts: 73 Location: Singapore
|
Hibernate version: 2.1.6
Mapping documents:
<property name="workflowStatus" column="WORKFLOW_STATUS" type="net.canal.app.workflow.persistence.WorkflowStatusType"/>
Full stack trace of any exception that occurs:
-------------------------------------------------------
Schema text failed: Could not determine type for column WORKFLOW_STATUS of type net.sf.hibernate.type.CompositeCustomType: java.lang.ArrayIndexOutOfBoundsException
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:146)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: net.sf.hibernate.MappingException: Could not determine type for column WORKFLOW_STATUS of type net.sf.hibernate.type.CompositeCustomType: java.lang.ArrayIndexOutOfBoundsException
at net.sf.hibernate.mapping.Column.getAutoSqlType(Column.java:97)
at net.sf.hibernate.mapping.Column.getSqlType(Column.java:115)
at net.sf.hibernate.mapping.Table.sqlCreateString(Table.java:170)
at net.sf.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:514)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:59)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getSchemaExport(SchemaExportTask.java:209)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:136)
... 10 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at net.sf.hibernate.mapping.Column.getAutoSqlType(Column.java:94)
... 16 more
--- Nested Exception ---
net.sf.hibernate.MappingException: Could not determine type for column WORKFLOW_STATUS of type net.sf.hibernate.type.CompositeCustomType: java.lang.ArrayIndexOutOfBoundsException
at net.sf.hibernate.mapping.Column.getAutoSqlType(Column.java:97)
at net.sf.hibernate.mapping.Column.getSqlType(Column.java:115)
at net.sf.hibernate.mapping.Table.sqlCreateString(Table.java:170)
at net.sf.hibernate.cfg.Configuration.generateSchemaCreationScript(Configuration.java:514)
at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:59)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getSchemaExport(SchemaExportTask.java:209)
at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:136)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at net.sf.hibernate.mapping.Column.getAutoSqlType(Column.java:94)
... 16 more
Hi,
I am getting the above error when I try to generate database scheme.
The error happens after I added the CompositeCustomType.
Here is my class:
public class WorkflowStatus extends BaseObject {
private Integer currentStatus;
private Calendar initialDate;
private Calendar closeDate;
private Calendar dueDate;
private Set approverStatus = new HashSet();
public WorkflowStatus () {
}
.....
}
then I added :
public class WorkflowStatusType implements CompositeUserType {
......
}
I have no idea now what causes the error.
appreciate any help
thanks
lixin
|
|