Re: Netbeans + hibernate -> ou mettre les elements ?
mathieu kobsch <[email protected]> Wed, 21 Mar 2007 11:32:06 +0100
| Newsgroups | gmane.comp.java.netbeans.general.french |
|---|---|
| Message-ID | <[email protected]> |
Bonjour
Merci pour les adresse mais cela fait 5 jour que je connais ton blog hihi
j'ai réussi la premiere partie et grace à toi j'ai pu valider
l'installation de mysql et la connexion mysql<->Java sans Hibernate
par contre j'avoue que j'ai suivit a la lettre ton tuto pour les partie
2 et 3 mais à cause de mon probleme de path, cela ne marche pas. Je vais
restester avec ta solution que tu m'a indiquer. Je lacherai pas le bout :-)
Voila il lit correctement mon fichier hibernate.cfg.xml mais j'ai un
nouveau soucis * j'ai la poisse * :
Log de tomcat :
Initial SessionFactory creation
failed.org.hibernate.InvalidMappingException: Could not parse mapping
document from resource ./essai/Toto.hbm.xml
j'ai modifier le fichier en question que voici :
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="Toto" table="toto">
<id name="id" column="id" type="integer">
<generator class="increment"/>
</id>
<property name="nom" column="nom"/>
</class>
</hibernate-mapping>
et je rappelle la table :
CREATE TABLE `toto` (
`id` int(10) unsigned NOT NULL auto_increment,
`nom` varchar(20) NOT NULL default 'toto',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
bonne continuation
cordialement Mathieu Kobsch
ps : Si j'arrive à valider mon processus, je pense faire un tuto pour
Netbeans 5.5 / Hibernate 3.2 / MySQL 5.0, j'ai déja ecrit une bonne
partie via cette email, je n'ai qu'a corriger ce qui coince....
ps2: sinon Stephane je crois que des gens attendent la 4eme partie sur
struts voir les commentaire sur ton blog ;-)
ps3: je vais retravailler ton tuto
j'ai du faire une erreur a un moment donnée
Stephane Bourzeix a écrit :
> Tiens, et un peu de pub au passage :
>
> http://www.bourzeix.com/weblog/index/2005/05/21/121-netbeans-tomcat-struts-et-hibernate
> <http://www.bourzeix.com/weblog/index/2005/05/21/121-netbeans-tomcat-struts-et-hibernate>
>
> http://www.bourzeix.com/weblog/index/2005/06/09/122-netbeans-une-application-web-hibernate
>
> http://www.bourzeix.com/weblog/index/2005/07/10/139-netbeans-une-application-web-hibernate-et-servlet-partie-iii
>
> ;-)
>
> --
> Stéphane Bourzeix
> ------------------------------------------------
> http://www.bourzeix.com/weblog/
> ------------------------------------------------