-->
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.  [ 6 posts ] 
Author Message
 Post subject: freemarker.template.TemplateException while using hbm2hbmxml
PostPosted: Mon Feb 25, 2008 6:03 am 
Senior
Senior

Joined: Mon Feb 25, 2008 1:48 am
Posts: 191
Location: India
Hi
I am using ant to invoke hbm2hbmxml tool. I am getting an ExporterException. What should I do??? This is a very urgent requirement. Please help!!!

Following is the Ant script:

Code:
<project name = "hibernate-test" default="hibernatetool">
<property name = "lib.dir" location="lib"/>
    <path id="lib.classpath">
        <fileset dir="${lib.dir}">
            <include name="*.jar"/>
        </fileset>
    </path>

   <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="lib.classpath"/>
    <target name = "hibernatetool">
       <echo message="Performing hbm2hbmxml.." />
      <hibernatetool destdir="/generated/bin">
           <classpath>
               <path refid="lib.classpath"/>
         </classpath>
           <jdbcconfiguration configurationfile ="hibernate.cfg.xml"/>
           <hbm2hbmxml/>
      </hibernatetool>
       <echo message="Done...." />
   </target>
</project>


Hibernate version: :3.2.5.ga

Full stack trace of any exception that occurs:
[echo] Performing hbm2hbmxml..
[hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
[hibernatetool] 1. task: hbm2hbmxml (Generates a set of hbm.xml files)
[hibernatetool] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
[hibernatetool] log4j:WARN Please initialize the log4j system properly.
[hibernatetool] An exception occurred while running exporter #2:hbm2hbmxml (Generates a set of hbm.xml files)
[hibernatetool] To get the full stack trace run ant with -verbose
[hibernatetool] org.hibernate.tool.hbm2x.ExporterException: Error while processing template hbm/hibernate-mapping.hbm.ftl
[hibernatetool] freemarker.template.TemplateException: Error reading included file hbm/${c2h.getTag(property)}.hbm.ftl
[hibernatetool] java.io.FileNotFoundException: Template hbm/${c2h.getTag(property)}.hbm.ftl not found.

BUILD FAILED
C:\dnb1\sentinel\local\SentinelHBMProject\build.xml:45: org.hibernate.tool.hbm2x.ExporterException: Error while processing template hbm/hibernate-mapping.hbm.ftl
at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189)
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 hbm/hibernate-mapping.hbm.ftl
at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:257)
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:146)
at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:135)
at org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.java:41)
at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:126)
at org.hibernate.tool.hbm2x.HibernateMappingExporter.doStart(HibernateMappingExporter.java:34)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
... 11 more
Caused by: freemarker.template.TemplateException: Error reading included file hbm/${c2h.getTag(property)}.hbm.ftl
at freemarker.template.Include.accept(Include.java:163)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.MixedContent.accept(MixedContent.java:91)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.ConditionalBlock.accept(ConditionalBlock.java:78)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.MixedContent.accept(MixedContent.java:91)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.Environment.include(Environment.java:1018)
at freemarker.template.Environment.include(Environment.java:964)
at freemarker.template.Include.accept(Include.java:153)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.MixedContent.accept(MixedContent.java:91)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.Environment.process(Environment.java:166)
at freemarker.template.Template.process(Template.java:238)
at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:251)
... 22 more
Caused by: java.io.FileNotFoundException: Template hbm/${c2h.getTag(property)}.hbm.ftl not found.
at freemarker.template.Configuration.getTemplate(Configuration.java:450)
at freemarker.template.Environment.include(Environment.java:963)
at freemarker.template.Include.accept(Include.java:153)
... 38 more
--- Nested Exception ---
org.hibernate.tool.hbm2x.ExporterException: Error while processing template hbm/hibernate-mapping.hbm.ftl
at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:257)
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:146)
at org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:135)
at org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.java:41)
at org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:126)
at org.hibernate.tool.hbm2x.HibernateMappingExporter.doStart(HibernateMappingExporter.java:34)
at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
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.TemplateException: Error reading included file hbm/${c2h.getTag(property)}.hbm.ftl
at freemarker.template.Include.accept(Include.java:163)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.MixedContent.accept(MixedContent.java:91)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.ConditionalBlock.accept(ConditionalBlock.java:78)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.MixedContent.accept(MixedContent.java:91)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.Environment.include(Environment.java:1018)
at freemarker.template.Environment.include(Environment.java:964)
at freemarker.template.Include.accept(Include.java:153)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.MixedContent.accept(MixedContent.java:91)
at freemarker.template.Environment.visit(Environment.java:180)
at freemarker.template.Environment.process(Environment.java:166)
at freemarker.template.Template.process(Template.java:238)
at org.hibernate.tool.hbm2x.TemplateHelper.processTemplate(TemplateHelper.java:251)
... 22 more
Caused by: java.io.FileNotFoundException: Template hbm/${c2h.getTag(property)}.hbm.ftl not found.
at freemarker.template.Configuration.getTemplate(Configuration.java:450)
at freemarker.template.Environment.include(Environment.java:963)
at freemarker.template.Include.accept(Include.java:153)
... 38 more

Name and version of the database you are using: mySQL


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 04, 2008 11:53 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
this looks very weird. Is this using the builtin templates or some templates you have customized?

report in jira with details if builtin templates.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 12:10 am 
Senior
Senior

Joined: Mon Feb 25, 2008 1:48 am
Posts: 191
Location: India
Hello Max,
Thanks for your reply. However, I solved the issue. I added the
bsh-2.0b1.jar, jtidy-r8-20060801.jar to fix the issue. Previosly I was using Tidy.jar. However, I am still not sure why that error showed up.

Quote:
Is this using the builtin templates or some templates you have customized?


Not custom templates. I was using the templates that comes with hibernate-tools.jar.

Also just to know, If you can tell me why jtidy.jar is required instead of tidy.jar it would be great. I read in someother website that only tidy.jar is enough and thats why I was using it. It took me more than 2 days to solve the issue.

And Max, is there a way to tell <hbm2hbmxml> tool to generate a single mapping file instead of seperate mapping files for each table. My project has 250 tables and I end up getting 250 mapping files. Its too many files to manage. :(

_________________
Sukirtha


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 2:57 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Sukirtha wrote:
Hello Max,
Thanks for your reply. However, I solved the issue. I added the
bsh-2.0b1.jar, jtidy-r8-20060801.jar to fix the issue. Previosly I was using Tidy.jar. However, I am still not sure why that error showed up.


bsh should not be needed.

jtidy I know what is, Tidy.jar I never heard about. Why should that be enough ?

But in any case I have no idea why a missing jtidy should give this error while freemarker is processing the templates!? That does not make sense.

Quote:
And Max, is there a way to tell <hbm2hbmxml> tool to generate a single mapping file instead of seperate mapping files for each table. My project has 250 tables and I end up getting 250 mapping files. Its too many files to manage. :(


answered that in your other thread.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 06, 2008 1:37 am 
Senior
Senior

Joined: Mon Feb 25, 2008 1:48 am
Posts: 191
Location: India
Quote:
But in any case I have no idea why a missing jtidy should give this error while freemarker is processing the templates!? That does not make sense.

Yes even I feel the same. However, I did nothing else other than changing the jar files. So thats still a grey area.[/quote]

_________________
Sukirtha


Top
 Profile  
 
 Post subject: Here is detailed log I am getting for same issue..
PostPosted: Sun May 18, 2008 1:46 pm 
Newbie

Joined: Fri May 16, 2008 1:42 pm
Posts: 10
Have tried all same things you mention to no avail..
Also posted here
http://forum.hibernate.org/viewtopic.php?p=2385491

Doesn't work in code download jpwh-gettingstarted-070401\helloworld-reverse. from here: http://www.hibernate.org/hib_files/jpwh-gettingstarted-070401.zip as posted here http://www.hibernate.org/400.html, under Getting Started - Hello World
As you can see I've dumped out the classpath from Ant so you can see all jar versions I'm using.
Also mentioned in other forum on first url other version's (IE the ones in Getting Started - Hello World download) I've tried.
1) I'm using the set associated to hibernate-3.2.6GA core from here: http://sourceforge.net/project/showfiles.php?group_id=40712&package_id=127784&release_id=574498
2) WRT:Jtidy/Freemarker/bsh etc. Using set from Eclipse, source from here: http://download.jboss.org/jbosstools/updates/stable/ (JBossTools Stable Update Site: 2.0.1.GA)
3) Command/Ant target being invoked is:ant reveng.hbmxml -debug. hbm2hbmxml in Ant target reveng.hbmxml is causing the failure. It never gets to hbm2cfgxml.
4) Also decided to add log4j.properties to basedir to get more logging stuff fo you. BTW: This was not in book.
5) Is this a legit copy of Freemarker? Why do I have security access (doPrivileged) stuff in log? Is this normal? Does hbm2hbmxml require some sort of priveleges being granted in order to write it's output? It's looks like the process does it's stuff then can't write output to my disk?

