-->
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.  [ 14 posts ] 
Author Message
 Post subject: Hibernate Tools Zip Incomplete?
PostPosted: Mon Aug 29, 2005 3:50 pm 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
I've had this working before but setting up a new environment and it's been a while...

Java 1.5 and Eclipse 3.1 working.
Want to get the Hibernate Tools plugin working but can't.

Downloaded hibernate-tools-3.1.0.alpha5.zip but it seems incomplete. The read me says it has things like \plugins\org.hibernate.eclipse_3.1.0.alpha5\lib\tools in it but it don't have them...

Are they missing or am I missing something... e.g. a prerequisite.

Thanks to anyone who replies!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 29, 2005 3:55 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
that directory got jarred up so the lib is inside the .jar.

but the eclipse plugins should work fine from the downloads.

if you want to run the ant tools then just unzip the jar with the same name as the directory and you can get the libs from there.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 29, 2005 4:01 pm 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
Thanks max. It's late... Really appreciate the quick reply


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 11:32 am 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
Still not got it working actually... thought I had.

The tools comes down as a ZIP containing 20 plugin jars and 1 features jar. Am I suppose to unjar each on into a folder with the same name as the jar in the eclipse plugins directory (if that makes sense).

If so, why is it zipped up like this? I'm sure last time I installed the Hibernate Eclipse plugin it was a 2 second job. Plus the documentation is not clear as to what's to do now and needs clarification...

Appreciate any comments including pointing out what I'm missing if I'm being stupid ;o)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 11:35 am 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
Ignore last comment. Unzipped it again and it worked...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 11:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you unzip the contents so what is in plugins go into plugins and features go into features...

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 12:03 pm 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
Don't know what happened to be honest. Unzipped it again and the plugin was ok. Do you need to do anything in eclipse to get ant to pick up org.hibernate.tool.ant.HibernateToolTask. It can't find it but I thought it would pick it up as it's buried in the plugin directory. Thanks Max


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 12:15 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the ant stuff is indepdent from eclipse so just follow the instructions in the docs.

the docs talks about which jars you need (like hibernatetools.jar, velocity.jar etc.) - all of these are inside the org.hibernate.eclipse_3.0.0.alpha5.jar

