-->
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: Error using MapGenerator
PostPosted: Sun Feb 22, 2004 4:35 pm 
Newbie

Joined: Sat Feb 21, 2004 1:38 am
Posts: 8
Well,
Thats me again.
I am getting an error when I try to use the MapGenerator.
Thats my class code, very simple, just to test:

public class MyClass {
//public ID codigo;
private Long id;
private String nome;
MyClass(){}
public void setId(Long id){
this.id = id;
}
public Long getId(){
return id;
}
public void setNome(String _nome){
this.nome = _nome;
}
public String getNome(){
return nome;
}
}

And When I use the MapGenerator, this is the error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at net.sf.hibernate.type.NullableType.<clinit>(NullableType.java:25)
at net.sf.hibernate.Hibernate.<clinit>(Hibernate.java:72)
at net.sf.hibernate.type.TypeFactory.<clinit>(TypeFactory.java:42)
at net.sf.hibernate.tool.class2hbm.MapGenerator.makeProperty(MapGenerator.java:521)
at net.sf.hibernate.tool.class2hbm.ReflectedClass.maybeAddProp(ReflectedClass.java:329)
at net.sf.hibernate.tool.class2hbm.ReflectedClass.addGetter(ReflectedClass.java:343)
at net.sf.hibernate.tool.class2hbm.ReflectedClass.reflectClass(ReflectedClass.java:379)
at net.sf.hibernate.tool.class2hbm.ReflectedClass.reflect(ReflectedClass.java:352)
at net.sf.hibernate.tool.class2hbm.ReflectedClass.<init>(ReflectedClass.java:40)
at net.sf.hibernate.tool.class2hbm.MapGenerator.reallyAdd(MapGenerator.java:371)
at net.sf.hibernate.tool.class2hbm.MapGenerator.addClass(MapGenerator.java:323)
at net.sf.hibernate.tool.class2hbm.MapGenerator.main(MapGenerator.java:131)


Do I need sthg from apache?

thanks;


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 22, 2004 4:38 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
The class org/apache/commons/logging/LogFactory could not be found. Also, forget the MapGenerator, it's useless. Use XDoclet or write the mapping by hand:

http://www.hibernate.org/Documentation/ ... dtripTools

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 22, 2004 4:40 pm 
Newbie

Joined: Sat Feb 21, 2004 1:38 am
Posts: 8
Thank you again.

I thought MapGenerator would help me. Well, I'll take a look at XDoclet.


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.