If there is anything else I can furnish you with to get to bottom of this let me know.
Regards, Jeremy

--------
Right. I got to the bottom of this. It's an Ant classloading thing.
I should have known better. Got burnt by this earlier.
As soon as I copied:
freemarker.jar, jtidy...jar, bsh....jar
to <usr profile>/.ant/lib with all the other hibernate jars everything ran sweetly and my Message.hbm.xml file magically appeared in src/hello from hbm2hbmxml and hbm2cfgxml created hibernate.cfg.xml in src!
My sanity is restored once more! :)

--------



build.xml
Code:
<project name="Hello World Reverse" default="compile" basedir=".">

    <!-- Name of project and version -->
    <property name="proj.name"      value="${ant.project.name}"/>
    <property name="proj.shortname" value="helloworld-reverse"/>
    <property name="version"        value="1.0"/>

    <!-- Global properties for this build -->
    <property name="database.dir"           value="database"/>
    <property name="src.java.dir"           value="src"/>
    <property name="lib.dir"                value="lib"/>

    <!-- Classpath declaration -->
    <path id="project.classpath">
        <fileset dir="${lib.dir}">
            <include name="**/*.jar"/>
            <include name="**/*.zip"/>
        </fileset>
    </path>

    <!-- Useful shortcuts -->
    <patternset id="meta.files">
        <include name="**/*.xml"/>
        <include name="**/*.properties"/>
    </patternset>

    <!-- Clean up -->
    <target name="clean" description="Clean the source directory">
        <delete dir="${src.java.dir}"/>
        <mkdir dir="${src.java.dir}"/>
    </target>

    <!-- Start the HSQL DB server -->
    <target name="startdb" description="Run HSQL database server with clean DB">
        <java classname="org.hsqldb.Server"
              fork="yes"
              classpathref="project.classpath"
              failonerror="true">
            <arg value="-database.0"/>
            <arg value="file:${database.dir}/db"/>
        </java>
    </target>

    <!-- Start the HSQL DB browser tool -->
    <target name="dbmanager" description="Start HSQL DB manager">
        <java
            classname="org.hsqldb.util.DatabaseManagerSwing"
            fork="yes"
            classpathref="project.classpath"
            failonerror="true">
            <arg value="-url"/>
            <arg value="jdbc:hsqldb:hsql://localhost/"/>
            <arg value="-driver"/>
            <arg value="org.hsqldb.jdbcDriver"/>
        </java>
    </target>

    <!-- Enable the HibernateToolTask -->
    <taskdef name="hibernatetool"
             classname="org.hibernate.tool.ant.HibernateToolTask"
             classpathref="project.classpath"/>

    <!-- Generate XML metadata mappig files from database schema -->
    <target name="reveng.hbmxml"
            description="Read database, generate XML mapping files">
        <property name="project.classpath.string" refid="project.classpath"/>
        <echo message="project.classpath = ${project.classpath.string}" />
        <available property="db.present" file="${basedir}/helloworld.db.properties" type="file"/>
        <available property="re.present" file="${basedir}/helloworld.reveng.xml" type="file"/>
     <echo message="db present = ${db.present}" />
     <echo message="re present = ${re.present}" />
        <hibernatetool destdir="${src.java.dir}">
            <jdbcconfiguration
                propertyfile="${basedir}/helloworld.db.properties"
                revengfile="${basedir}/helloworld.reveng.xml"/>
            <hbm2hbmxml/> <!-- Export Hibernate XML file -->
            <hbm2cfgxml/> <!-- Export a hibernate.cfg.xml file -->
        </hibernatetool>

    </target>

    <!-- Generate Java persistent classes from XML mapping files -->
    <target name="reveng.pojos"
            description="Read XML mapping files, generate POJOs">

        <hibernatetool destdir="${src.java.dir}">
            <configuration>
                <fileset dir="${src.java.dir}">
                    <include name="**/*.hbm.xml"/>
                </fileset>
            </configuration>
            <hbm2java/> <!-- Generate POJO source -->
        </hibernatetool>

    </target>

    <!-- Generate annotated Java entity beans from database schema -->
    <target name="reveng.entities"
            description="Read database, generate Java entity beans">

        <hibernatetool destdir="${src.java.dir}">
            <jdbcconfiguration
                propertyfile="${basedir}/helloworld.db.properties"
                revengfile="${basedir}/helloworld.reveng.xml"/>
            <hbm2java jdk5="true" ejb3="true"/>
            <hbm2cfgxml ejb3="true"/>
        </hibernatetool>

    </target>

