Aplicação com Hibernate gerando Exceção

Pessaol estou desenvolvendo uma aplicação utilizando o Hibernate com o auxílio do Netbeans, pois este quando executado pelo mesmo funciona normalmente, sendo quando gero o .jar da aplicação a seguinte exceção é lançada:

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).
log4j:WARN Please initialize the log4j system properly.
Initial SessionFactory creation failed.java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
	at br.com.appgestaobolsafamilia.util.UtilHibernate.<clinit>(UtilHibernate.java:28)
	at br.com.appgestaobolsafamilia.dao.GenericDAO.getLista(GenericDAO.java:64)
	at br.com.appgestaobolsafamilia.view.frmMunicipio.carregarTabela(frmMunicipio.java:195)
	at br.com.appgestaobolsafamilia.view.frmMunicipio.<init>(frmMunicipio.java:28)
	at br.com.appgestaobolsafamilia.view.frmPrincipal.jMenuItem5ActionPerformed(frmPrincipal.java:121)
	at br.com.appgestaobolsafamilia.view.frmPrincipal.access$100(frmPrincipal.java:16)
	at br.com.appgestaobolsafamilia.view.frmPrincipal$2.actionPerformed(frmPrincipal.java:67)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
	at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
	at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
	at java.awt.Component.processMouseEvent(Component.java:6504)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
	at java.awt.Component.processEvent(Component.java:6269)
	at java.awt.Container.processEvent(Container.java:2229)
	at java.awt.Component.dispatchEventImpl(Component.java:4860)
	at java.awt.Container.dispatchEventImpl(Container.java:2287)
	at java.awt.Component.dispatchEvent(Component.java:4686)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
	at java.awt.Container.dispatchEventImpl(Container.java:2273)
	at java.awt.Window.dispatchEventImpl(Window.java:2713)
	at java.awt.Component.dispatchEvent(Component.java:4686)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
	at java.awt.EventQueue.access$000(EventQueue.java:101)
	at java.awt.EventQueue$3.run(EventQueue.java:666)
	at java.awt.EventQueue$3.run(EventQueue.java:664)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:680)
	at java.awt.EventQueue$4.run(EventQueue.java:678)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z
	at org.slf4j.impl.Log4jLoggerAdapter.isTraceEnabled(Log4jLoggerAdapter.java:81)
	at org.hibernate.type.NullableType.<clinit>(NullableType.java:59)
	at org.hibernate.Hibernate.<clinit>(Hibernate.java:103)
	at org.hibernate.type.TypeFactory.<clinit>(TypeFactory.java:69)
	at org.hibernate.mapping.ManyToOne.getType(ManyToOne.java:49)
	at org.hibernate.mapping.ManyToOne.createForeignKey(ManyToOne.java:62)
	at org.hibernate.cfg.HbmBinder.createProperty(HbmBinder.java:2213)
	at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2170)
	at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2060)
	at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:381)
	at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:295)
	at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:166)
	at org.hibernate.cfg.Configuration.add(Configuration.java:702)
	at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:531)
	at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1319)
	at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
	at br.com.appgestaobolsafamilia.util.UtilHibernate.<clinit>(UtilHibernate.java:24)
	... 44 more

Não estou entendo do que se trata, logo como resolver.

No aguardo.

Quando você gera o jar as dependências estão indo?

Olhe a msg de erro: Initial SessionFactory creation failed.java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled()Z

Não achou o método descrito.

Desculpas a ignorância pois sou iniciante com Hibernate, quais dependências?

O Hibernate está dizendo que não achou esse método:

org.apache.log4j.Logger.isTraceEnabled()Z

tente esse

org.apache.log4j.Logger.isTraceEnabled()

Bom dia Willian, então como eu coloco esse método na minha aplicação, estou com dúvida em como proceder, pois pensei que o Hibernate carregava automaticamente esses métodos.

Bom dia,
O que eu quiz dizer foi que o nome do método está errado, e por isso o Hibernate não estava achando ele…

Pessoal ao gerar o jar da aplicação apresenta o seguinte erro na MyTableModel, não estou conseguindo corrigir.

[color=red]C:\Users\JUNIOR\Documents\NetBeansProjects\App\src\br\com\aplicacao\view\MyTableModel.java:57: warning: non-varargs call of varargs method with inexact argument type for last parameter;
fieldToData.add(entityClassToList.getDeclaredMethod(methodName, null));
cast to Class for a varargs call
cast to Class[] for a non-varargs call and to suppress this warning
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning[/color]

---------------------------------------------------------------------------------------------
MyTableModel

public class MyTableModel extends DefaultTableModel {

    private static final long serialVersionUID = 1L;
    private final List entityToList;
    private final Class entityClassToList;
    private final List<Method> fieldToData = new LinkedList<Method>();
    private final JTable tableToControl;
    
    public MyTableModel(Class entityClassToList, List entityOfList, JTable tableToControl) throws IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InstantiationException {
        super();
        this.entityToList = entityOfList;
        this.entityClassToList = entityClassToList;
        this.tableToControl = tableToControl;
        
        try {
            startAddTheColumns();
            startAddValue();
        } catch (InvocationTargetException ex) {
            Logger.getLogger(MyTableModel.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private void startAddTheColumns() throws NoSuchMethodException, InstantiationException, IllegalAccessException {
        // Here is The Reference Class !
        //Reflection is The man !
        
        for (Field  field : entityClassToList.getDeclaredFields()) {
            
            SwingColumn theAnnotation = field.getAnnotation(SwingColumn.class);
            
            if(theAnnotation != null){
                // Yes, the column is annotated, but and the next
                //addColumn(field.getName());
                addColumn(theAnnotation.description());
                //tableToControl.getColumnModel().getColumn(getColumnCount()-1).setCellRenderer(theAnnotation.renderer().newInstance());
                String methodName = "get"+field.getName().toUpperCase().charAt(0)+field.getName().substring(1);
                fieldToData.add(entityClassToList.getDeclaredMethod(methodName, null)); //<-- Linha 57
            }
            
        }
    }

    private void startAddValue() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
        //Manipulates Only the DATA fields
        
        for (Object entity : entityToList) {
            
            List<Object> valuesToAdd = new LinkedList<Object>();
            
            for (Method method : fieldToData) {
                
                valuesToAdd.add(method.invoke(entity));
            }
            addRow(valuesToAdd.toArray());
        }
        
    }
}

Ainda persistindo com essa exceção: