当前位置:编程学习 > JAVA >>

一个人事管理系统,各种错误,求指导

用swing,hibernate实现的,遇到了几个错误,由于初学,不知道如何更改,求帮忙.
第一个问题:Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:197)
at bishe.hibernate.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:24)
at bishe.hibernate.BaseDao.queryList(BaseDao.java:21)
at bishe.hibernate.Dao.queryManagerOfNatural(Dao.java:140)
at bishe.frame.DengluFrame.<init>(DengluFrame.java:98)
at bishe.frame.DengluFrame.main(DengluFrame.java:43)
是不是hibernate配置文件问题,怎么修改,
第二个问题:树的叶子节点不能单击打开,错误如下:
人事管理
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:197)
at bishe.hibernate.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:24)
at bishe.hibernate.BaseDao.queryObject(BaseDao.java:15)
at bishe.hibernate.Dao.queryDeptById(Dao.java:83)
at bishe.frame.common.DeptAndPersonnelPanel.<init>(DeptAndPersonnelPanel.java:55)
at bishe.frame.personnel.DanganPanel.<init>(DanganPanel.java:89)
at bishe.frame.IndexFrame$1.valueChanged(IndexFrame.java:149)
at javax.swing.JTree.fireValueChanged(Unknown Source)
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)
at javax.swing.JTree.setSelectionPath(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelectionImpl(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source)
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
还是配置文件问题么,JTree的问题是什么,怎么修改

比较着急,可以加我qq帮忙详细说一下。610952820谢谢了 --------------------编程问答-------------------- 添加slf4j-api-1.6.1.jar和slf4j-log4j12-1.6.1.jar这两个包试试,可以去网上下载 --------------------编程问答-------------------- 我用的1.58的包,出现问题
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.cfg.Configuration.<clinit>(Configuration.java:197)
at bishe.hibernate.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:24)
at bishe.hibernate.BaseDao.queryList(BaseDao.java:21)
at bishe.hibernate.Dao.queryManagerOfNatural(Dao.java:140)
at bishe.frame.DengluFrame.<init>(DengluFrame.java:98)
at bishe.frame.DengluFrame.main(DengluFrame.java:43)
另外,hibernate3的包中有自带slf4j包的吧, --------------------编程问答-------------------- 换jar  要么就是多余的jar
--------------------编程问答-------------------- 看包是否重复? --------------------编程问答-------------------- 缺少slf4j.jar这个包
补充:Java ,  Java相关
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,