- 浏览: 88878 次
- 性别:
- 来自: 广州
文章分类
最新评论
-
851228082:
怎样控制字符的坐标?
验证码之SimpleCaptcha (一) -
宋健skipper:
新版本有问题啊 连struts.xml文件都没了 找不到log ...
小型用户权限例子struts2.18+spring3.0+hibernate3.5+annotation(源码) -
宋健skipper:
新下载的版本 ops.sql文件缺少了 use 'ops'; ...
小型用户权限例子struts2.18+spring3.0+hibernate3.5+annotation(源码) -
good_ovo:
很实用的一个框架,里面封装东西挺齐全的,多谢楼主共享
小型用户权限例子struts2.18+spring3.0+hibernate3.5+annotation(源码) -
玉无瑕:
非常好, 可以作基本信息管理的框架!
小型用户权限例子struts2.18+spring3.0+hibernate3.5+annotation(源码)
今天是2010年的最后一天,在此分享一下个人几个月前写的一个小项目给大家
1.系统框架:struts2.8+hibernate3.5+spring3.0
2.浏览器: 因为开发是一直使用的是chrome,开发完后才发现不兼容ie
3.注意事项:如果出现java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z
由于hibernate-jpa-2.0-api-1.0.0.Final.jar和javaee的javax.persistence包冲突,删除javaee包的javax.persistence就可以解决了
4.项目采用的annotation代替以前的xml配置,可以更好的方便维护
5.项目入口:http://localhost:8080/ops(项目名)/manage/login.jsp 用户名:asdf 密码:asdf
6.数据库,使用的是mysql数据
启动步骤:
1.在myeclipse中新建一个项目,任意项目名,将文件解压,src和webRoot拷贝进去覆盖项目中已有的src和webRoot
2.把解压包中的ops.sql放到mysql中执行
3.修改密码:src/config/init/init.properties datasource.password=改成你的密码
4.因为hibernate3.5和javaee的jpa有冲突,所以需要删除javaee包的持久包。
如果你的myeclipse是安装在c盘 C:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.j2eedt.core_8.6.0.me201007292038\data\libraryset\EE_5 这个文件夹,找到javaee.rar,用winrar打开删除,具体删除请看上面3.注意事项
5.项目编码全部采用utf-8,请确保你的项目编码,tomcat,mysql都是采用的utf-8编码,如果有乱码请查看是否是那个部位编码没有统一。
6.应该没有了吧。要有就是启动访问了。呵呵~
javaeye的上传太不好用了,没办法,只能放到csdn上面了
http://download.csdn.net/source/3007347
登录:
查询
增加用户:
ext已经没落了。。现在主流的前端是jquery和flex,dhtnlx这个还没有用过。
spring security还没有用到。如果是轻量级的权限控制的话,建议使用Shiro
登录页面里面没有login!cde.action啊?
不好意思,看错了,谢谢!
登录页面里面没有login!cde.action啊?
用户权限还是需要缓存的,不然每次查数据库,用户多的话说不定数据库受不了。添加了用户,然后需要给他配置角色,如果是修改了角色对应的菜单,那么需要更新缓存才能看到效果。
你这里所说的“需要更新缓存才能看到效果。”是不是要重启服务器。我是要重启服务器才行,这样是不是不太好。
用户权限还是需要缓存的,不然每次查数据库,用户多的话说不定数据库受不了。添加了用户,然后需要给他配置角色,如果是修改了角色对应的菜单,那么需要更新缓存才能看到效果。
应该是不会的,直接按照我给的那个步骤是没有问题的。
1.系统框架:struts2.8+hibernate3.5+spring3.0
2.浏览器: 因为开发是一直使用的是chrome,开发完后才发现不兼容ie
3.注意事项:如果出现java.lang.NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z
由于hibernate-jpa-2.0-api-1.0.0.Final.jar和javaee的javax.persistence包冲突,删除javaee包的javax.persistence就可以解决了
4.项目采用的annotation代替以前的xml配置,可以更好的方便维护
5.项目入口:http://localhost:8080/ops(项目名)/manage/login.jsp 用户名:asdf 密码:asdf
6.数据库,使用的是mysql数据
启动步骤:
1.在myeclipse中新建一个项目,任意项目名,将文件解压,src和webRoot拷贝进去覆盖项目中已有的src和webRoot
2.把解压包中的ops.sql放到mysql中执行
3.修改密码:src/config/init/init.properties datasource.password=改成你的密码
4.因为hibernate3.5和javaee的jpa有冲突,所以需要删除javaee包的持久包。
如果你的myeclipse是安装在c盘 C:\Program Files\Genuitec\Common\plugins\com.genuitec.eclipse.j2eedt.core_8.6.0.me201007292038\data\libraryset\EE_5 这个文件夹,找到javaee.rar,用winrar打开删除,具体删除请看上面3.注意事项
5.项目编码全部采用utf-8,请确保你的项目编码,tomcat,mysql都是采用的utf-8编码,如果有乱码请查看是否是那个部位编码没有统一。
6.应该没有了吧。要有就是启动访问了。呵呵~
javaeye的上传太不好用了,没办法,只能放到csdn上面了
http://download.csdn.net/source/3007347
6.数据字典 用户表(userinfo) 字段 类型 字段描述 id int 自动增长Id userName Varchar(20) 用户名 userPassword varchar(20) 用户密码 sex varchar(2) 性别 1为男,2为女 email varchar(20) email qq varchar(11) qq isEnable int 是否可用 online bigint 在线时长 score int 积分 createTime datetime 注册时间 content text 个性签名 isBetter int 是否为高级用户 1是 0 为不是高级用户 角色表(role) 字段 类型 字段描述 id int 自动增长Id roleName Varchar(20) 角色名称 roleInfo text 角色介绍 createTime datetime 创建时间 权限(action) 字段 类型 字段描述 id int 自动增长Id path Varchar(200) 权限路径 createTime datetime 创建时间 moduleId int 模块id actionName Varchar(20) 权限名称 orders int 排序 模块(module) 字段 类型 字段描述 id int 自动增长Id moduleName Varchar(20) 模块名称 moduleInfo text 模块简介 createTime datetime 创建时间 菜单(menu) 字段 类型 字段描述 id int 自动增长Id menuName Varchar(20) 显示名称 parentId int 父id url Varchar(100) 链接url imageUrl Varchar(100) 图片url dept int 层次 createTime datetime 创建时间 orders Varchar(11) 排序(1层标示1,2,3 ;2层1.1 ,1.2 ;3层 1.1.1 2.1.1) 用户角色映射表(userRole) 字段 类型 字段描述 userId int 映射userinfo id roleId int 映射role id 角色权限映射表(roleAction) 字段 类型 字段描述 actionId int 映射action表 id roleId int 映射role id 角色菜单映射表(roleMenu) 字段 类型 字段描述 menuId int 映射Menu表id roleId int 映射role id
登录:
查询
增加用户:
评论
33 楼
itbright
2011-02-11
多谢分享,已经部署成功了,部署过程中出现了这样的错误信息:
Failed to load or instantiate TagLibraryValidator class:org.apache.taglibs.standard.tlv.JstlCoreTLV
但已解决.解决办法是下载了jstl.jar和standard.jar,并放到项目依赖里即可.
下载地址:http://klklkl88.iteye.com/blog/633831
之前没有用过Annotation来配置来代替XML配置,好好学习以下.现在我们要开发的系统正好是基于OSGi插件机制的S2SH脚手架,出来后再把代码拿出来和大家分享.谢谢.
Failed to load or instantiate TagLibraryValidator class:org.apache.taglibs.standard.tlv.JstlCoreTLV
但已解决.解决办法是下载了jstl.jar和standard.jar,并放到项目依赖里即可.
下载地址:http://klklkl88.iteye.com/blog/633831
之前没有用过Annotation来配置来代替XML配置,好好学习以下.现在我们要开发的系统正好是基于OSGi插件机制的S2SH脚手架,出来后再把代码拿出来和大家分享.谢谢.
32 楼
elvishehai
2011-02-04
看来你上传的源码的确是有一些问题的,不然也不可能这么大我问题了.
31 楼
WSZ1102.shu
2011-02-03
为什么要放在csdn上面呢?
30 楼
lytofb
2011-01-30
我使用的是mysql server5.5,tomcat6.0版本,按照你的指导,在toad for mysql里面运行了ops.sql文件,不知道哪个地方出了问题,请说明一下,谢谢
29 楼
lytofb
2011-01-30
<p>楼主,谢谢你的代码。不过我在使用的时候遇到了一些问题,想向你请教一下:我在登陆界面输入了用户和密码asdf asdf,结果服务器报错不能正常运行,错误信息如下<span style="white-space: pre;">严重: could not execute query; SQL [select userinfo0_.id as id0_, userinfo0_.content as content0_, userinfo0_.createTime as createTime0_, userinfo0_.email as email0_, userinfo0_.isBetter as isBetter0_, userinfo0_.isEnable as isEnable0_, userinfo0_.online as online0_, userinfo0_.qq as qq0_, userinfo0_.score as score0_, userinfo0_.sex as sex0_, userinfo0_.userName as userName0_, userinfo0_.userPassword as userPas12_0_ from userinfo userinfo0_ where userinfo0_.userName=? and userinfo0_.userPassword=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query</span></p>
<pre name="code" class="java">org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select userinfo0_.id as id0_, userinfo0_.content as content0_, userinfo0_.createTime as createTime0_, userinfo0_.email as email0_, userinfo0_.isBetter as isBetter0_, userinfo0_.isEnable as isEnable0_, userinfo0_.online as online0_, userinfo0_.qq as qq0_, userinfo0_.score as score0_, userinfo0_.sex as sex0_, userinfo0_.userName as userName0_, userinfo0_.userPassword as userPas12_0_ from userinfo userinfo0_ where userinfo0_.userName=? and userinfo0_.userPassword=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:629)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
at com.common.dao.handler.imp.spring.SpringHandler.findObj(SpringHandler.java:178)
at com.common.dao.BaseDAO.findOfMap(BaseDAO.java:100)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy19.findOfMap(Unknown Source)
at com.common.service.imp.UserManageService.login(UserManageService.java:43)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy24.login(Unknown Source)
at com.common.view.action.manage.UserManageAction.login(UserManageAction.java:62)
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 com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.common.view.filter.ManageFilter.doFilter(ManageFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2297)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
at org.hibernate.loader.Loader.list(Loader.java:2167)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:859)
at com.common.dao.handler.imp.spring.SpringHandler$2.doInHibernate(SpringHandler.java:187)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
... 103 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'ops.userinfo' doesn't exist
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2822)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1536)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1626)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3031)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:943)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1049)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1849)
at org.hibernate.loader.Loader.doQuery(Loader.java:718)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.doList(Loader.java:2294)
... 113 more
</pre>
<p> </p>
<pre name="code" class="java">org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select userinfo0_.id as id0_, userinfo0_.content as content0_, userinfo0_.createTime as createTime0_, userinfo0_.email as email0_, userinfo0_.isBetter as isBetter0_, userinfo0_.isEnable as isEnable0_, userinfo0_.online as online0_, userinfo0_.qq as qq0_, userinfo0_.score as score0_, userinfo0_.sex as sex0_, userinfo0_.userName as userName0_, userinfo0_.userPassword as userPas12_0_ from userinfo userinfo0_ where userinfo0_.userName=? and userinfo0_.userPassword=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:629)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
at com.common.dao.handler.imp.spring.SpringHandler.findObj(SpringHandler.java:178)
at com.common.dao.BaseDAO.findOfMap(BaseDAO.java:100)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy19.findOfMap(Unknown Source)
at com.common.service.imp.UserManageService.login(UserManageService.java:43)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy24.login(Unknown Source)
at com.common.view.action.manage.UserManageAction.login(UserManageAction.java:62)
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 com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.common.view.filter.ManageFilter.doFilter(ManageFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2297)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
at org.hibernate.loader.Loader.list(Loader.java:2167)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:859)
at com.common.dao.handler.imp.spring.SpringHandler$2.doInHibernate(SpringHandler.java:187)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
... 103 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'ops.userinfo' doesn't exist
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2822)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1536)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1626)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3031)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:943)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1049)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1849)
at org.hibernate.loader.Loader.doQuery(Loader.java:718)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.doList(Loader.java:2294)
... 113 more
</pre>
<p> </p>
28 楼
何枫abc
2011-01-24
楼主辛苦了!!!正想来好好温故下SHH2呢!!!
27 楼
elvishehai
2011-01-12
出错了,
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springHandler' defined in file [E:\platform\pos\WebRoot\WEB-INF\classes\com\common\dao\handler\imp\spring\SpringHandler.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
at org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfig(HibernateDaoSupport.java:118)
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 27 more
2011-1-12 12:59:12 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springHandler' defined in file [E:\platform\pos\WebRoot\WEB-INF\classes\com\common\dao\handler\imp\spring\SpringHandler.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
at org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfig(HibernateDaoSupport.java:118)
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 27 more
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springHandler' defined in file [E:\platform\pos\WebRoot\WEB-INF\classes\com\common\dao\handler\imp\spring\SpringHandler.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
at org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfig(HibernateDaoSupport.java:118)
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 27 more
2011-1-12 12:59:12 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springHandler' defined in file [E:\platform\pos\WebRoot\WEB-INF\classes\com\common\dao\handler\imp\spring\SpringHandler.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
at org.springframework.orm.hibernate3.support.HibernateDaoSupport.checkDaoConfig(HibernateDaoSupport.java:118)
at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
... 27 more
26 楼
xiaoxin5230
2011-01-12
bubiaiyou 写道
建议楼主用ext js 效果就更好了 另外还有一个dhtnlx控件 可以在网上搜搜
我建议做管理系统还是用这两个做页面
项目我参考一下,最近在研究Spring Security3.0 不知道楼主在这个项目里用到没有
我建议做管理系统还是用这两个做页面
项目我参考一下,最近在研究Spring Security3.0 不知道楼主在这个项目里用到没有
ext已经没落了。。现在主流的前端是jquery和flex,dhtnlx这个还没有用过。
spring security还没有用到。如果是轻量级的权限控制的话,建议使用Shiro
25 楼
bubiaiyou
2011-01-11
建议楼主用ext js 效果就更好了 另外还有一个dhtnlx控件 可以在网上搜搜
我建议做管理系统还是用这两个做页面
项目我参考一下,最近在研究Spring Security3.0 不知道楼主在这个项目里用到没有
我建议做管理系统还是用这两个做页面
项目我参考一下,最近在研究Spring Security3.0 不知道楼主在这个项目里用到没有
24 楼
hyneng
2011-01-04
xiaoxin5230 写道
hyneng 写道
我想问一下,在登录时提交的路径是<form action="login!cde.action">,为什么执行到过滤器ManageFilter.java中以下代码时,requestUrl=/ops/manage/user-manage!login.action,这里我有点不理解,希望你能解答。
登录页面里面没有login!cde.action啊?
不好意思,看错了,谢谢!
23 楼
你的依靠
2011-01-04
这个系统做得不错,值得学习下哦!
22 楼
xiaoxin5230
2011-01-04
hyneng 写道
我想问一下,在登录时提交的路径是<form action="login!cde.action">,为什么执行到过滤器ManageFilter.java中以下代码时,requestUrl=/ops/manage/user-manage!login.action,这里我有点不理解,希望你能解答。
登录页面里面没有login!cde.action啊?
21 楼
xiaoxin5230
2011-01-04
这个是基于角色的权限控制,所以更新缓存在角色管理—>更新缓存->重新登录,即可看到效果,是不需要重启服务器的。
20 楼
hyneng
2011-01-03
xiaoxin5230 写道
weir2009 写道
还有待改善,问题不少,缓存是有问题,但我觉得权限不应有缓存,这样会出问题的,在新添加完用户后,添加了权限,然后用这个用户登录,但菜单里没有显示。
用户权限还是需要缓存的,不然每次查数据库,用户多的话说不定数据库受不了。添加了用户,然后需要给他配置角色,如果是修改了角色对应的菜单,那么需要更新缓存才能看到效果。
你这里所说的“需要更新缓存才能看到效果。”是不是要重启服务器。我是要重启服务器才行,这样是不是不太好。
19 楼
hyneng
2011-01-03
我想问一下,在登录时提交的路径是<form action="login!cde.action">,为什么执行到过滤器ManageFilter.java中以下代码时,requestUrl=/ops/manage/user-manage!login.action,这里我有点不理解,希望你能解答。
// 获取访问的url String requestUrl = req.getRequestURI();
18 楼
amnotsuperior
2011-01-03
正想研究一下 ssh 呵呵 谢谢
17 楼
kenchen0805
2011-01-02
ie用不了,最大的问题,现在有多少不用ie的
16 楼
xiaoxin5230
2011-01-02
weir2009 写道
还有待改善,问题不少,缓存是有问题,但我觉得权限不应有缓存,这样会出问题的,在新添加完用户后,添加了权限,然后用这个用户登录,但菜单里没有显示。
用户权限还是需要缓存的,不然每次查数据库,用户多的话说不定数据库受不了。添加了用户,然后需要给他配置角色,如果是修改了角色对应的菜单,那么需要更新缓存才能看到效果。
15 楼
weir2009
2011-01-02
还有待改善,问题不少,缓存是有问题,但我觉得权限不应有缓存,这样会出问题的,在新添加完用户后,添加了权限,然后用这个用户登录,但菜单里没有显示。
14 楼
xiaoxin5230
2011-01-02
take 写道
好像不能正常登陆..!
提示找不到login.action
提示找不到login.action
应该是不会的,直接按照我给的那个步骤是没有问题的。
发表评论
-
模板之freemarker
2012-02-23 10:01 2311FreeMarker是一个模板引擎,一个基于模板生成文 ... -
报表之fusionchart
2011-01-13 22:27 3556java做web报表主要分为三类,一种在服务器生成 ... -
缓存之EHcache
2010-12-01 19:25 2586EhCache 是一个纯Java的进程内缓存框架,具有快速、精 ... -
java之图片处理
2010-11-17 18:26 3574package com.xyj.com.tool.util; ... -
Excel之POI
2010-11-05 13:03 5578java操作Excel最常用的开源组件有poi与jxl。jxl ... -
xml之dom4j
2010-10-27 20:31 1931Dom4j是一个易用的、开源的库,用于XML,XPath和XS ... -
汉语转拼音之pinyin4j
2010-10-21 22:11 3258汉字转成拼音如果自己实现起来有点麻烦,主要是怕有些 ... -
验证码之SimpleCaptcha (二)
2010-10-21 00:07 5452上回说到了简单的使用simpleCaptcha,这 ... -
验证码之SimpleCaptcha (一)
2010-10-20 23:46 3630在captcha中,两个比较著名的框架验证码有Jca ... -
CAS(2)
2010-08-12 15:45 2331C ... -
CAS学习
2010-07-10 15:13 3208CAS学习 ...
相关推荐
这个“基于Struts2.18+Spring2.5+Hibernate3.3+Annotation注解开发的电子商务网站demo”是一个很好的学习资源,可以帮助开发者加深对这些框架的理解并熟悉实际应用。 1. **Struts2.18**:Struts2是MVC(模型-视图-...
本文档主要介绍了如何在MyEclipse 8.6环境中搭建一个基于Struts2.1、Spring3.0和Hibernate3.3的Java Web应用开发环境。以下是各个部分的详细说明: 1. 创建Web Project项目 在MyEclipse中创建Web Project是开始...
Struts1.3、Hibernate3.3和Spring3.0是经典的Java企业级开发框架,它们的整合在早期Web应用开发中非常常见。这三种框架的结合提供了模型-视图-控制器(MVC)架构、对象关系映射(ORM)以及依赖注入(DI)和面向切面...
使用jsf1.2+spring3.0+hibernate3.3实现集成,利用annotation实现自动对象管理注入,用户表的登录增删改查操作,包括验证码ajax集成,消息机制,国际化处理,自定义转换器,自定义验证器等 qq:38732796 欢迎讨论
Struts2、Hibernate3.5和Spring3.0是Java Web开发中的三个核心框架,它们在权限管理中扮演着重要角色。这篇详细说明将深入探讨这三个框架如何协同工作,以及如何利用注解(Annotation)来简化配置。 Struts2是一个...
### Spring3.0 + Struts2.1 + Hibernate3.5 融合步骤 在Java Web开发领域,Spring、Struts 和 Hibernate 这三个框架的结合被广泛应用于构建复杂的应用程序,通常被称为 SSH(Spring + Struts + Hibernate)架构。...
Struts2.0、Hibernate3.0和Spring2.0是Java Web开发中经典的三大框架,它们的整合是企业级应用开发的常见实践。Struts2作为MVC(Model-View-Controller)框架,主要负责处理HTTP请求并调度业务逻辑;Hibernate是一个...
### Java8 + Tomcat8 + Struts2.5 + Spring4.3 + Hibernate5.2 框架搭建详细过程 #### 一、环境配置与准备 在搭建一个基于Java8 + Tomcat8 + Struts2.5 + Spring4.3 + Hibernate5.2 的项目前,首先需要对开发环境...
总结来说,"struts2.1 + spring 2.5 + hibernate 3.2 增删改查"的例子涵盖了Web应用开发中的核心部分:前端请求处理(Struts2)、业务逻辑管理(Spring)和数据库操作(Hibernate)。这个例子为初学者提供了一个很好...
整合S2SH+Freemarker+oscache,后台用Spring管理各个bean,Hibernate做数据库持久化,viewer用Freemarker。整合中对Struts2,Hibernate,Spring都采用Annotation进行注解类。
【标题】:“jQuery EasyUI+Struts2+Spring+Hibernate基于注解实现的CRM系统” 在IT领域,CRM(Customer Relationship Management,客户关系管理)系统是企业用来优化与客户交互和管理的重要工具。本项目利用一系列...
SSH三大框架,即Struts、Spring和Hibernate,是Java Web开发中的常用技术组合,它们各自负责不同的职责:Struts作为MVC模式中的Controller层,处理用户请求并转发到相应的业务逻辑;Spring则作为核心容器,负责依赖...
struts2+spring+...框架及版本:struts2 + spring3.0 + hibernate3.3 所实现的功能说明 把两个对象存入到数据库中 1、一种方法采用XML文件映射的方式 2、第二种方法采用annotation方式 注意spring配置文件的配置
整合S2SH+Freemarker,后台用Spring管理各个bean,Hibernate做数据库持久化,viewer用Freemarker。整合中对Struts2,Hibernate,Spring都采用Annotation进行注解类。
这个"Struts2+Spring2.5+Hibernate3+annotation 整合程序"旨在展示如何将这三大框架与注解(Annotation)技术结合,以实现更高效、更简洁的代码编写。 Struts2是一个基于MVC设计模式的Web应用框架,它主要负责处理...
Struts2.3.28、Spring4.1.6和Hibernate4.3.8是三个经典的Java EE框架,它们的整合是企业级应用开发中常见的技术栈,通常被称为S2SH。在这个版本的整合中,注解的使用极大地简化了配置过程,使得开发更加高效。以下是...
### Struts2+Spring2+Hibernate3+Annotation所需JAR包详解 在Java Web开发领域,Struts2、Spring2和Hibernate3是三个非常重要的框架,它们分别负责Web层、业务逻辑层和服务持久化层的功能实现。为了更好地整合这三...