• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Log4J is forbidden

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello... I am new to Hibernate OR Mapping in Netbeans 6.9
I have a database that has a lot of tables and foreign keys
I managed to create a hibernate.cfg.xml file and enabled the HQL editor
I also managed to create the reverse engineering file and eventually made
the POJO classes along with their corresponding hbm.xml mapping files

(Supposing my table is named "User")
Now I am trying to make a simple "from User" query in the HQL editor in the context menu of the hibernate.cfg.xml file and I get a pop-up message saying:

A java.lang.NoClassDefFoundError exception has occurred.
Please report this at http://www.netbeans.org/community/issues.html,
including a copy of your messages.log file as an attachment.
The messages.log file is located in your /home/Dine/.netbeans/6.9/var/log folder.


And when I navigated to /home/Dine/.netbeans/6.9/var/log folder this is the error:

SEVERE [org.openide.util.Exceptions]
java.lang.ClassNotFoundException: Log4J is forbidden
at org.netbeans.modules.hibernate.util.CustomClassLoader.loadClass(CustomClassLoader.java:126)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Caused: java.lang.NoClassDefFoundError: org/apache/log4j/Level
at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:223)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:120)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:111)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:269)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:255)
at org.hibernate.validator.ClassValidator.<clinit>(ClassValidator.java:53)
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:513)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:378)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
at org.netbeans.modules.hibernate.hqleditor.HQLEditorController.getHibernateSessionFactoryForThisContext(HQLEditorController.java:234)
at org.netbeans.modules.hibernate.hqleditor.HQLEditorController.processAndConstructSessionFactory(HQLEditorController.java:325)
[catch] at org.netbeans.modules.hibernate.hqleditor.HQLEditorController$1.run(HQLEditorController.java:123)


* I do not understand the error and I have searched google countless times already because I need my POJOs up and running as soon as possible.
* Im not sure but im using FEDORA 14 (Laughlin) as my OS and it usually has some file permissions to some files/folder when reading/writing/executing
* But I am not sure what file/folder to grant permissions to.
* Please help me solve this issue, or just say something that may shed some light.

 
Rodine Villar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.. I managed to solve it by upgrading my slf4j jar files from to 1.6.1.. thanks anyway.
 
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And Welcome to JavaRanch, Rodine Villar
 
Please enjoy this holographic presentation of our apocalyptic dilemma right after this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic