Exception occurred during processing request: null

来源:互联网 发布:魔方数据恢复 编辑:程序博客网 时间:2024/05/16 12:24

Hibernate: 
    select
        user0_.id as id1_0_,
        user0_.username as username2_0_,
        user0_.userpwd as userpwd3_0_,
        user0_.note as note4_0_ 
    from
        User user0_ 
    where
        user0_.username=? 

        and user0_.userpwd=?

2015-4-3 14:36:25 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
严重: Exception occurred during processing request: null
java.lang.NullPointerException
at dxm.com.action.UserAction.
login(UserAction.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)


从执行输出可以看出 hibernate部分执行了,却报对象空,具体原因是 在action类中,user 对象的get方法注掉了,就就相当于user只是申明了。 对象没法从form 中提交的数据获数据。

ok。


有一点为明白,我的意思是struts+spring框架建项目,为啥还有什么用到hibernate。待发现

0 1