-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: NPE w/ artifact gen. wiz.
PostPosted: Sun Jul 31, 2005 1:49 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Full stack trace of any exception that occurs:

!ENTRY org.hibernate.eclipse.console 4 4 2005-07-30 21:35:36.187
!MESSAGE Error under artifact generation
!STACK 0
java.lang.NullPointerException
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73)
at org.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:51)
at org.hibernate.cfg.JDBCBinder.processForeignKeys(JDBCBinder.java:1087)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:136)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
!SUBENTRY 1 org.hibernate.eclipse.console 4 4 2005-07-30 21:35:36.187
!MESSAGE <No message>
!STACK 0
java.lang.NullPointerException
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73)
at org.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:51)
at org.hibernate.cfg.JDBCBinder.processForeignKeys(JDBCBinder.java:1087)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:136)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2005-07-30 21:35:36.187
!MESSAGE <no message>
!STACK 0
java.lang.NullPointerException
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73)
at org.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:51)
at org.hibernate.cfg.JDBCBinder.processForeignKeys(JDBCBinder.java:1087)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:136)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)


Name and version of the database you are using:

PostrgreSQL 8.0.3-1 w/ the following drivers:
postgresql-8.0-312.jdbc2.jar
postgresql-8.0-312.jdbc2ee.jar
postgresql-8.0-312.jdbc3.jar

The application will pause before this occurs, the text above the progress bar indicates the JDBC meta data is being read. Lots of activity in the server side logs. I can connect to the DB from the same machine and manually query tables such as pg_tables w/ the same user name and password.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 31, 2005 5:45 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
which version of the tools ? from cvs?

could you submit the DDL you are trying to reverse engineer in a jira case ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 31, 2005 1:58 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
version = hibernate-tools-3.0.0.alpha4a .

NPE still there after moving the DB from Linux/remote to Windows/local.

I am able to generate artifacts after blowing away 10 random tables (I just need any DB for the upcoming hbm2jsf contrib).

The schema might not be my intellectual property, in which case it can't go in the JIRA. I can find out what it is about those 10 tables if it interests you?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 31, 2005 2:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes please.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 31, 2005 8:15 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
One of the tables created by the backup script has no PK, just a not-null field w/ a unique constraint. I was not the author. Another table has a FK that refers to the unique field. I have stripped the entire schema down to 2 tables and 3 columns and I can still reproduce the error.

Kill the FK constraint, problem goes away.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 3:08 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
if you could put that stripped down schema into jira i would appreciate it.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 11:43 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
http://opensource.atlassian.com/project ... se/HBX-360


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.