-->
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.  [ 9 posts ] 
Author Message
 Post subject: Cannot find hbm2java in hibernate-tools.jar
PostPosted: Thu May 25, 2006 7:05 am 
Newbie

Joined: Thu May 25, 2006 6:51 am
Posts: 4
I have downloaded hibernatetools-3.1.0.beta5.zip from hibernate.org but

I couldn't locate hbm2java package.

I've searched for it in \plugins\org.hibernate.eclipse_3.1.0.beta5\lib\tools\hibernate-tools.jar\org\hibernate\tool

I would like to know know whether I am on the right track.

Also I would like to know if there is any other way of generating java classes from hbm files.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 25, 2006 8:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
read the docs on tools.hibernate.org, here is quick link for you for an example on how to do it.

http://www.hibernate.org/hib_docs/tools ... le/#d0e983

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 5:43 am 
Newbie

Joined: Thu May 25, 2006 6:51 am
Posts: 4
Thank you for the reference
.. I'm still unable to generate the java files..

This is what I've done

--- I've downloaded Hibernate Tools from http://www.hibernate.org/30.html

--I've extracted hibernatetools-3.1.0.beta5.zip and
copied plugins/\org.hibernate.eclipse_3.1.0.beta5\lib\tools\hibernate-tools.jar into my project's lib folder and added it to my project.

--Here are the code files I've used

build.xml:
<target name="hibernatetool">
<path id="toolslib">
<path location="lib/hibernate-tools.jar" />
<path location="lib/hibernate3.jar" />
<path location="lib/freemarker.jar" />
<path location="${jdbc.driver.jar}" />
<path location="${jdbc.driver.jar}" />
<path location="lib\antlr-2.7.5H3.jar" />
<path location="lib\cglib-nodep-2.1_3.jar" />
<path location="lib\commons-beanutils.jar" />
<path location="lib\commons-collections.jar" />
<path location="lib\commons-dbcp.jar" />
<path location="lib\commons-digester-1.5.jar" />
<path location=";lib\commons-lang-2.0.jar" />
<path location="lib\commons-lang.jar" />
<path location="lib\commons-logging.jar" />
<path location="lib\commons-logging-api.jar;" />
<path location="lib\commons-pool.jar;" />
<path location="lib\db-ojb-1.0.3.jar;" />
<path location="lib\dom4j-1.6.jar" />
<path location="lib\ehcache-1.1.jar" />
<path location="lib\jstl.jar" />
<path location="lib\jta.jar" />
<path location="lib\mysql-connector-java-3.0.15-ga-bin.jar" />
<path location="lib\standard.jar" />
<path location="." />
</path>

<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib" />

<hibernatetool destdir="javafiles">
<configuration configurationfile="hibernate.cfg.xml"/>
<hbm2java />
</hibernatetool>
</target>

The Configuration File(hibernate.cfg.xml):

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.username">root</property>
<property name="connection.password"></property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">10</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<!-- <property name="hbm2ddl.auto">create</property> -->

<mapping resource="Airspace.hbm.xml"/>
<!-- <mapping resource="Airport.hbm.xml"/>
<mapping resource="Runway.hbm.xml"/>
<mapping resource="Signal.hbm.xml"/> -->
<!--<mapping resource="DPRData.hbm.xml"/>-->
</session-factory>
</hibernate-configuration>

The mapping File (Airspace.hbm.xml):

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class entity-name="Airspace">
<id name="id" type="long" column="ID"/>
<property name="name" type="string" column="NAME"/>
<property name="area" type="string" column="AREA"/>
<property name="country" type="string" column="COUNTRY"/>
<property name="entityType" type="string" column="ENTITYTYPE"/>
</class>
</hibernate-mapping>

Kindly look into it and lemme know what could be the problem.. I get a NullPointerException when I try to run my build file.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 5:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
run ant with ant -verbose and show the stacktrace.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 7:01 am 
Newbie

Joined: Thu May 25, 2006 6:51 am
Posts: 4
Here's the stack trace.. I couldn't make out anything from it.

