- This topic has 4 replies, 2 voices, and was last updated 17 years, 11 months ago by
Haris Peco.
-
AuthorPosts
-
richardelsberryMemberHello,
I’ve seen a few posts regarding this topic but none were quite the same issue as mine. While walking through the three wizard windows I select some options in window 1, leave window two alone and in window 3 enter more bean appropriate names ( fname –> firstName ).
Here’s my reveng.xml output:
<column name=”fname” jdbc-type=”java.lang.String” property=”firstName” type=”java.lang.String” />
all looks well. However, here’s my hbm file:
<property name=”fname” type=”java.lang.String”> <column name=”fname” length=”20″ /></property>
No change. All my tables have either an int or a BigInteger (MySQL 5). I consistently get the error message below. The wizard gives you the option to set JDBC type java.lang.Integer and Hibernate type of integer. I’ve tried all varieties from simple to resolved names with no luck.
Thanks, — I’ve also included my install settings below.
Richard!ENTRY com.genuitec.eclipse.hibernate 1 0 2007-03-16 10:57:12.453
!MESSAGE Error processing rev-eng settings file
!STACK 0
org.hibernate.MappingException: Could not configure overrides from file: C:\Documents and Settings\relsber\workspace\essence\hibernate.reveng.xml
at org.hibernate.cfg.reveng.OverrideRepository.addFile(OverrideRepository.java:79)
at com.genuitec.eclipse.hibernate.wizards.GenerateArtifactsJob.run(GenerateArtifactsJob.java:275)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: org.hibernate.MappingException: jdbc-type: java.lang.Integer is not a known JDBC Type nor a valid number
at org.hibernate.cfg.reveng.JDBCToHibernateTypeHelper.getJDBCType(JDBCToHibernateTypeHelper.java:119)
at org.hibernate.cfg.reveng.OverrideBinder.bindColumns(OverrideBinder.java:155)
at org.hibernate.cfg.reveng.OverrideBinder.bindIdentifiers(OverrideBinder.java:86)
at org.hibernate.cfg.reveng.OverrideBinder.bindTables(OverrideBinder.java:54)
at org.hibernate.cfg.reveng.OverrideBinder.bindRoot(OverrideBinder.java:37)
at org.hibernate.cfg.reveng.OverrideRepository.add(OverrideRepository.java:130)
at org.hibernate.cfg.reveng.OverrideRepository.addInputStream(OverrideRepository.java:109)
at org.hibernate.cfg.reveng.OverrideRepository.addFile(OverrideRepository.java:75)
… 2 more!ENTRY org.eclipse.jdt.ui 1 1 2007-03-16 10:57:13.156
!MESSAGE DAO bean WsuserinfoDAO already existed*** Date:
Friday, March 16, 2007 11:29:09 AM CDT** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_08*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 5.1.1 GA
Build id: 20070302-5.1.1-GA*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 5.1.1 GA
Build id: 20070302-5.1.1-GAEclipse Platform
Version: 3.2.2.r322_v20070119-RQghndJN8IM0MsK
Build id: M20070212-1330Eclipse RCP
Version: 3.2.2.r322_v20070104-8pcviKVqd8J7C1U
Build id: M20070212-1330Eclipse Java Development Tools
Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9-
Build id: M20070212-1330Eclipse Project SDK
Version: 3.2.2.r322_v20070104-dCGKm0Ln38lm-8s
Build id: M20070212-1330Eclipse Graphical Editing Framework
Version: 3.2.2.v20070208
Build id: 20070208-1315Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Program Files\MyEclipse 5.1.1 GA\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
d28_50
-vm
C:\Program Files\MyEclipse 5.1.1 GA\jre\bin\javaw.exe
Haris PecoMemberRichard,
You can change property name using ReverseEngineeringStrategy in MyEclipse 5.5M1.
As regards jdbc-type you have to use some Java jdbc-type defined in java.sql.Types.
Regards,
richardelsberryMemberMind providing an example in my code of String and Integer?
->java.lang.String
<column name=”fname” jdbc-type=”???” property=”firstName” type=”???” />->java.lang.Integer
<column name=”uid” jdbc-type=”???” property=”userID type=”???” />Richard
richardelsberryMemberFour hours of trial and error and I think I’ve figured it out….
->java.lang.String
<column name=”fname” jdbc-type=”VARCHAR” property=”firstName” type=”java.lang.String” />->java.lang.Integer
<column name=”uid” jdbc-type=”BIGINT” property=”userID type=”java.lang.Integer” />
Haris PecoMember->java.lang.String
<column name=”fname” jdbc-type=”VARCHAR” hibernate-type=”string” />->java.lang.Integer
<column name=”uid” jdbc-type=”INTEGER” hibernate-type=”long” />You can try change property for some table’s column using :
<table name=”YOUR_TABLE” >
<column name=”colname” property=”propName” />
</table>You can set this on 3th page of Rev.Eng wizard.
You can use MyEclipse 5.5M1 for more features in rev. engineering
Regards,
-
AuthorPosts