java错误请教

djltzx 2011-10-20 11:26:49
framework] 2011-10-20 11:27:45,078 - org.apache.struts.action.RequestProcessor -0 [http-8080-1] WARN org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class java.lang.NumberFormatException
[framework] 2011-10-20 11:27:45,078 - org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/log].[action] -0 [http-8080-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/log].[action] - Servlet.service() for servlet action threw exception
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:417)
at java.lang.Byte.parseByte(Byte.java:151)
at java.lang.Byte.valueOf(Byte.java:184)
at java.lang.Byte.valueOf(Byte.java:208)
at com.hello.data.dao.impl.UserDAO.query(UserDAO.java:312)
at com.hello.view.action.LoginAction.managerQuery(LoginAction.java:174)
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:270)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:63)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
at java.lang.Thread.run(Thread.java:662)
什么错误
...全文
65 10 打赏 收藏 举报
写回复
10 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
at com.hello.data.dao.impl.UserDAO.query(UserDAO.java:312)

java.lang.NumberFormatException: null

应该是UserDAO.java文件312行在做转换成数值时,参数传入的是null,导致。

  • 打赏
  • 举报
回复
ylovep 2011-10-20
明显是楼主在后台获取值的时候没有获取到 导致类型转换错误
  • 打赏
  • 举报
回复
getserved 2011-10-20
你PARSEINT的時候傳了NULL值進去
  • 打赏
  • 举报
回复
wzy42563 2011-10-20

class java.lang.NumberFormatException
  • 打赏
  • 举报
回复
djltzx 2011-10-20
[Quote=引用 2 楼 crlystaldong 的回复:]

类型转换出错了,
[/Quote]
哪个地方的类型转换错了?
  • 打赏
  • 举报
回复
Valefish 2011-10-20
class java.lang.NumberFormatException
  • 打赏
  • 举报
回复
小V小V志 2011-10-20
类型转换出错了,
  • 打赏
  • 举报
回复
Zerolym 2011-10-20
数据类型不匹配
  • 打赏
  • 举报
回复
xiaxinhuo 2011-10-20
com.hello.view.action.LoginAction.managerQuery(LoginAction.java:174)
这个action的174行楼主看看是不是有空值进去?
  • 打赏
  • 举报
回复
yuanyu113 2011-10-20
+1 +1
  • 打赏
  • 举报
回复
发帖
Java EE

6.7w+

社区成员

J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
帖子事件
创建了帖子
2011-10-20 11:26
社区公告
暂无公告