-->
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.  [ 5 posts ] 
Author Message
 Post subject: Problem using Java logging.
PostPosted: Tue Mar 01, 2005 2:23 pm 
Newbie

Joined: Wed Aug 11, 2004 11:41 am
Posts: 14
Using Hibernate 3.0 RC1 and JDK 1.5, I'm trying to use Java logging so
I don't have log4j in my classpath. This worked find in Hibernate 2.0.
Now I'm getting the error below. Is there something special I must
do to tell Hibernate 3.0 to use Java logging? Thanks.

Steve Buroff

) warning(junit.framework.TestSuite$1)junit.framework.AssertionFailedError: Exception in constructor: testSimpleQuery (java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.hibernate.tuple.PojoTuplizer.<clinit>(PojoTuplizer.java:42)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:45)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:208)
at org.hibernate.persister.entity.BasicEntityPersister.<init>(BasicEntityPersister.java:398)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:104)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:199)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1043)
at firsttry.SimpleTests.<init>(SimpleTests.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at firsttry.SimpleTests.main(SimpleTests.java:30)
)
at firsttry.SimpleTests.main(SimpleTests.java:30)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 2:34 pm 
Regular
Regular

Joined: Thu Dec 18, 2003 2:14 am
Posts: 103
Location: Brooklyn, NY
Hibernate ships with the source, so you could answer this yourself. I looked at the PojoTuplizer source and it uses log4j. I personally have no problem with this, but others may.
The easy solution is to put log4j in your classpath.
The hard one is to get Hibernate to change their code to remove all log4j references.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 2:49 pm 
Newbie

Joined: Wed Aug 11, 2004 11:41 am
Posts: 14
But this is not backwards compatible. I was able to use the Java
logging with Hibernate 2.0. Do you think they intentionally removed
that capability in 3.0? I sure hope not. Can any hibernate developer
comment? Thanks.

Steve Buroff


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 01, 2005 3:54 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
This has been fixed in CVS yesterday

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 02, 2005 9:21 am 
Newbie

Joined: Wed Aug 11, 2004 11:41 am
Posts: 14
Great - thanks. I guess I'll just wait for the next release candidate.
Good to know that its fix. Thanks much.

Steve Buroff


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