-->
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 with my first application (Hibernate Documentation)
PostPosted: Tue Apr 11, 2006 9:51 am 
Newbie

Joined: Tue Apr 11, 2006 3:14 am
Posts: 3
I followed exactly the tutoriel being in the documentation of hibernate (the example with the Events).

And when I want to launch the first method which records a first Event, I have this error which I do not understand:


Code:
run:
     [java] Initial SessionFactory creation failed.java.lang.ExceptionInInitiali
zerError
     [java] Exception in thread "main" java.lang.ExceptionInInitializerError
     [java]     at util.HibernateUtil.<clinit>(Unknown Source)
     [java]     at events.EventManager.createAndStoreEvent(Unknown Source)
     [java]     at events.EventManager.main(Unknown Source)
     [java] Caused by: java.lang.ExceptionInInitializerError
     [java]     ... 3 more
     [java] Caused by: org.apache.commons.logging.LogConfigurationException: org
.apache.commons.logging.LogConfigurationException: No suitable Log constructor [
Ljava.lang.Class;@530daa for org.apache.commons.logging.impl.Log4JLogger (Caused
by java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by org.ap
ache.commons.logging.LogConfigurationException: No suitable Log constructor [Lja
va.lang.Class;@530daa for org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category))
     [java]     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Lo
gFactoryImpl.java:543)
     [java]     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Lo
gFactoryImpl.java:235)
     [java]     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Lo
gFactoryImpl.java:209)
     [java]     at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:
351)
     [java]     at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:1
16)
     [java]     ... 3 more
     [java] Caused by: org.apache.commons.logging.LogConfigurationException: No
suitable Log constructor [Ljava.lang.Class;@530daa for org.apache.commons.loggin
g.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/C
ategory)
     [java]     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstruc
tor(LogFactoryImpl.java:413)
     [java]     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Lo
gFactoryImpl.java:529)
     [java]     ... 7 more
     [java] Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category

     [java]     at java.lang.Class.getDeclaredConstructors0(Native Method)
     [java]     at java.lang.Class.privateGetDeclaredConstructors(Class.java:232
8)
     [java]     at java.lang.Class.getConstructor0(Class.java:2640)
     [java]     at java.lang.Class.getConstructor(Class.java:1629)
     [java]     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstruc
tor(LogFactoryImpl.java:410)
     [java]     ... 8 more
     [java] Java Result: 1


I understand nothing there; I think that it is a problem with the library commons-logging but I do not see how finding the solution.
could you help me please?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 11, 2006 9:55 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
Quote:
[java] Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category


This look like the log4j jar is missing in your classpath !

_________________
dont forget to rate !


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 11, 2006 10:15 am 
Newbie

Joined: Tue Apr 11, 2006 3:14 am
Posts: 3
thank you I added it and it's ok. but I thought that while putting it in the file lib of my application , that would go too.


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.