</project>


log file

Code:
Detected OS: Windows XP
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file -> C:\Book Downloads\Java Persistence with
Hibernate\Jeremys Hello Junk\helloworldRev\build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hell
o Junk\helloworldRev\build.xml with URI = file:/C:/Book%20Downloads/Java%20Persi
stence%20with%20Hibernate/Jeremys%20Hello%20Junk/helloworldRev/build.xml
Setting ro project property: ant.project.name -> Hello World Reverse
Adding reference: Hello World Reverse
Setting ro project property: ant.file.Hello World Reverse -> C:\Book Downloads\J
ava Persistence with Hibernate\Jeremys Hello Junk\helloworldRev\build.xml
Project base dir set to: C:\Book Downloads\Java Persistence with Hibernate\Jerem
ys Hello Junk\helloworldRev
+Target:
+Target: clean
+Target: startdb
+Target: dbmanager
+Target: reveng.hbmxml
+Target: reveng.pojos
+Target: reveng.entities
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
Setting project property: proj.name -> Hello World Reverse
Setting project property: proj.shortname -> helloworld-reverse
Setting project property: version -> 1.0
Setting project property: database.dir -> database
Setting project property: src.java.dir -> src
Setting project property: lib.dir -> lib
Adding reference: project.classpath
Adding reference: meta.files
fileset: Setup scanner in dir C:\Book Downloads\Java Persistence with Hibernate\
Jeremys Hello Junk\helloworldRev\lib with patternSet{ includes: [**/*.jar, **/*.
zip] excludes: [] }
Class org.hibernate.tool.ant.HibernateToolTask loaded from parent loader (parent
First)
+Datatype hibernatetool org.hibernate.tool.ant.HibernateToolTask
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `reveng.hbmxml' is [reveng.hbmxml]
Complete build sequence is [reveng.hbmxml, startdb, reveng.entities, reveng.pojo
s, clean, dbmanager, ]

reveng.hbmxml:
Setting project property: project.classpath.string -> C:\Book Downloads\Java Per
sistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\antlr-2.7.6.jar;C:\
Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworldRev\
lib\asm-attrs.jar;C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hell
o Junk\helloworldRev\lib\asm.jar;C:\Book Downloads\Java Persistence with Hiberna
te\Jeremys Hello Junk\helloworldRev\lib\bsh-2.0b1.jar;C:\Book Downloads\Java Per
sistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\c3p0-0.9.1.jar;C:\B
ook Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworldRev\l
ib\cglib-2.1.3.jar;C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hel
lo Junk\helloworldRev\lib\commons-collections-2.1.1.jar;C:\Book Downloads\Java P
ersistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\commons-logging-1
.0.4.jar;C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\he
lloworldRev\lib\dom4j-1.6.1.jar;C:\Book Downloads\Java Persistence with Hibernat
e\Jeremys Hello Junk\helloworldRev\lib\freemarker.jar;C:\Book Downloads\Java Per
sistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\hibernate-tools.jar
;C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworld
Rev\lib\hibernate3.jar;C:\Book Downloads\Java Persistence with Hibernate\Jeremys
Hello Junk\helloworldRev\lib\hsqldb.jar;C:\Book Downloads\Java Persistence with
Hibernate\Jeremys Hello Junk\helloworldRev\lib\jta.jar;C:\Book Downloads\Java P
ersistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\jtidy-r8-20060801
.jar;C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\hellow
orldRev\lib\log4j-1.2.11.jar
     [echo] project.classpath = C:\Book Downloads\Java Persistence with Hibernat
e\Jeremys Hello Junk\helloworldRev\lib\antlr-2.7.6.jar;C:\Book Downloads\Java Pe
rsistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\asm-attrs.jar;C:\B
ook Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworldRev\l
ib\asm.jar;C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\
helloworldRev\lib\bsh-2.0b1.jar;C:\Book Downloads\Java Persistence with Hibernat
e\Jeremys Hello Junk\helloworldRev\lib\c3p0-0.9.1.jar;C:\Book Downloads\Java Per
sistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\cglib-2.1.3.jar;C:\
Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworldRev\
lib\commons-collections-2.1.1.jar;C:\Book Downloads\Java Persistence with Hibern
ate\Jeremys Hello Junk\helloworldRev\lib\commons-logging-1.0.4.jar;C:\Book Downl
oads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\dom4j-
1.6.1.jar;C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\h
elloworldRev\lib\freemarker.jar;C:\Book Downloads\Java Persistence with Hibernat
e\Jeremys Hello Junk\helloworldRev\lib\hibernate-tools.jar;C:\Book Downloads\Jav
a Persistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\hibernate3.jar
;C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworld
Rev\lib\hsqldb.jar;C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hel
lo Junk\helloworldRev\lib\jta.jar;C:\Book Downloads\Java Persistence with Hibern
ate\Jeremys Hello Junk\helloworldRev\lib\jtidy-r8-20060801.jar;C:\Book Downloads
\Java Persistence with Hibernate\Jeremys Hello Junk\helloworldRev\lib\log4j-1.2.
11.jar
[available] Found file: helloworld.db.properties
Setting project property: db.present -> true
[available] Found file: helloworld.reveng.xml
Setting project property: re.present -> true
     [echo] db present = true
     [echo] re present = true
[hibernatetool] Executing Hibernate Tool with a JDBC Configuration (for reverse
engineering)
[hibernatetool] 1. task: hbm2hbmxml (Generates a set of hbm.xml files)
Couldn't load ResourceStream for commons-logging.properties
Couldn't load ResourceStream for META-INF/services/org.apache.commons.logging.Lo
gFactory
Class org.apache.log4j.Logger loaded from parent loader (parentFirst)
Class org.apache.commons.logging.impl.Log4JLogger loaded from parent loader (par
entFirst)
Class org.apache.commons.logging.impl.Log4JLogger loaded from parent loader (par
entFirst)
Couldn't load Resource log4j.xml
Resource log4j.properties loaded from parent loader
Class org.apache.log4j.ConsoleAppender loaded from parent loader (parentFirst)
Class org.apache.log4j.PatternLayout loaded from parent loader (parentFirst)
Finding class org.apache.log4j.PatternLayoutBeanInfo
Finding class org.apache.log4j.LayoutBeanInfo
Finding class java.lang.ObjectBeanInfo
Finding class org.apache.log4j.ConsoleAppenderBeanInfo
Finding class org.apache.log4j.WriterAppenderBeanInfo
Finding class org.apache.log4j.AppenderSkeletonBeanInfo
[hibernatetool] 18:20:32,953  INFO Environment:514 - Hibernate 3.2.6
Couldn't load ResourceStream for hibernate.properties
[hibernatetool] 18:20:32,968  INFO Environment:547 - hibernate.properties not fo
und
[hibernatetool] 18:20:32,968  INFO Environment:681 - Bytecode provider name : cg
lib
[hibernatetool] 18:20:32,984  INFO Environment:598 - using JDK 1.4 java.sql.Time
stamp handling
[hibernatetool] 18:20:33,093  INFO OverrideRepository:108 - Override file: C:\Bo
ok Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworldRev\he
lloworld.reveng.xml
ResourceStream for META-INF/services/javax.xml.parsers.SAXParserFactory loaded f
rom parent loader
Class org.apache.xerces.jaxp.SAXParserFactoryImpl loaded from parent loader (par
entFirst)
Couldn't load ResourceStream for META-INF/services/org.apache.xerces.xni.parser.
XMLParserConfiguration
Class org.apache.xerces.parsers.XIncludeAwareParserConfiguration loaded from par
ent loader (parentFirst)
Class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl loaded from parent loader (
parentFirst)
Class org.dom4j.DocumentFactory loaded from parent loader (parentFirst)
Class org.dom4j.tree.QNameCache loaded from parent loader (parentFirst)
[hibernatetool] 18:20:33,234  INFO DriverManagerConnectionProvider:41 - Using Hi
bernate built-in connection pool (not for production use!)
[hibernatetool] 18:20:33,234  INFO DriverManagerConnectionProvider:42 - Hibernat
e connection pool size: 20
[hibernatetool] 18:20:33,234  INFO DriverManagerConnectionProvider:45 - autocomm
it mode: false
Class sun.jdbc.odbc.JdbcOdbcDriver loaded from parent loader (parentFirst)
[hibernatetool] 18:20:33,265  INFO DriverManagerConnectionProvider:80 - using dr
iver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:hsql://localhost
[hibernatetool] 18:20:33,265  INFO DriverManagerConnectionProvider:86 - connecti
on properties: {user=sa}
[hibernatetool] 18:20:33,328  INFO SettingsFactory:89 - RDBMS: HSQL Database Eng
ine, version: 1.8.0
[hibernatetool] 18:20:33,328  INFO SettingsFactory:90 - JDBC driver: HSQL Databa
se Engine Driver, version: 1.8.0
Class org.hibernate.dialect.HSQLDialect loaded from parent loader (parentFirst)
[hibernatetool] 18:20:33,343  INFO Dialect:152 - Using dialect: org.hibernate.di
alect.HSQLDialect
[hibernatetool] 18:20:33,390  INFO TransactionFactoryFactory:31 - Using default
transaction strategy (direct JDBC transactions)
[hibernatetool] 18:20:33,390  INFO TransactionManagerLookupFactory:33 - No Trans
actionManagerLookup configured (in JTA environment, use of read-write or transac
tional second-level cache is not recommended)
[hibernatetool] 18:20:33,390  INFO SettingsFactory:143 - Automatic flush during
beforeCompletion(): disabled
[hibernatetool] 18:20:33,406  INFO SettingsFactory:147 - Automatic session close
at end of transaction: disabled
[hibernatetool] 18:20:33,421  INFO SettingsFactory:154 - JDBC batch size: 15
[hibernatetool] 18:20:33,421  INFO SettingsFactory:157 - JDBC batch updates for
versioned data: disabled
[hibernatetool] 18:20:33,421  INFO SettingsFactory:162 - Scrollable result sets:
enabled
[hibernatetool] 18:20:33,437  INFO SettingsFactory:170 - JDBC3 getGeneratedKeys(
): disabled
[hibernatetool] 18:20:33,453  INFO SettingsFactory:178 - Connection release mode
: auto
[hibernatetool] 18:20:33,453  INFO SettingsFactory:205 - Default batch fetch siz
e: 1
[hibernatetool] 18:20:33,468  INFO SettingsFactory:209 - Generate SQL with comme
nts: disabled
[hibernatetool] 18:20:33,484  INFO SettingsFactory:213 - Order SQL updates by pr
imary key: disabled
[hibernatetool] 18:20:33,484  INFO SettingsFactory:217 - Order SQL inserts for b
atching: disabled
[hibernatetool] 18:20:33,500  INFO SettingsFactory:386 - Query translator: org.h
ibernate.hql.ast.ASTQueryTranslatorFactory
Class org.hibernate.hql.ast.ASTQueryTranslatorFactory loaded from parent loader
(parentFirst)
[hibernatetool] 18:20:33,515  INFO ASTQueryTranslatorFactory:24 - Using ASTQuery
TranslatorFactory
[hibernatetool] 18:20:33,531  INFO SettingsFactory:225 - Query language substitu
tions: {}
[hibernatetool] 18:20:33,546  INFO SettingsFactory:230 - JPA-QL strict complianc
e: disabled
[hibernatetool] 18:20:33,546  INFO SettingsFactory:235 - Second-level cache: ena
bled
[hibernatetool] 18:20:33,562  INFO SettingsFactory:239 - Query cache: disabled
[hibernatetool] 18:20:33,562  INFO SettingsFactory:373 - Cache provider: org.hib
ernate.cache.NoCacheProvider
Class org.hibernate.cache.NoCacheProvider loaded from parent loader (parentFirst
)
[hibernatetool] 18:20:33,593  INFO SettingsFactory:254 - Optimize cache for mini
mal puts: disabled
[hibernatetool] 18:20:33,593  INFO SettingsFactory:263 - Structured second-level
cache entries: disabled
[hibernatetool] 18:20:33,609  INFO SettingsFactory:290 - Statistics: disabled
[hibernatetool] 18:20:33,609  INFO SettingsFactory:294 - Deleted entity syntheti
c identifier rollback: disabled
[hibernatetool] 18:20:33,625  INFO SettingsFactory:309 - Default entity-mode: po
jo
[hibernatetool] 18:20:33,640  INFO SettingsFactory:313 - Named query checking :
enabled
[hibernatetool] 18:20:33,703  INFO DriverManagerConnectionProvider:147 - cleanin
g up connection pool: jdbc:hsqldb:hsql://localhost

BUILD FAILED
C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworldR
ev\build.xml:72: java.lang.NoClassDefFoundError: freemarker/template/TemplateExc
eption
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:115)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.NoClassDefFoundError: freemarker/template/TemplateException

        at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java
:92)
        at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
        at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.ja
va:186)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        ... 11 more
Caused by: java.lang.ClassNotFoundException: freemarker.template.TemplateExcepti
on
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 20 more
--- Nested Exception ---
java.lang.NoClassDefFoundError: freemarker/template/TemplateException
        at org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java
:92)
        at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:40)
        at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.ja
va:186)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.ClassNotFoundException: freemarker.template.TemplateExcepti
on
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        ... 20 more

Total time: 1 second
C:\Book Downloads\Java Persistence with Hibernate\Jeremys Hello Junk\helloworldR
ev>


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