问题描述
HTTPStatus500---------------------------------------------------------------------------------typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.exceptionjavax.servlet.ServletException:Servletexecutionthrewanexceptionrootcausejava.lang.NoClassDefFoundError:Couldnotinitializeclasscom.util.HSFcom.pojo.PhotoDAO.<init>(PhotoDAO.java:15)com.web.IndexAction.execute(IndexAction.java:48)org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)javax.servlet.http.HttpServlet.service(HttpServlet.java:710)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)noteThefullstacktraceoftherootcauseisavailableintheApacheTomcat/6.0.10logs.我用的数据库是postgreSQL,在数据库中建了一个表photo,有pid、pname和photo三个属性,photo保存的是图片,字段类型是bytea,不知道是什么原因出错了。希望指教,不胜感激。HSF是HibernateSessionFactory类
解决方案
解决方案二:
PhotoDAO把你这个类贴出来看看
解决方案三:
java.lang.NoClassDefFoundError:Couldnotinitializeclasscom.util.HSF,没找到类,好好检查后编译下看看
解决方案四:
应该是这个HSF类没编译吧