-->
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.  [ 3 posts ] 
Author Message
 Post subject: org.hibernate.tool.hbm2x.ExporterException
PostPosted: Thu Sep 06, 2012 3:30 am 
Newbie

Joined: Tue Mar 27, 2012 2:27 am
Posts: 1
Hi there,
I am totally new to hibernate tools. Don't even know how to configure properly.
I am facing the following exception. Need help. Urgent. Following is build.xml target and path description and then
followed by command console with exception output.

<path id="toolslib">
<path location="lib/hibernate/hibernate-tools-4.0.0.jar" />
<path location="lib/hibernate/hibernate3.jar" />
<path location="lib/hibernate/freemarker.jar" />
<path location="lib/hibernate/slf4j-api-1.5.8.jar" />
<path location="lib/hibernate/commons-logging-api-1.0.4.jar" />
<path location="lib/hibernate/slf4j-log4j12-1.5.8.jar" />
<path location="lib/hibernate/log4j-1.2.15.jar" />
<path location="lib/hibernate/hibernate-core-4.0.0.CR6.jar" />
<path location="lib/hibernate/log4j-1.2.15.jar" />
<path location="lib/hibernate/hibernate-jpa-2.0-api-1.0.1.Final.jar" />
<path location="lib/hibernate/bsh-2.0b1.jar" />
</path>
<target name="hibernatetool"
description="Generate Hibernate POJO">
<taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="toolslib" />

<hibernatetool destdir="src/main/generated">
<configuration
configurationfile="src/main/hibernate/hibernate.cfg.xml"
propertyfile="src/main/database.properties">
<fileset dir="src/main">
<include name="**/*.hbm.xml"/>
</fileset>
</configuration>
<hbm2java jdk5="true"/>
<hbm2java ejb3="true"/>
</hibernatetool>
</target>



D:\NIMS\Nims_Trunk>ant hibernatetool
Buildfile: build.xml

hibernatetool:
[hibernatetool] Executing Hibernate Tool with a Standard Configuration
[hibernatetool] 1. task: hbm2java (Generates a set of .java files)
[hibernatetool] SLF4J: This version of SLF4J requires log4j version 1.2.12 or later. See also http://www.slf4j.org/codes.html#log4j_version
[hibernatetool] Sep 6, 2012 12:52:20 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: Hibernate 3.1.1
[hibernatetool] Sep 6, 2012 12:52:20 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: hibernate.properties not found
[hibernatetool] Sep 6, 2012 12:52:20 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: using CGLIB reflection optimizer
[hibernatetool] Sep 6, 2012 12:52:20 PM org.hibernate.cfg.Environment <clinit>
[hibernatetool] INFO: using JDK 1.4 java.sql.Timestamp handling
[hibernatetool] Sep 6, 2012 12:52:20 PM org.hibernate.cfg.Configuration configure
[hibernatetool] INFO: configuring from file: hibernate.cfg.xml
[hibernatetool] Sep 6, 2012 12:52:21 PM org.hibernate.cfg.Configuration doConfigure
[hibernatetool] INFO: Configured SessionFactory: null
[hibernatetool] Sep 6, 2012 12:52:21 PM org.hibernate.cfg.Configuration addFile
[hibernatetool] INFO: Reading mappings from file: D:\NIMS\Nims_Trunk\src\main\KPIYearMaster.hbm.xml
[hibernatetool] Sep 6, 2012 12:52:21 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
[hibernatetool] INFO: Mapping class: com.nihilent.hrms.model.KPIYearMaster -> kpi_YearMaster
[hibernatetool] log4j:WARN No appenders could be found for logger (org.hibernate.tool.hbm2x.POJOExporter).
[hibernatetool] log4j:WARN Please initialize the log4j system properly.
[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 Entity: com.nihilent.hrms.model.KPIYearMaster with template pojo/Po
jo.ftl
[hibernatetool] freemarker.template.TemplateModelException: Method public java.lang.String org.hibernate.tool.hbm2x.pojo.BasicPOJOClass.getJavaTypeNam
e(org.hibernate.mapping.Property,boolean) threw an exception when invoked on Entity: com.nihilent.hrms.model.KPIYearMaster
[hibernatetool] java.lang.reflect.InvocationTargetException
[hibernatetool] java.lang.VerifyError: (class: org/hibernate/type/BasicTypeRegistry, method: <init> signature: ()V) Incompatible argument to function

BUILD FAILED
D:\NIMS\Nims_Trunk\build.xml:32: org.hibernate.tool.hbm2x.ExporterException: Error while processing Entity: com.nihilent.hrms.model.KPIYearMaster with
template pojo/Pojo.ftl

Total time: 2 seconds
D:\NIMS\Nims_Trunk>


Top
 Profile  
 
 Post subject: Re: org.hibernate.tool.hbm2x.ExporterException
PostPosted: Thu Sep 06, 2012 9:32 am 
Senior
Senior

Joined: Tue Aug 04, 2009 7:45 am
Posts: 124
Remove
<path location="lib/hibernate/hibernate3.jar" />
and add
hibernate-entitymanager-4.0.0.CR6.jar
hope this will help.


Top
 Profile  
 
 Post subject: Re: org.hibernate.tool.hbm2x.ExporterException
PostPosted: Tue Jan 22, 2013 7:24 am 
Newbie

Joined: Tue Jan 22, 2013 7:08 am
Posts: 3
Remove ยทยท


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