hibernatetool:
dropping C:\EclipseForJava\SwingDemo2\lib\commons-logging-api.jar; from path as it doesn't exist
dropping C:\EclipseForJava\SwingDemo2\lib\commons-pool.jar; from path as it doesn't exist
dropping C:\EclipseForJava\SwingDemo2\lib\db-ojb-1.0.3.jar; from path as it doesn't exist
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
[hibernatetool] May 26, 2006 4:25:30 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: Hibernate 3.0.5
[hibernatetool] May 26, 2006 4:25:30 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: hibernate.properties not found
[hibernatetool] May 26, 2006 4:25:30 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: using CGLIB reflection optimizer
[hibernatetool] May 26, 2006 4:25:30 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: using JDK 1.4 java.sql.Timestamp handling
[hibernatetool] May 26, 2006 4:25:31 PM org.hibernate.cfg.Configuration configure
[hibernatetool] INFO: configuring from file: hibernate.cfg.xml
[hibernatetool] May 26, 2006 4:25:31 PM org.hibernate.cfg.Configuration addResource
[hibernatetool] INFO: Mapping resource: Airspace.hbm.xml
[hibernatetool] May 26, 2006 4:25:31 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[hibernatetool] INFO: Mapping class: Airspace -> Airspace
[hibernatetool] May 26, 2006 4:25:31 PM org.hibernate.cfg.Configuration doConfigure
[hibernatetool] INFO: Configured SessionFactory: null
[hibernatetool] May 26, 2006 4:25:31 PM org.hibernate.cfg.Configuration secondPassCompile
[hibernatetool] INFO: processing extends queue
[hibernatetool] May 26, 2006 4:25:31 PM org.hibernate.cfg.Configuration secondPassCompile
[hibernatetool] INFO: processing collection mappings
[hibernatetool] May 26, 2006 4:25:31 PM org.hibernate.cfg.Configuration secondPassCompile
[hibernatetool] INFO: processing association property references
[hibernatetool] May 26, 2006 4:25:31 PM org.hibernate.cfg.Configuration secondPassCompile
[hibernatetool] INFO: processing foreign key constraints
[hibernatetool] May 26, 2006 4:25:31 PM org.hibernate.tool.hbm2x.Version <clinit>
[hibernatetool] INFO: Hibernate Tools 3.1.0.beta5
[hibernatetool] May 26, 2006 4:25:32 PM freemarker.log.JDK14LoggerFactory$JDK14Logger error
[hibernatetool] SEVERE:
[hibernatetool] Method public boolean org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode() threw an exception when invoked on org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(Airspace)
[hibernatetool] The problematic instruction:
[hibernatetool] ----------
[hibernatetool] ==> if pojo.needsEqualsHashCode() && !clazz.superclass?exists [on line 1, column 1 in pojo/PojoEqualsHashcode.ftl]
[hibernatetool] in include "PojoEqualsHashcode.ftl" [on line 16, column 1 in pojo/Pojo.ftl]
[hibernatetool] ----------
[hibernatetool] Java backtrace for programmers:
[hibernatetool] ----------
[hibernatetool] freemarker.template.TemplateModelException: Method public boolean org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode() threw an exception when invoked on org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(Airspace)
[hibernatetool] at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136)
[hibernatetool] at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
[hibernatetool] at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
[hibernatetool] at freemarker.core.Expression.isTrue(Expression.java:138)
[hibernatetool] at freemarker.core.AndExpression.isTrue(AndExpression.java:68)
[hibernatetool] at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)
[hibernatetool] at freemarker.core.Environment.visit(Environment.java:196)
[hibernatetool] at freemarker.core.Environment.include(Environment.java:1375)
[hibernatetool] at freemarker.core.Include.accept(Include.java:155)
[hibernatetool] at freemarker.core.Environment.visit(Environment.java:196)
[hibernatetool] at freemarker.core.MixedContent.accept(MixedContent.java:92)
[hibernatetool] at freemarker.core.Environment.visit(Environment.java:196)
[hibernatetool] at freemarker.core.IfBlock.accept(IfBlock.java:82)
[hibernatetool] at freemarker.core.Environment.visit(Environment.java:196)
[hibernatetool] at freemarker.core.MixedContent.accept(MixedContent.java:92)
[hibernatetool] at freemarker.core.Environment.visit(Environment.java:196)
[hibernatetool] at freemarker.core.Environment.visit(Environment.java:233)
[hibernatetool] at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
[hibernatetool] at freemarker.core.Environment.visit(Environment.java:196)
[hibernatetool] at freemarker.core.MixedContent.accept(MixedContent.java:92)
[hibernatetool] at freemarker.core.Environment.visit(Environment.java:196)
[hibernatetool] at freemarker.core.Environment.process(Environment.java:176)
[hibernatetool] at freemarker.template.Template.process(Template.java:231)
[hibernatetool] at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:243)
[hibernatetool] at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplateProducer.java:67)
[hibernatetool] at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:28)
[hibernatetool] at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:97)
[hibernatetool] at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:112)
[hibernatetool] at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:101)
[hibernatetool] at org.hibernate.tool.hbm2x.GenericExporter.exportClasses(GenericExporter.java:84)
[hibernatetool] at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:69)
[hibernatetool] at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:93)
[hibernatetool] at org.hibernate.tool.hbm2x.GenericExporter.start(GenericExporter.java:59)
[hibernatetool] at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
[hibernatetool] at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:160)
[hibernatetool] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[hibernatetool] at org.apache.tools.ant.Task.perform(Task.java:364)
[hibernatetool] at org.apache.tools.ant.Target.execute(Target.java:341)
[hibernatetool] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[hibernatetool] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[hibernatetool] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[hibernatetool] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
[hibernatetool] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[hibernatetool] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[hibernatetool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
[hibernatetool] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
[hibernatetool] Caused by: java.lang.reflect.InvocationTargetException
[hibernatetool] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[hibernatetool] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[hibernatetool] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[hibernatetool] at java.lang.reflect.Method.invoke(Unknown Source)
[hibernatetool] at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:583)
[hibernatetool] at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:113)
[hibernatetool] ... 45 more
[hibernatetool] Caused by: java.lang.NoSuchMethodError: org.hibernate.mapping.Property.isNaturalIdentifier()Z
[hibernatetool] at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.usePropertyInEquals(BasicPOJOClass.java:226)
[hibernatetool] at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode(BasicPOJOClass.java:268)
[hibernatetool] at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode(BasicPOJOClass.java:277)
[hibernatetool] ... 51 more
[hibernatetool] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files)
[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.tool.hbm2x.ExporterException: Error while processing template Pojo
[hibernatetool] freemarker.template.TemplateModelException: Method public boolean org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode() threw an exception when invoked on org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(Airspace)
[hibernatetool] java.lang.reflect.InvocationTargetException
[hibernatetool] java.lang.NoSuchMethodError: org.hibernate.mapping.Property.isNaturalIdentifier()Z

BUILD FAILED
C:\EclipseForJava\SwingDemo2\build.xml:47: org.hibernate.tool.hbm2x.ExporterException: Error while processing template Pojo
at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:194)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:163)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
Caused by: org.hibernate.tool.hbm2x.ExporterException: Error while processing template Pojo
at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:249)
at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplateProducer.java:67)
at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:28)
at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:97)
at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:112)
at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:101)
at org.hibernate.tool.hbm2x.GenericExporter.exportClasses(GenericExporter.java:84)
at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:69)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:93)
at org.hibernate.tool.hbm2x.GenericExporter.start(GenericExporter.java:59)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:160)
... 11 more
Caused by: freemarker.template.TemplateModelException: Method public boolean org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode() threw an exception when invoked on org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(Airspace)
at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.isTrue(Expression.java:138)
at freemarker.core.AndExpression.isTrue(AndExpression.java:68)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.include(Environment.java:1375)
at freemarker.core.Include.accept(Include.java:155)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.visit(Environment.java:233)
at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:231)
at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:243)
... 22 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:583)
at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:113)
... 45 more
Caused by: java.lang.NoSuchMethodError: org.hibernate.mapping.Property.isNaturalIdentifier()Z
at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.usePropertyInEquals(BasicPOJOClass.java:226)
at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode(BasicPOJOClass.java:268)
at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode(BasicPOJOClass.java:277)
... 51 more
--- Nested Exception ---
org.hibernate.tool.hbm2x.ExporterException: Error while processing template Pojo
at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:249)
at org.hibernate.tool.hbm2x.TemplateProducer.produceToString(TemplateProducer.java:67)
at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:28)
at org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:97)
at org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:112)
at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:101)
at org.hibernate.tool.hbm2x.GenericExporter.exportClasses(GenericExporter.java:84)
at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:69)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:93)
at org.hibernate.tool.hbm2x.GenericExporter.start(GenericExporter.java:59)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:160)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
Caused by: freemarker.template.TemplateModelException: Method public boolean org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode() threw an exception when invoked on org.hibernate.tool.hbm2x.pojo.EntityPOJOClass(Airspace)
at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.isTrue(Expression.java:138)
at freemarker.core.AndExpression.isTrue(AndExpression.java:68)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.include(Environment.java:1375)
at freemarker.core.Include.accept(Include.java:155)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.visit(Environment.java:233)
at freemarker.core.BlockAssignment.accept(BlockAssignment.java:83)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:231)
at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:243)
... 22 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:583)
at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:113)
... 45 more
Caused by: java.lang.NoSuchMethodError: org.hibernate.mapping.Property.isNaturalIdentifier()Z
at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.usePropertyInEquals(BasicPOJOClass.java:226)
at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode(BasicPOJOClass.java:268)
at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode(BasicPOJOClass.java:277)
... 51 more


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 26, 2006 12:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Caused by: java.lang.NoSuchMethodError: org.hibernate.mapping.Property.isNaturalIdentifier()Z
[hibernatetool] at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.usePropertyInEquals(BasicPOJOClass.java:226)
[hibernatetool] at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode(BasicPOJOClass.java:268)
[hibernatetool] at org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.needsEqualsHashCode(BasicPOJOClass.java:27



you are not using the latest hibernate3.jar.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 27, 2006 1:31 pm 
Beginner
Beginner

Joined: Thu Feb 10, 2005 12:23 pm
Posts: 21
What is the way to generate generics using hbm2java? Also how to handle enums?

Hari


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 27, 2006 2:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
huh ? is this related to this thread ?

jdk5="true" for generics and I don't know how enums is related here; you will need to ask more specifically (but I suggest to that in a more relevant thread)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 29, 2006 1:18 am 
Newbie

Joined: Thu May 25, 2006 6:51 am
Posts: 4
Thank you very much. I am abe to generate java files now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 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.