we could probably provide some easy setup for ant from inside eclipse (but i'm not much for performing black magic on a tool that should be usable and indepdent from eclipse :)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 1:27 pm 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
Hi Max, thanks for the help. I've got it working and reverse engineering the DB now so can now get started.

I do think that a short tutorial or something would help in the documentation. For example, there's nowhere that says that after you download and extract the tools plugin, to actually get it to work in eclipse or command line with ant, you need to extract the org.hibernate.eclipse_3.1.0.alpha5.jar itself. Also the documentation is not complete with the dependencies in the classpath. I would think that getting ant working was fundamental and therefore to make it a complete plugin... etc etc. However, I have it working and really appreciate your help.

For anyone else who's maybe struggling, this is what I did.

    Install Eclipse.
    Download and extract to the eclipse plugins the Hibernate Tools.
    Go into the eclipse plugins directory and extract the org.hibernate.eclipse_3.1.0.alpha5.jar to c:/eclipse/plugins/org.hibernate.eclipse_3.1.0.alpha5
    Create the hibernate.cfg.xml
    Create the DB


Then I used this build script (it has a few other things in it but the important one is the reverse engineer)
Code:
<?xml version="1.0"?>
<project name="$project.name" default="reverse.engineer">
   <property file="${basedir}/build.properties"/>

    <description>
            The freewave application
    </description>
   
   <path id="compile.classpath">
      <fileset dir="${lib.dir}">
            <include name="**/*.jar"/>
       </fileset>
   </path>
   
   <path id="hibernate.classpath">
      <fileset dir="${hibernate.plugin.dir}">
          <include name="**/hibernate-tools.jar"/>
         <include name="**/velocity-1.4.jar"/>
         <include name="**/velocity-tools-generic-1.1.jar"/>
         <include name="**/jtidy-r8-21122004.jar"/>
         <include name="**/hibernate3.jar"/>
         <include name="**/ehcache-1.1.jar"/>
         <include name="**/commons-collections-2.1.1.jar"/>         
       </fileset>
      <fileset dir="${mysql.connector.dir}">
            <include name="**/mysql-connector-java-3.1.10-bin.jar"/>
       </fileset>
      <fileset dir="${lib.dir}">
          <include name="**/commons-logging.jar"/>
         <include name="**/dom4j-1.6.1.jar"/>
       </fileset>
   </path>
   
   <taskdef name="hibernatetool"
      classname="org.hibernate.tool.ant.HibernateToolTask"
      classpathref="hibernate.classpath">
    </taskdef>
   
   <target name="default" depends="create.database" description="Builds the lot">
    </target>
   
    <target name="clean" depends="" description="">
       <delete dir="${generated.dir}" />
    </target>
   
    <target name="prepare" depends="" description="">
       <mkdir dir="${generated.classes.dir}" />
       <mkdir dir="${generated.src.dir}" />
    </target>
   
    <target name="compile" depends="" description="">
       <javac classpathref="compile.classpath"
          srcdir="${basedir}/src"
          destdir="${generated.classes.dir}" />
    </target>

   
   <target name="create.database" depends="" description="Builds the database">
      <sql driver="${db.driver}"
         password="${db.password}"
         src="${db.dir}/create.sql"
         url="${db.url}"
         userid="${db.user}"
         classpath="${db.driver.classpath}">
      </sql>
   </target>
   
   <target name="reverse.engineer" depends="prepare" description="Creates the DTO's from the Database">
      <hibernatetool destdir="${generated.src.dir}">
         <classpath>
            <path id="hibernate.runtime.classpath">
               <fileset dir="${hibernate.plugin.dir}">
                  <include name="**/velocity-tools-generic-1.1.jar"/>
                </fileset>
            </path>
         </classpath>
         
         <jdbcconfiguration configurationfile="${config.dir}/hibernate.cfg.xml"/>
         <hbm2java ejb3="false" />
      </hibernatetool>
   </target>
</project>


I have this properties file which may be of use too

Code:
project.name=Freewave

eclipse.dir=C:/eclipse
eclipse.plugin.dir=${eclipse.dir}/plugins
src.dir=${basedir}/src
lib.dir=${basedir}/lib
config.dir=${basedir}/config

generated.dir=${basedir}/generated
generated.classes.dir=${generated.dir}/WEB-INF/classes
generated.src.dir=${generated.dir}/src

db.dir=${basedir}/db
db.driver=com.mysql.jdbc.Driver
db.driver.classpath=C:/mysql-connector-java-3.1.10/mysql-connector-java-3.1.10-bin.jar
db.url=jdbc:mysql\:\/\/localhost\:3306\/freewave?autoReconnect=true
db.password=tomcat
db.user=tomcat

test.dir=${basedir}/test

hibernate.dir=C:/hibernate-3.1
hibernate.plugin.dir=${eclipse.plugin.dir}/org.hibernate.eclipse_3.1.0.alpha5
hibernate.plugin.tools.dir=${hibernate.plugin.dir}/lib/tools
hibernate.plugin.hibernate.dir=${hibernate.plugin.dir}/lib/hibernate

mysql.connector.dir=C:/mysql-connector-java-3.1.10


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 1:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the docs contains a build.xml very similar to yours AFAIK - must be missing something since it did not work for you...

any patches to the docs are very much appreciated!

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 1:54 pm 
Regular
Regular

Joined: Wed Jun 29, 2005 11:14 pm
Posts: 119
Location: København
I based mine on the one in the docs but there were just a few classpath things missing and 1.4 where it should have been 1.1 for the velocity tools jar and the velocity needed for the reverse engineer. It was the extracting and then extracting again that really stumped me. If my paste helps anyone then I'm glad to help, if not then no harm done.
But thanks for the help max - you never seem to be offline!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 2:33 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I were not trying to discourage your posting more/better info - I were trying to encourage you to go that small little extra step extra and enhance the current docs by submitting a patch for it ...........

and no, i am offline at times ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: Hibernate Tools Zip Incomplete?
PostPosted: Sun Sep 04, 2005 3:26 am 
Beginner
Beginner

Joined: Sun Sep 04, 2005 3:10 am
Posts: 24
Location: CH
Hi I am a newbie to Hibernate.
Have following configuration:
Java 1. 4.2 and Eclipse 3.0 working.

I have the same problem as Tim robertson:
timrobertson100 wrote:

Want to get the Hibernate Tools plugin working but can't.

Downloaded hibernate-tools-3.1.0.alpha5.zip but it seems incomplete. The read me says it has things like \plugins\org.hibernate.eclipse_3.1.0.alpha5\lib\tools in it but it don't have them...

Are they missing or am I missing something... e.g. a prerequisite.

Thanks to anyone who replies!


But with another extraction I could not solve the problem which look like:

After the extraction of the dowloaded zip i found entries to use the tools as wizards:
- Artifact Generation
- ...
- Hibernate Reverse engineering


After clicking for example on the Reverse Engineering wizard , eclipse complains:
The select wizard could not be started. Reason: Pug-in org.hibernate.eclipse.console was unable to load class: org.hibernate.console.wizards.NewReverseEngineeringFileWizard


Any suggestions what I have made wrong?

Thanks, chk


Top
 Profile  
 
 Post subject: Re: Hibernate Tools Zip Incomplete?
PostPosted: Sun Sep 04, 2005 3:34 am 
Beginner
Beginner

Joined: Sun Sep 04, 2005 3:10 am
Posts: 24
Location: CH
chk wrote:
Hi I am a newbie to Hibernate.
Have following configuration:
Java 1. 4.2 and Eclipse 3.0 working.

I have the same problem as Tim robertson:
timrobertson100 wrote:

Want to get the Hibernate Tools plugin working but can't.

Downloaded hibernate-tools-3.1.0.alpha5.zip but it seems incomplete. The read me says it has things like \plugins\org.hibernate.eclipse_3.1.0.alpha5\lib\tools in it but it don't have them...

Are they missing or am I missing something... e.g. a prerequisite.

Thanks to anyone who replies!


But with another extraction I could not solve the problem which look like:

After the extraction of the dowloaded zip i found entries to use the tools as wizards:
- Artifact Generation
- ...
- Hibernate Reverse engineering


After clicking for example on the Reverse Engineering wizard , eclipse complains:
The select wizard could not be started. Reason: Pug-in org.hibernate.eclipse.console was unable to load class: org.hibernate.console.wizards.NewReverseEngineeringFileWizard


Any suggestions what I have made wrong?

Thanks, chk


As I just saw:
I also cannot open the Hibernate Console. Eclipse complains:
Problems opening perspective "org.hibernate.eclipse.console.HibernateConsolePerspective"

Again, any suggestions?
:-(
chk


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