Hello,
I have created three new tables in my database.
Code:
Table climate_classification
============================
I_GROUP, I_LNG, C_LBLCLS
----------------------------
I_GROUP          int(11) PK
I_LNG            int(11) PK
C_LBLCLS         varchar(25)
Table climate_coordinate_bkp
============================
R_LAT, R_LGT, C_CLS
----------------------------
R_LAT            double(9,7) PK
R_LGT            double(10,7) PK
C_CLS            varchar(3) PK
Table climate_group
===================
C_CLS, I_GROUP
-------------------
C_CLS            varchar(3) PK
I_GROUP          int(11) PK
So I have one table climate_classification listing main climate groups (from köppen), one table climate_group listing the "sub" climates et one table climate_coordinate setting the area of the "sub" climates.
I have define I_GROUP of my table climate_classification as foreign key for climate_group and I have also define C_CLS of my table climate_coordinate as foreign key from climate_group.
When I try to generate (reverse engineering) mapping files hbm and JAVA classes using Hibernate Tools for Eclipse (Version: 3.4.0.v20110215-1252-H31-GA) I got the following error:
Code:
java.lang.NullPointerException
   at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:100)
   at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:96)
   at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1354)
   at org.hibernate.cfg.JDBCMetaDataConfiguration.secondPassCompileForeignKeys(JDBCMetaDataConfiguration.java:34)
   at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1261)
   at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1206)
   at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:420)
   at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
   at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:72)
   at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:387)
   at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:320)
   at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:254)
   at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
   at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
   at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
   at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
What is the problem? where is it coming from?
thank you for your help.
Max