-->
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.  [ 1 post ] 
Author Message
 Post subject: Problem in creating mapping files
PostPosted: Wed Jun 08, 2005 8:47 am 
Newbie

Joined: Wed Jun 08, 2005 7:31 am
Posts: 2
Location: Malta
Dear All,

I am using Eclipse Platform, Version: 3.1.0 , Build id: 200412162000

Hibernate version: 3.0 and i am using postgresql database server 8.0 on windows xp

I installed hibernate-tool Version: 3.0 alpha 1, 25. January 2005
I also Install JBoss Eclipse IDE 1.4.x

I want to generate Mapping ( .hbm.xml files) automatically using hibernate tool ( using artifact generation ).

I have written java code ( persistent classes , however, the java code is commented using java docs but NOT using Xdoclet .. or Java Annotation , however i would love to know how to use both annotation methodologies........ but there is lot of documentation in learning and integrating. As i have already spent some 2-3 days in generating this .hbm.xml files automatically...... that..... now i prefer to generate mapping using a tool........... and i am quite close to generate automatic mapping.


1) I made Hibernate Configuration file using the tool
2) I also made hibernate console configuration
3) NOw, When i run artifact generation, the hibernate tool is NOT generating .hbm.xml files from my pojo ( java code)

Below is the hibernate.cfg.xml file that i am giving to Artifact Generator

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.url">jdbc:postgresql://127.0.0.1:5432/theArtist</property>
<property name="hibernate.use_outer_join">true</property>
<property name="hibernate.cglib.use_reflection_optimizer">true</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>

<property name="hibernate.connection.password">postgres</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="hibernate.default_schema">theArtist</property>
<property name="hibernate.show_sql">true</property>
</session-factory>
</hibernate-configuration>


The output i am getting from artifact generator is only GeneralHbmSetting.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>
<!--
Auto-generated mapping file from
the hibernate.org cfg2hbm engine
for General Global Setttings
-->


</hibernate-mapping>


question 1) What shall i put in for property ( hibernate.default_schema) ?
I have put my database name here.

question 2) While creating for Console Configuration, The tool ask for
Classpath ( only add path for pojo and driver - no hibiernate jars )

I gave the .bin/com/theartist/actors (.class files)... it didnt worked
After that .. i gave src directory .src/com/theartist/actors
.java files ...... it didnt work as well

Any help will be much appreciated.

Thank you very much
Kind Regards
Vaneet

_________________
Vaneet Sharma


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.