`

Struts异常记录

阅读更多
javax.servlet.ServletException: Cannot retrieve mapping for action /submitUpdateStuffTimeRecord
Action配置有问题


java.lang.NullPointerException
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:372)
mapping.get,,,,,,没有找到相应的页面


javax.servlet.ServletException: null
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
html:link中没有指定参数    paramId="id" paramName="row" paramProperty="id"

没有保存文件时,启动Tomcat会出现问题
javax.servlet.ServletException: Cannot retrieve mapping for action /submitUpdateStuffTimeRecord
Action配置有问题


java.lang.NullPointerException
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:372)
mapping.get,,,,,,没有找到相应的页面


javax.servlet.ServletException: null
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
html:link中没有指定参数    paramId="id" paramName="row" paramProperty="id"

没有保存文件时,启动Tomcat会出现问题

 javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.IllegalArgumentException: Cannot invoke com.tj.olympic.struts.form.SubmitUpdateStuffTimeRecordForm.setOccurDate - argument type mismatch
org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1778)
org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:1759)
org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1648)
org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:1677)
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1022)
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServle
t.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
 用SimpleDateFormate来转换


 javax.servlet.http.HttpServletResponse)





javax.servlet.ServletException: com.tj.olympic.struts.action.StuffTimeRecordAction.submitUpdateStuffTimeRecord(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NoSuchMethodException: com.tj.olympic.struts.action.StuffTimeRecordAction.submitUpdateStuffTimeRecord(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
java.lang.Class.getMethod(Class.java:1605)
org.apache.struts.actions.DispatchAction.getMethod(DispatchAction.java:322)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:262)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Action中的方法名错误为:submitUpdateStuffRecordTime
在三处查错:y映射文件中的path,JSP表单中的action(包括method的值),Action中方法名!!!

?□
Status report
message Invalid path /deleteStuffTimeRecord was requested
description The requested resource (Invalid path /deleteStuffTimeRecord was requested) is not available


又错误

javax.servlet.ServletException: not-null property references a null or transient value: com.tj.olympic.domain.StuffTimeRecord.stuff
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.hibernate.PropertyValueException: not-null property references a null or transient value: com.tj.olympic.domain.StuffTimeRecord.stuff
org.hibernate.engine.Nullability.checkNullability(Nullability.java:72)
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265)
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:530)
org.hibernate.impl.SessionImpl.save(SessionImpl.java:518)
org.hibernate.impl.SessionImpl.save(SessionImpl.java:514)
com.tj.olympic.m10.dao.StuffTimeRecordDaoImpl.addStuffTimeRecord(StuffTimeRecordDaoImpl.java:47)
com.tj.olympic.m10.service.StuffTimeRecordServiceImpl.addStuffTimeRecord(StuffTimeRecordServiceImpl.java:23)
com.tj.olympic.struts.action.StuffTimeRecordAction.addStudent(StuffTimeRecordAction.java:76)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)

知道错误 ,但是在dao service  只定义的StuffTimeRecord  怎样处理呢  stuff  增加出错

又错误
javax.servlet.ServletException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException
com.tj.olympic.struts.action.StuffTimeRecordAction.addStuffTimeRecord(StuffTimeRecordAction.java:73)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


stuffTimeRecord.getStuff().setStuffName(stuffName);

Integer id = stuffTimeRecord.getStuff().getId();
stuffTimeRecord.setId(id);
试图让数据能够保存进数据库中
未解决


又错误
exception
org.apache.jasper.JasperException: /m10/updateStuffTimeRecord.jsp(1,1) Unterminated <%@ page tag
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:134)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:511)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)





Eg error
servlet.ServletException: No getter method available for property description for bean under name org.apache.struts.taglib.html.BEAN
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.m10.submitUpdateStuffTimeRecord_jsp._jspService(submitUpdateStuffTimeRecord_jsp.java:103)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
jsp页面与formbean不对应
没有属性
在formbean中增加属性即可  set get 方法
又错误
javax.servlet.ServletException: No getter method available for property attendance  for bean under name org.apache.struts.taglib.html.BEAN
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.m10.addStuffTimeRecord_jsp._jspService(addStuffTimeRecord_jsp.java:103)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: No getter method available for property attendance  for bean under name org.apache.struts.taglib.html.BEAN
org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:266)
org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:200)
org.apache.jsp.m10.addStuffTimeRecord_jsp._jspx_meth_html_select_0(addStuffTimeRecord_jsp.java:252)
org.apache.jsp.m10.addStuffTimeRecord_jsp._jspx_meth_html_form_0(addStuffTimeRecord_jsp.java:140)
org.apache.jsp.m10.addStuffTimeRecord_jsp._jspService(addStuffTimeRecord_jsp.java:92)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236
formbean中已经有了attendance的set get 方法了
是因为把attendance 写错了  多加了空格  改了半天


javax.servlet.ServletException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

又错误

root cause
java.lang.NullPointerException
com.tj.olympic.struts.action.StuffTimeRecordAction.submitAddStuffTimeRecord(StuffTimeRecordAction.java:112)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



HTTP Status 500 -
________________________________________
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.m10.queryStuffTimeRecord_jsp._jspService(queryStuffTimeRecord_jsp.java:243)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.tj.olympic.filter.OlympicFilter.doFilter(OlympicFilter.java:31)
root cause
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:798)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
org.apache.jsp.m10.queryStuffTimeRecord_jsp._jspService(queryStuffTimeRecord_jsp.java:99)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.tj.olympic.filter.OlympicFilter.doFilter(OlympicFilter.java:31)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.

不知道为什么本来能够通过的程序全都出错了  上面是抛出的异常  原因???
是不是  因为导入的工程全都是一个名字tomcat 有了相应的处理
发现在Tomcat里边Olympic已经被编译成Olympic.eclipse.bak运行这个可以出来结果


又错误
这又是什麽原因呢    为什么?后不运行了


log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Hibernate: insert into ch1.dbo.user (userName, userPassword) values (?, ?)
Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not insert: [com.tj.practise.domain.User]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1986)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2405)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:530)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:518)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:514)
at com.tj.practise.dao.UserDaoImpl.addUser(UserDaoImpl.java:15)
at com.tj.practise.service.UserServiceImpl.addUser(UserServiceImpl.java:12)
at com.tj.practise.test.Test.main(Test.java:15)
Caused by: java.sql.SQLException: 在关键字 'user' 附近有语法错误。
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1968)
... 17 more
好多天没用hibernate了
有点生疏了  这个是什么原因呢
user 是关键字 因此不能作为表名 的  记得






javax.servlet.ServletException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException
com.tj.practise.dao.UserDaoImpl.addUser(UserDaoImpl.java:14)
com.tj.practise.service.UserServiceImpl.addUser(UserServiceImpl.java:12)
com.tj.practise.struts.action.UserAction.add(UserAction.java:47)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
什麽原因呢

重启就会好的


菜单的模式

常用的就是这几种
SimpleMenuDisplayer
DropDownMenuDisplayer
CoolMenuDisplayer
CoolMenuDisplayer4
ListMenuDisplayer
TabbedMenuDisplayer








Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.tj.rainbow.domain.UserRole
at org.hibernate.cfg.Mappings.addClass(Mappings.java:118)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:154)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
... 9 more
Exception in thread "main" java.lang.NullPointerException
at com.tj.rainbow.m02.dao.UserDaoImpl.addUser(UserDaoImpl.java:35)
at com.tj.rainbow.test.Test02.main(Test02.java:18)
错误原因  数据库的名字写错了


log4j:WARN No appenders could be found for logger (com.tj.rainbow.m02.dao.UserDaoImpl).
log4j:WARN Please initialize the log4j system properly.
%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Association references unmapped class: RolePrivilegeNode
at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2344)
at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2618)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1012)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1168)
at com.tj.rainbow.hb.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:31)
at com.tj.rainbow.m02.dao.UserDaoImpl.addUser(UserDaoImpl.java:32)
at com.tj.rainbow.test.Test02.main(Test02.java:18)
%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Could not read mappings from resource: com/tj/rainbow/domain/UserRole.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:485)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
at com.tj.rainbow.hb.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:69)
at com.tj.rainbow.hb.HibernateSessionFactory.getSession(HibernateSessionFactory.java:53)
at com.tj.rainbow.m02.dao.UserDaoImpl.addUser(UserDaoImpl.java:32)
at com.tj.rainbow.test.Test02.main(Test02.java:18)
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.tj.rainbow.domain.UserRole
at org.hibernate.cfg.Mappings.addClass(Mappings.java:118)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:154)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
... 9 more
Exception in thread "main" java.lang.NullPointerException
at com.tj.rainbow.m02.dao.UserDaoImpl.addUser(UserDaoImpl.java:35)
at com.tj.rainbow.test.Test02.main(Test02.java:18)




log4j:WARN No appenders could be found for logger (com.tj.rainbow.m02.dao.UserDaoImpl).
log4j:WARN Please initialize the log4j system properly.
%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Association references unmapped class: UserRole
at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2344)
at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2618)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1012)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1168)
at com.tj.rainbow.hb.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:31)
at com.tj.rainbow.m02.dao.UserDaoImpl.addUser(UserDaoImpl.java:32)
at com.tj.rainbow.test.Test02.main(Test02.java:18)
%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Could not read mappings from resource: com/tj/rainbow/domain/PrivilegeNode.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:485)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
at com.tj.rainbow.hb.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:69)
at com.tj.rainbow.hb.HibernateSessionFactory.getSession(HibernateSessionFactory.java:53)
at com.tj.rainbow.m02.dao.UserDaoImpl.addUser(UserDaoImpl.java:32)
at com.tj.rainbow.test.Test02.main(Test02.java:18)
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping com.tj.rainbow.domain.PrivilegeNode.rolePrivilegeNode
at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2030)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2005)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:368)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
... 9 more
Exception in thread "main" java.lang.NullPointerException
at com.tj.rainbow.m02.dao.UserDaoImpl.addUser(UserDaoImpl.java:35)
at com.tj.rainbow.test.Test02.main(Test02.java:18)



为什么displayer  出错


原因是没有导入包 commens-collections-3.0.jar






exception
javax.servlet.ServletException: Exception creating bean of class com.tj.rainbow.struts.form.UserLoginForm: {1}
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:85)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
javax.servlet.jsp.JspException: Exception creating bean of class com.tj.rainbow.struts.form.UserLoginForm: {1}
org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:487)
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:457)
org.apache.jsp.userLogin_jsp._jspx_meth_html_form_0(userLogin_jsp.java:101)
org.apache.jsp.userLogin_jsp._jspService(userLogin_jsp.java:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
















错误:?????
%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Association references unmapped class: com.tj.projection.domain.IndoorEnviroYearly

原因是在  IndoorEnviroYearly.hbm.xml  中  写错路径了
<class name="com.tj.projecton.domain.IndoorEnviroYearly" at org.hibernate.cfg.HbmBinder.bindCollectionSecondPass(HbmBinder.java:2344)
at org.hibernate.cfg.HbmBinder$CollectionSecondPass.secondPass(HbmBinder.java:2618)
at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1012)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1168)
at com.tj.projection.hb.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:31)
at com.tj.projection.loginDao.LoginDaoImpl.login(LoginDaoImpl.java:30)
at com.tj.projection.struts.action.LoginAction.login(LoginAction.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:619)
%%%% Error Creating SessionFactory %%%%






%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Could not read mappings from resource: com/tj/projection/domain/AddtionalStatus.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:485)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
at com.tj.projection.hb.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:69)
at com.tj.projection.hb.HibernateSessionFactory.getSession(HibernateSessionFactory.java:53)
at com.tj.projection.loginDao.LoginDaoImpl.login(LoginDaoImpl.java:30)
at com.tj.projection.struts.action.LoginAction.login(LoginAction.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.tj.projection.domain.AddtionalStatus
at org.hibernate.cfg.Mappings.addClass(Mappings.java:118)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:154)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
... 45 more
解决方法  把AddtionalStatus.hbm.xml 在hibernate.config.xml中删除然后再加进去就Ok了 



exception
javax.servlet.ServletException: could not resolve property: password of: com.tj.projection.domain.User
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.hibernate.QueryException: could not resolve property: password of: com.tj.projection.domain.User


原因是在 LoginAction中的判断login()中dc.add(“passward”) 才与User对应
org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMapping.java:43)



org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:37)
org.hibernate.persister.entity.AbstractEntityPersister.getSubclassPropertyTableNumber(AbstractEntityPersister.java:1282)
org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.java:31)
org.hibernate.persister.entity.AbstractEntityPersister.toColumns(AbstractEntityPersister.java:1257)
org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumns(CriteriaQueryTranslator.java:433)
org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumnsUsingProjection(CriteriaQueryTranslator.java:393)
org.hibernate.criterion.SimpleExpression.toSqlString(SimpleExpression.java:45)
org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.java:333)
org.hibernate.loader.criteria.CriteriaJoinWalker.<init>(CriteriaJoinWalker.java:82)
org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:67)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1514)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
com.tj.projection.loginDao.LoginDaoImpl.login(LoginDaoImpl.java:34)
com.tj.projection.struts.action.LoginAction.login(LoginAction.java:61)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)






exception
javax.servlet.ServletException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException
com.tj.projection.struts.action.LoginAction.login(LoginAction.java:74)
repository.setDisplayers(defaultRepository.getDisplayers());

1.没有写menu-config.xml
2.<!--配置struts-menu插件-->
  <plug-in className="net.sf.navigator.menu.MenuPlugIn">
    <set-property property="menuConfig" value="/WEB-INF/menu-config.xml"/>
  </plug-in> 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)


org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
原因是  login()后写错啊  马虎啊
好多错误都是因为马虎啊
呵呵



The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application



错误原因是  没有把  jtsl.jar   standard.jar 导入  jtsl1.0.6.jar  ~~版本太低  课本  p197



javax.servlet.ServletException: An error occurred while evaluating custom action attribute "name" with value "${menu.name}": Unable to find a value for "name" in object of class "java.lang.String" using operator "." (null)
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.success_jsp._jspService(success_jsp.java:96)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.tj.projection.filter.OlympicFilter.doFilter(OlympicFilter.java:31)
root cause
javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "name" with value "${menu.name}": Unable to find a value for "name" in object of class "java.lang.String" using operator "." (null)
org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:109)
org.apache.taglibs.standard.lang.jstl.Evaluator.evaluate(Evaluator.java:129)
org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate(ExpressionEvaluatorManager.java:75)
net.sf.navigator.taglib.el.ExpressionEvaluator.eval(ExpressionEvaluator.java:40)
net.sf.navigator.taglib.el.ExpressionEvaluator.evalString(ExpressionEvaluator.java:50)
net.sf.navigator.taglib.el.DisplayMenuTag.evaluateExpressions(DisplayMenuTag.java:79)
net.sf.navigator.taglib.el.DisplayMenuTag.doStartTag(DisplayMenuTag.java:44)
org.apache.jsp.success_jsp._jspx_meth_menu$1el_displayMenu_0(success_jsp.java:181)
org.apache.jsp.success_jsp._jspx_meth_c_forEach_0(success_jsp.java:150)
org.apache.jsp.success_jsp._jspx_meth_menu_useMenuDisplayer_0(success_jsp.java:118)
org.apache.jsp.success_jsp._jspService(success_jsp.java:80)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.tj.projection.filter.OlympicFilter.doFilter(OlympicFilter.java:31)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.











在做QueryStuffTimeRecord 时  出现这种情况  光能出现这句话 “对不起,没有你要浏览的条目”  都觉得改对了  原因是没有把信息送回给页面啊
HttpSession session = request.getSession();
session.setAttribute("stuffTimeRecordList", stuffTimeRecordList);

uesabc1@188.com


在修改和增加混合得页面中  ,为什么attendance是null呢
别的都没有出错是因为你的jsp页面中的问题  下拉列表框的表示应该是
<html:select>
<html:option></html:option>
</html:select>
都丢掉html了
不符合Struts格式了

不知道怎么做的
1 是怎样自动生成的 数据库 类 的
2 是怎样让Log4j控制查看用户的输入信息的
3  多模块开发的要求是怎样又创建的 Struts-config.xml
Web.xml  中是不是要
<param-name> congfig/m10config</param-name>
<param-value>struts-configm10.xml</param-value>

新建 —— File——Struts-config.xml——后出现的标志和已存在的不一样

HttpSession session 
Request.getAttribute
Jsp 的用法




分享到:
评论

相关推荐

    struts手动异常处理

    6. **笔记中的具体实践**:`login_struts`笔记可能详细记录了如何在登录功能中实现Struts的手动异常处理。可能包括了创建自定义拦截器、定义全局异常映射以及如何在JSP页面上展示错误信息等内容。 通过理解和掌握...

    Struts2异常处理机制

    Struts2作为一款流行的Java Web框架,其异常处理机制是其核心功能之一,它使得开发者能够优雅地管理和处理应用程序中的异常情况,提供了一种统一的错误处理方式,从而提高用户体验并增强程序的健壮性。 在Struts2...

    Struts2之异常处理案例struts003

    在处理异常时,记录详细的错误日志对调试至关重要。Struts2集成了Log4j等日志框架,开发者可以配置日志级别,以便在开发和生产环境中获取合适的日志信息。 10. **最佳实践** - 应该尽量避免在Action方法中使用`...

    Struts1异常处理

    如果在这个过程中发生异常,Struts框架会捕获这个异常,并根据配置文件中的规则来决定如何处理。 1. **Action类中的异常处理**:在`Action`类中,开发者通常会在方法体内使用try-catch语句块来捕获可能出现的异常。...

    struts2中异常处理(demo)

    Struts2可以通过集成日志框架,如Log4j或Java内置的日志API,来记录异常堆栈跟踪和其他相关信息。 通过以上方法,Struts2能够提供灵活且强大的异常处理能力,使得开发者能够更好地控制和管理应用程序的异常行为,...

    Struts2 异常处理的四种获取属性方法

    拦截器可以捕获并处理Action执行过程中的异常,或者记录日志,甚至将用户重定向到错误页面。创建自定义拦截器需要实现`Interceptor`接口,并在`intercept()`方法中处理异常。然后,在`struts.xml`中注册该拦截器,并...

    struts异常处理

    7. **日志记录**:在处理异常时,记录异常信息是至关重要的。Struts2提供了内置的日志支持,也可以集成第三方日志框架如Log4j或SLF4J,以便于跟踪和调试。 总的来说,Struts2的异常处理机制提供了灵活且强大的方式...

    struts1.x 异常处理机制

    // 自定义异常处理,比如记录日志、显示用户友好的错误信息等 // 然后决定如何转发 return mapping.findForward("customError"); } catch (Exception e) { // 其他未处理的异常,可以在这里进行统一处理 ...

    struts+hibernate查询所有记录

    ### Struts+Hibernate查询所有记录 #### 一、概述 在Java Web开发中,Struts与Hibernate是非常流行的框架组合,用于构建复杂的企业级应用。本文将详细介绍如何利用Struts和Hibernate来实现对Oracle数据库中所有...

    struts2的异常处理机制

    Struts2还支持异常链,这意味着一个异常可以包含另一个异常,这样可以更详细地记录错误信息。 7. **拦截器处理异常**: Struts2的拦截器(Interceptor)也可以参与到异常处理中,通过实现`...

    struts2+spring aop demo

    在记录操作日志的场景中,我们可能使用前置通知来记录操作开始,使用后置通知来记录操作结束和返回值,或者在发生异常时记录异常信息。 接下来,集成Struts2和Spring的AOP需要以下步骤: 1. **配置Spring**:在...

    Struts 声明式异常处理和个性化异常处理

    声明式异常处理和个性化异常处理是Struts框架中的两个重要特性,它们帮助开发者更有效地管理和处理应用程序可能出现的异常情况,从而提高应用的健壮性和用户体验。 声明式异常处理是Struts通过配置文件(如struts-...

    Struts2的异常处理

    Struts2作为一款流行的Java Web框架,其异常处理机制是开发者必须掌握的关键部分。这篇博客主要探讨了在Struts2中如何有效地管理和处理异常,从而提高应用的稳定性和用户体验。 在Struts2中,异常处理主要通过两种...

    Struts2视频教程

    - **拦截器**:拦截器是Struts2的一个重要特性,可以在请求到达Action之前或之后执行特定的操作,如验证用户登录状态、日志记录等。 #### 四、Struts2进阶技巧 - **ModelDriven模式**:该模式允许Action实例共享同...

    留言板留言板struts2留言板struts2

    9. **异常处理**:Struts2通过全局异常映射(Global Exception Mapping)来统一处理应用程序中抛出的异常,提高代码的可维护性。 10. **国际化与本地化**:Struts2支持多语言环境,可以通过资源包(properties文件...

    Struts2 下载取消报异常最终解决办法

    在使用Struts2进行文件下载功能时,可能会遇到各种异常情况,特别是当用户尝试取消下载时。本篇将深入探讨Struts2下载取消报异常的解决方法,以及相关的知识点。 1. **Struts2 文件下载原理** - Struts2提供了方便...

    struts2 单文件,多文件上传及拦截器实现异常处理

    在这个方法中,你可以检查Action执行是否抛出异常,并根据异常类型采取相应的措施,如记录日志、显示错误信息或者重定向到特定页面。为了使拦截器生效,需要在struts.xml配置文件中注册它,并将其添加到Action的拦截...

    struts1.2驱动包

    7. **Interceptor(拦截器)**:虽然Struts1.2的核心版本不包含拦截器,但可以通过扩展实现,提供在请求处理流程中的预处理和后处理功能,如日志记录、权限检查等。 8. **Internationalization(国际化)**:Struts...

    Java_Jdbc_Hibernate_Struts2_Android_Web异常及其处理办法

    在Servlet的`doGet`和`doPost`方法中使用`try-catch`块捕获异常,并在`catch`块中进行适当的错误处理,例如记录日志或向用户显示友好的错误信息。 总的来说,良好的异常处理策略是每个开发者必备的技能,它有助于...

Global site tag (gtag.js) - Google Analytics