[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-5461) NullPointerException when reverse engineering

Dmitry Geraskov (JIRA) jira-events at lists.jboss.org
Tue Dec 22 08:29:32 EST 2009


     [ https://jira.jboss.org/jira/browse/JBIDE-5461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Geraskov updated JBIDE-5461:
-----------------------------------

    Labels: NullPointerException foreign key  (was: NullPointerException foreign key special_characters utf8)


> NullPointerException when reverse engineering
> ---------------------------------------------
>
>                 Key: JBIDE-5461
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-5461
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Hibernate
>    Affects Versions: 3.1.0.CR1
>         Environment: Using eclipse Platform Version: 3.5.1 Build id: M20090917-0800 on debian etch, Hibernate Tools 3.2.4.v200909151014R-H192-GA
>            Reporter: Olivier Cailloux
>            Assignee: Dmitry Geraskov
>            Priority: Minor
>             Fix For: 3.1.0.CR2
>
>         Attachments: fk_patch.txt, fk_patch.txt
>
>
> This error appears when reverse engineering (trying to generate Java5 EJB3 code) a mysql database:
> java.lang.NullPointerException
> at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:77)
> at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73)
> at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1263)
> at org.hibernate.cfg.JDBCMetaDataConfiguration.secondPassCompileForeignKeys(JDBCMetaDataConfiguration.java:33)
> at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1170)
> at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
> at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$2.execute(CodeGenerationLaunchDelegate.java:318)
> at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:64)
> at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:94)
> at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.buildConfiguration(CodeGenerationLaunchDelegate.java:285)
> at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:218)
> at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:138)
> at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
> at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
> at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
> at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> You will find herebelow the sql schema, to import into a mysql 5.0 database. I used mysql --default-character-set=utf8 to import it.
> The error does not happen if the last line of the schema (adding a foreign key) is removed.
> Thanks for any help.
> ----
> DROP TABLE IF EXISTS Catégorie;
> CREATE TABLE Catégorie
> (
> ID Int8
> );
> DROP TABLE IF EXISTS Transaction;
> CREATE TABLE Transaction
> (
> Compte_positif Int8
> );
> alter table Catégorie ADD INDEX(ID);
> alter table Transaction add constraint youpee foreign key (Compte_positif) references Catégorie(ID);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jbosstools-issues mailing list