-->
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.  [ 22 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Full stack trace and contents of hibernate.reveng
PostPosted: Fri Feb 05, 2010 9:35 am 
Newbie

Joined: Sat Jan 02, 2010 6:09 am
Posts: 13
HI Max,

I am giving here the contents of my hibernate.reveng.xml file and full stack trace for errors. Another detailed information on errors I have to give via a Screen Shot, but I don't find any way to attach it here.

Please try to help me on below details


Contents of hibernate.reveng.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
<table-filter match-schema="ECSTEST" match-name=".*"/>
</hibernate-reverse-engineering>

My Schema ECSTEST contains the tables having Composite Primary Key


Errors Report

org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: T20100125183747Exception with template hbm/hibernate-mapping.hbm.ftl

Error while processing Entity: T20100125183747Exception with template hbm/hibernate-mapping.hbm.ftl
freemarker.core.InvalidReferenceException: Expression property.value.propertyIterator is undefined on line 58, column 30 in hbm/id.hbm.ftl.

Expression property.value.propertyIterator is undefined on line 58, column 30 in hbm/id.hbm.ftl.
freemarker.core.InvalidReferenceException: Expression property.value.propertyIterator is undefined on line 58, column 30 in hbm/id.hbm.ftl.
Expression property.value.propertyIterator is undefined on line 58, column 30 in hbm/id.hbm.ftl.



2010-02-05 19:38:18,421 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in PROJ_USER_ACCESS. Asking rev.eng. strategy
2010-02-05 19:38:18,421 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for PROJ_USER_ACCESS
2010-02-05 19:38:18,515 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in T20100125_181627_EXCEPTION. Asking rev.eng. strategy
2010-02-05 19:38:18,515 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for T20100125_181627_EXCEPTION
2010-02-05 19:38:18,515 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in T20100125_183747_EXCEPTION. Asking rev.eng. strategy
2010-02-05 19:38:18,515 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for T20100125_183747_EXCEPTION
2010-02-05 19:38:18,531 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in T20100125_184012_EXCEPTION. Asking rev.eng. strategy
2010-02-05 19:38:18,531 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for T20100125_184012_EXCEPTION
2010-02-05 19:38:18,531 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in T20100125_184134_EXCEPTION. Asking rev.eng. strategy
2010-02-05 19:38:18,531 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for T20100125_184134_EXCEPTION
2010-02-05 19:38:18,546 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in T20100203_122820_EXCEPTION. Asking rev.eng. strategy
2010-02-05 19:38:18,546 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for T20100203_122820_EXCEPTION
2010-02-05 19:38:18,546 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - The JDBC driver didn't report any primary key columns in T20100203_123025_EXCEPTION. Asking rev.eng. strategy
2010-02-05 19:38:18,546 WARN Worker-27 org.hibernate.cfg.reveng.JDBCReader - Rev.eng. strategy did not report any primary key columns for T20100203_123025_EXCEPTION
2010-02-05 19:38:19,203 ERROR Worker-27 freemarker.runtime -

Expression property.value.propertyIterator is undefined on line 58, column 30 in hbm/id.hbm.ftl.
The problematic instruction:
----------
==> foreach keyproperty in property.value.propertyIterator [on line 58, column 5 in hbm/id.hbm.ftl]
in include "id.hbm.ftl" [on line 72, column 2 in hbm/persistentclass.hbm.ftl]
in include "persistentclass.hbm.ftl" [on line 34, column 1 in hbm/hibernate-mapping.hbm.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression property.value.propertyIterator is undefined on line 58, column 30 in hbm/id.hbm.ftl.
at freemarker.core.TemplateObject.assertNonNull(Unknown Source)
at freemarker.core.IteratorBlock.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.MixedContent.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.IfBlock.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.Environment.include(Unknown Source)
at freemarker.core.Include.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.MixedContent.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.IfBlock.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.IfBlock.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.MixedContent.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.Environment.include(Unknown Source)
at freemarker.core.Include.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.MixedContent.accept(Unknown Source)
at freemarker.core.Environment.visit(Unknown Source)
at freemarker.core.Environment.process(Unknown Source)
at freemarker.template.Template.process(Unknown Source)
at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(Unknown Source)
at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(Unknown Source)
at org.hibernate.tool.hbm2x.TemplateProducer.produce(Unknown Source)
at org.hibernate.tool.hbm2x.TemplateProducer.produce(Unknown Source)
at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(Unknown Source)
at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(Unknown Source)
at org.hibernate.tool.hbm2x.GenericExporter$2.process(Unknown Source)
at org.hibernate.tool.hbm2x.GenericExporter.doStart(Unknown Source)
at org.hibernate.tool.hbm2x.HibernateMappingExporter.doStart(Unknown Source)
at org.hibernate.tool.hbm2x.AbstractExporter.start(Unknown Source)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$1.execute(Unknown Source)
at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
at org.hibernate.console.ConsoleConfiguration.execute(Unknown Source)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(Unknown Source)
at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(Unknown Source)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(Unknown Source)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(Unknown Source)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(Unknown Source)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)


Last edited by abhikesath on Fri Feb 05, 2010 3:30 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Fri Feb 05, 2010 11:17 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Seems like the bug into the template.


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Fri Feb 05, 2010 3:27 pm 
Newbie

Joined: Sat Jan 02, 2010 6:09 am
Posts: 13
What can be the solution of this Bug??


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Mon Feb 08, 2010 8:07 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
abhikesath,
did you use custom templates?
I ask because I have looked into id template and can't understand how the error at the line could happened.


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Mon Feb 08, 2010 8:28 am 
Newbie

Joined: Sat Jan 02, 2010 6:09 am
Posts: 13
No, I have not used any custom template


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Mon Feb 08, 2010 8:45 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Can you give me your db schema?


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Mon Feb 08, 2010 9:18 am 
Newbie

Joined: Sat Jan 02, 2010 6:09 am
Posts: 13
I did not got your question.
Do you want to know my schema structure(Tables contained in that) ?


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Mon Feb 08, 2010 9:20 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Yes, sql or ddl.


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Mon Feb 08, 2010 9:26 am 
Newbie

Joined: Sat Jan 02, 2010 6:09 am
Posts: 13
CREATE TABLE PROJECT_CONFIGURATION (
CONFIGURATION_ID INTEGER NOT NULL,
ORIGINAL_VALUE1 CHAR(100) NOT NULL,
ORIGINAL_VALUE2 CHAR(100),
PROJECT_ID INTEGER NOT NULL,
CURRENT_VALUE1 CHAR(100) NOT NULL,
CURRENT_VALUE2 CHAR(100)
)

ALTER TABLE PROJECT_CONFIGURATION ADD CONSTRAINT PROJECT_CONFIGURATION_PK PRIMARY KEY
(CONFIGURATION_ID,
PROJECT_ID);

ALTER TABLE PROJECT_CONFIGURATION ADD CONSTRAINT PROJECT_CONFIGURATION_CONFIGURATION_FK FOREIGN KEY
(CONFIGURATION_ID)
REFERENCES CONFIGURATION
(CONFIGURATION_ID);

ALTER TABLE PROJECT_CONFIGURATION ADD CONSTRAINT PROJECT_CO_PROJ_FK FOREIGN KEY
(PROJECT_ID)
REFERENCES PROJECT
(PROJECT_ID)
ON DELETE CASCADE;


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Mon Feb 08, 2010 9:45 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Hibernate-tools generated the following code to me:
<class name="test.ProjectConfiguration" table="project_configuration" schema="ecstest">
<composite-id name="id" class="test.ProjectConfigurationId">
<key-property name="configurationId" type="int">
<column name="configuration_id" />
</key-property>
<key-property name="projectId" type="int">
<column name="project_id" />
</key-property>
</composite-id>
<many-to-one name="project" class="test.Project" update="false" insert="false" fetch="select">
<column name="project_id" not-null="true" />
</many-to-one>
...
</class>

Probably you are using some old version?


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Mon Feb 08, 2010 11:37 am 
Newbie

Joined: Sat Jan 02, 2010 6:09 am
Posts: 13
I am using "hibernate tools 3.2.4.ga". Can you please send me the jar file you are using.


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Mon Feb 08, 2010 12:05 pm 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Try to replace the jar
https://anonsvn.jboss.org/repos/jbossto ... -tools.jar
into your org.hibernate.eclipse plugin.


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Tue Feb 09, 2010 4:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
your schema does not list the tables that the error is about - i.e. what is T20100125183747Exception ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Wed Feb 10, 2010 3:04 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
The name of the Entity in db I guess.


Top
 Profile  
 
 Post subject: Re: Full stack trace and contents of hibernate.reveng
PostPosted: Wed Feb 10, 2010 3:04 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
I mean the name of the Table.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 22 posts ]  Go to page 1, 2  Next

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.