java.lang.NumberFormatException: For input string: " xxxxx"数字转换异常处理 [问题点数:20分]

Bbs1
本版专家分:0
结帖率 0%
Bbs4
本版专家分:1486
Bbs1
本版专家分:53
Blank
脉脉勋章 绑定脉脉第三方账户获取
Blank
GitHub 绑定GitHub第三方账户获取
Blank
领英 绑定领英第三方账户获取
java.lang.NumberFormatException ... input string "0.01"
在使用Long.parseLong("0.01")时候出现java.lang.NumberFormatException这种异常是为什么呢?难道使用使用这个方法时候只能传递整数字符串?自个基础太菜了。 :( :( :( :(
"">java.lang.NumberFormatException: For input string: "1>"
org.apache.jasper.JasperException: An exception occurred processing JSP page /Reply.jsp at line 6rnrn3: rn4: rn8: rn9: rnrn以上是JSP代码,第6行不知道错误在什么地方,删掉这行就运行正常,但是需要得到上一页面传过来的参数rootid供后面使用,不知道该怎么改rn请各位大侠帮个忙,谢谢!
java.lang.NumberFormatException: For input string: "net.entity.Users@23b5c3"
import java.util.ArrayList;rnimport java.util.List;rnrnimport net.base.BaseDao;rnimport net.system.dao.UsersDao;rnrnpublic class UsersDaoImpl extends BaseDao implements UsersDao rn//数据访问层rn rn /**rn * 登录rn */rn public int getUserLogin(String userName, String password) rn // TODO Auto-generated method stubrn String hql = "from Users u where u.userName=? and password=?";rn List para = new ArrayList();rn para.add(userName);rn para.add(password);rn return super.searchCount(hql, para);rn rnrnrnrnrnrn//通用访问数据类rnpublic class BaseDao extends HibernateDaoSupportrnrn /**rn * Query通用方法返回总记录条数rn * @param hqlrn * @param rn * @returnrn */rn public int searchCount(String hql,List para)rn Session session = this.getSession();rn Query query=session.createQuery(hql);rn for(int i=0;i
java.lang.NumberFormatException: For input string: ""问题
type Exception reportrnrnmessagernrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexceptionrnrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn java.lang.Integer.parseInt(Integer.java:468)rn java.lang.Integer.parseInt(Integer.java:497)rn gao.servlet.ManagerServlet.doGet(ManagerServlet.java:30)rn gao.servlet.ManagerServlet.doPost(ManagerServlet.java:322)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn这是报错页面是说ManagerServlet的30和322有错么rnpackage gao.servlet;rnrnimport java.io.IOException;rnimport gao.java.*;rnimport java.util.*;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnimport javax.servlet.http.HttpSession;rnrnpublic class ManagerServlet extends HttpServlet rnrn rn public void doGet(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rnrn request.setCharacterEncoding("utf-8");rn response.setContentType("text/html");rn response.setCharacterEncoding("utf-8");rn DBHandle dbh=new DBHandle();rn int pageSize=10;rn int pageCount=0;rn int pageNow=1;rn int rowCount=0;/rn String flag=request.getParameter("flag");rn String pageNowStr=request.getParameter("pageNow");rn if(pageNowStr==null||pageNowStr=="") pageNowStr="1";rn pageNow=Integer.parseInt(pageNowStr.trim());
java.lang.NumberFormatException: For input string: "list"
上图,加上list就报错,不知道哪里的错误。rn[img=https://img-bbs.csdn.net/upload/201803/06/1520301036_855475.png][/img]rn路过大神看一眼。
java.lang.NumberFormatException: For input string: "id"
rnrn $yhaction.title rnrnrnjsp代码如上,我的实体类YhAction的id是Integer型的,我想遍历输出全部YhAction,然后根据id查看详细情况。rn打开这个页面的时候报错,信息如下:(我感觉是莫名奇妙的错误,项目中我有很多相似的页面就没有报错,唯独这个,郁闷啊!!!)。rnorg.apache.jasper.JasperException: java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "id"rnorg.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)rnorg.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)rnorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rnorg.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:717)rnorg.apache.struts.action.RequestProcessor.doForward(RequestProcessorrnrn请各位大侠帮忙,不胜感激!!!
java.lang.NumberFormatException: For input string: "null"
java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "null"rn java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn java.lang.Integer.parseInt(Integer.java:447)rn java.lang.Integer.parseInt(Integer.java:497)rn org.apache.jsp.report.result_jsp._jspService(result_jsp.java:134)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn com.fenglian.security.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:38)rnrn查了下result_jsp.java:134,显示sumbyzone[Integer.parseInt(ha.get(m+"")+"")][k-ndate1] = rs.getString("num1");这行出的错误rnrn String[][] sumbyzone = new String[9][datelength];rn rn for(i=0;i< datelength; j++)rn rn sumbyzone[i][j] = "0";rn rn rnrn for (m = 2201; m < 2209; m++)rn rn for(k = ndate1; k
java.lang.NumberFormatException: For input string: "previews"
问题如标题 求各位大神求助 在线等
错误java.lang.NumberFormatException: For input string: ""
exception rnrnjavax.servlet.ServletException: java.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)rn org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)rn org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.yufeng.utils.EncodingFilter.doFilter(EncodingFilter.java:24)rnrnroot cause rnrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn java.lang.Integer.parseInt(Integer.java:468)rn java.lang.Integer.parseInt(Integer.java:497)rn org.yufeng.struts.action.ArticleAction.admin_add_article(ArticleAction.java:463)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)rn org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)rn org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)rn org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.yufeng.utils.EncodingFilter.doFilter(EncodingFilter.java:24)rn我在用jsp编程做一个Struts+Spring+Hibernate文档管理系统,以上错误是在执行上传文件时出现的,具体情况:在admin_add_article.jsp中填写文档信息,点击该页面上传按钮跳转至do_upload.jsp显示上传信息,就是在点击“上传”按钮之后do_upload.jsp无法显示并出现以上错误。rn admin_add_article.jsprnrnrnrn rn 文章资源管理rn rn rn rn rn rn rn rn rn rn rnrnrn rn rn rn rnrn rn rn 文 章 详 细 信 息 rn rn rn rn rn rn rn rn 文章标题rn rn rn rn rn rn rn rn // 此处有文章其它信息的设置的代码,应该与此帖问题无关,在此省略rn rn rn 上传文件rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn do_upload.jsprnrnrnrn 文件上传处理页面rn rnrnrn rnrnrn返回rnrnrn刚开始学jsp,恳请大家指点迷津!谢谢
java.lang.NumberFormatException: For input string: ""怎么回事?
java.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn at java.lang.NumberFormatException.forInputString(Unknown Source)rn at java.lang.Integer.parseInt(Unknown Source)rn at java.lang.Integer.parseInt(Unknown Source)rn at action.SomebodyAction.execute(SomebodyAction.java:53)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Unknown Source)rn2008-7-22 10:41:26 org.apache.struts.action.RequestProcessor processExceptionrn警告: Unhandled Exception thrown: class java.lang.NumberFormatExceptionrn2008-7-22 10:41:26 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet action threw exceptionrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn at java.lang.NumberFormatException.forInputString(Unknown Source)rn at java.lang.Integer.parseInt(Unknown Source)rn at java.lang.Integer.parseInt(Unknown Source)rn at dco.SomebodyDCO.getAllUser(SomebodyDCO.java:78)rn at action.SomebodyAction.execute(SomebodyAction.java:68)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Unknown Source)
java.lang.NumberFormatException: For input string: "2;"
最近在写jsp分页显示老出错 恳请高手指教rnrnrnrn.....rn.....rn rn 共条 第页 共页 rn rn rn 1)%>rn 上一页rn rn 转到第:rnrn页rn rn rnrn在点下一页时出现错误java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "2;"rn[img=http://img.my.csdn.net/uploads/201212/17/1355731852_7623.jpg][/img]rn恳请各位高手指教
java.lang.NumberFormatException: For input string: "2017-04-01"
请问我根据日期条件查询怎么会出现这个错误,怎么解决啊,数据库是mysql,存的类型是date,框架用的mybatis,急用!各位大神帮帮忙
readLine java.lang.NumberFormatException: For input string: ""
[code=Java]import java.io.*;rnpublic class java2_002 rnrn public static void main(String[] args) rn int i,n=10,max=0,min=0,temp=0;rn try rn BufferedReader br = new BufferedReader(new InputStreamReader(System.in));rn for (i=1;i max) max=temp;rn if (temp < min) min=temp;rn rn //System.out.println("i="+String.valueOf(i));rn //如果我这一句不隐藏的时候就能正常输入,隐藏以后输入第二个数字的时候就提示如标题那串错误提示。rn rn rn catch (Exception ex) rn System.out.println(ex.getStackTrace());rn ;rn System.out.println("max="+max+"\nmin="+min);rn rn[/code]请大家帮忙。这是为什么?
java.lang.NumberFormatException: For input string: "" 求救……
String[] fids=(String[])ac.getParameters().get("fid");rn String[] fimgs=(String[])ac.getParameters().get("fimg");rn User user=(User)ac.getSession().get("user");rn rn System.out.println(fids); 这个可以输出内容,rn Integer f=Integer.parseInt(fids[0].trim()); 这个可不能转化为Integerrnrn System.out.println(f);rn页面报下面异常,控制台没有报异常。求救!rnrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn java.lang.Integer.parseInt(Integer.java:468)rn java.lang.Integer.parseInt(Integer.java:497)rn com.lore.actions.FolderAction.editFolder(FolderAction.java:68)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:306)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:306)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn
java.lang.NumberFormatException: For input string: "pageCount" java.lang.Number
rnrnrnrnrnrn rn rn rn TTMSrn rn rnrn rn rn rn rn rn rn rn rn TTTTT剧院票务管理系统rn rn rnrn rn rn rn 贤心rn rn rn rn 基本资料rn rn rn 安全设置rn rn rn rn rn 退了rn rn rn rnrn rn rn rn rn rn 员工管理rn rn rn 添加员工rn rn rn 编辑员工rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn 编号rn 姓名rn 性别rn 电话rn 邮箱rn 操作rn rn rn rn rn rn rn rn rn rn rn rn 修改rn 删除rn rn rn rn rn rn 共$requestScope.pageCount 页,当前第$pageNo 页首页rn rn rn 上一页rn rn rn rn rn rn rn 下一页rn rn rn rn rn rn 尾页rn rn rn rn rn rn rn $pageNo rn rn rn rn rn rn $toPage rn rn rn rn rn rn rn rn rn rn rn rn 添加用户rn rn rnrn rn rn rn rn rn rnrn rn rn rn rn rn rn rnrnrn这个代码会报这个错:rnroot cause rnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "pageCount"rn java.lang.NumberFormatException.forInputString(Unknown Source)rn java.lang.Integer.parseInt(Unknown Source)rn java.lang.Integer.valueOf(Unknown Source)rn org.apache.jasper.compiler.JspUtil.coerceToInt(JspUtil.java:605)rn org.apache.jasper.compiler.Generator$GenerateVisitor.convertString(Generator.java:3184)rn org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:3001)rn org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:3106)rn org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2276)rn org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1768)rn org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1538)rn org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)rn org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)rn org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2433)rn org.apache.jasper.compiler.Node$Root.accept(Node.java:474)rn org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)rn org.apache.jasper.compiler.Generator.generate(Generator.java:3517)rn org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:250)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)rn org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:728)rn org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)rnrn求大神帮忙解决
程序出现了java.lang.NumberFormatException: For input string: ""
rt以下是代码,代码中state为int类型,name为<em>string</em>类型,想实现分页查询,可是一点下一页或者选到某一页就会报错,sql语句也没有写错,在数据库中都能查到,可是就是报错,请大神帮忙看看到底怎么回事rn[code=java]public void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rnrn request.setCharacterEncoding("utf-8");rn response.setCharacterEncoding("utf-8");rn XmBillService service=new XmBillServiceImpl();rn int page=Integer.parseInt(request.getParameter("page"));rn String name=request.getParameter("goodsname");rn String state=request.getParameter("billstate");rn if(name==null)rn name ="";rn rn if(state==null)rn try rn rn int sum=service.findPageByGoodsName(name);rn rn Listlist=service.findByGoodsName(name, page, 5);rn int totalPage=0;rn if(sum%5==0)rn totalPage=sum/5;rn elsern totalPage=sum/5+1;rn rn request.setAttribute("list", list);rn request.setAttribute("name", name);rn request.setAttribute("state", state);rn request.setAttribute("page", page);rn request.setAttribute("totalPage", totalPage);rn request.getRequestDispatcher("admin_bill_list.jsp").forward(request, response);rn System.out.println(page+";"+name+";"+state);rn catch (SQLException e) rn rn e.printStackTrace();rn rn rn elsern try rn rn int sum=service.findPageByGoodsNameAndBillState(name,Integer.parseInt(state));rn Listlist=service.findByGoodsNameAndBillState(name, Integer.parseInt(state), page, 5);rn int totalPage=0;rn if(sum%5==0)rn totalPage=sum/5;rn elsern totalPage=sum/5+1;rn rn request.setAttribute("list", list);rn request.setAttribute("name", name);rn request.setAttribute("page", page);rn request.setAttribute("totalPage", totalPage);rn request.getRequestDispatcher("admin_bill_list.jsp").forward(request, response);rn System.out.println(page+";"+name+";"+state);rn catch (SQLException e) rn rn e.printStackTrace();rn rn rn rn [/code]
SimpleDateFormat问题:java.lang.NumberFormatException: For input string: ""
private static SSCLotteryInfo GetInfo(ResultSet rs) rn if (rs == null) rn return null;rn rn try rn String SSC_QH = rs.getString("SSC_QH");rn String SSC_KJSJ = rs.getString("SSC_KJSJ");rn String SSC_KJHM = rs.getString("SSC_KJHM");rn byte IS_TKS = rs.getByte("IS_TKS");rn byte IS_YKJ = rs.getByte("IS_YKJ");rn Date startTime = format.parse(SSC_KJSJ.trim());rn SSCLotteryInfo sscinfo = new SSCLotteryInfo(SSC_QH, startTime,rn SSC_KJHM, IS_TKS, IS_YKJ);rn return sscinfo;rn catch (Exception ex) rn ex.printStackTrace();rn Log.getLogger().info(ex);rn return null;rn rn rnrnrnrnrnpublic static SSCLotteryInfo GetLotteryInfo() rn SSCLotteryInfo sscinfo = null;rn Connection con = DBCPManager.getInstance().getConnection();rn if (con == null) rn return null;rn rn synchronized (con) rn String sql = "select * from SSC_Lottery where SSC_KJSJ >'" +rn format.format(new Date(new Date().getTime() + 1000)) + "'";rn PreparedStatement pstmt = null;rn ResultSet rs = null;rn try rn pstmt = con.prepareStatement(sql);rn rs = pstmt.executeQuery();rn if (rs.next()) rn sscinfo = GetInfo(rs);rn rn catch (Exception ex) rn ex.printStackTrace();rn Log.getLogger().info(ex);rn finally rn ExecuteSQL.closeAll(rs, pstmt, con);rn rn rn return sscinfo;rn rnrn为什么有时会报这样的错误:java.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""
java.lang.NumberFormatException:For input string: "13 "(急)
异常信息:rnjava.lang.NumberFormatException:For <em>input</em> <em>string</em>: "13 "rn就这一句。我用Integer.paserInt(String args)和Integer.valueOf(String args)都试过了,还是没用,不知道为啥,请高手帮忙解决下,我qq:735948069,实在不好意思,我分不够了
java.lang.NumberFormatException: For input string: 亟需帮助
HTTP Status 500 -rnrntype Exception reportrnrnmessagernrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexceptionrnrnorg.apache.jasper.JasperException: An exception occurred processing JSP page /front/personal/trepair_query.jsp at line 190rnrn187: rn188: rn189: rn190: $repairForm.repairTorepairIdrn191: $repairForm.repairStaffId rn192: $repairForm.repairRatern193: $repairForm.repairDaternrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)rn org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:690)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnroot causernrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "repairTorepairId"rn java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn java.lang.Integer.parseInt(Integer.java:447)rn java.lang.Integer.parseInt(Integer.java:497)rn javax.el.ArrayELResolver.coerce(ArrayELResolver.java:153)rn javax.el.ArrayELResolver.getValue(ArrayELResolver.java:45)rn javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)rn org.apache.el.parser.AstValue.getValue(AstValue.java:97)rn org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)rn org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:923)rn org.apache.jsp.front.personal.trepair_005fquery_jsp._jspService(trepair_005fquery_jsp.java:328)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)rn org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:690)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnnote The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.rnrnApache Tomcat/6.0.13
java.lang.NumberFormatException: For input string: "" 如何解决
//从模型中获取数据rn OrderItemBeanForm oifrom = (OrderItemBeanForm)form; rnrn String id = org.apache.commons.lang.StringUtils.defaultString(oifrom.getId()); rn String year=org.apache.commons.lang.StringUtils.defaultString(oifrom.getYear()); rn String month=org.apache.commons.lang.StringUtils.defaultString(oifrom.getMonth()); rn String day=org.apache.commons.lang.StringUtils.defaultString(oifrom.getDay()); rnrnrn rn //转换字符格式rn rn id=new String(id.getBytes("ISO-8859-1"),"gb2312");rn year=new String(year.getBytes("ISO-8859-1"),"gb2312");rn month=new String(month.getBytes("ISO-8859-1"),"gb2312");rn day=new String(day.getBytes("ISO-8859-1"),"gb2312");rnrn long lid=new Long(Long.parseLong(id));rn Date date=new Date(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day));rnrn抛出异常为:java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "" rnjava.lang.NumberFormatException.forInputString(NumberFormatException.java:48) rnjava.lang.Long.parseLong(Long.java:424) rnjava.lang.Long.parseLong(Long.java:461) rncom.iwtxokhtd.action.CreateOrderItemAction.execute(CreateOrderItemAction.java:53) rnorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) rnorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) rnorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) rnorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:710) rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:803) rnrnrn53行对应为:long lid=new Long(Long.parseLong(id));rnrn
求助:关于java.lang.NumberFormatException: For input string: "NaN"
我最近在学习Ajax,自己写了一个分页查找的例子,不过在Run的时候有个Bug,纠结了一天了,请坛子里的朋友帮我看看。rnrn这个是 PageUtil rn[code=Java]rnpackage Util;rnrnimport dao.ArchiveDAO;rnrnpublic class PageUtil rn private int pageSize;//页面大小(每页显示的条目数)rn private int pageId;//当前页码Idrn private int pageTotal;//记录总数rn private int pageNum;//记录总页数rn rn /**rn * 构造方法,用于计算总页数rn */rn public PageUtil() rn super();rn this.pageTotal = new ArchiveDAO().getTotals();rn rnrn public int getPageSize() rn return pageSize;rn rnrn public void setPageSize(int pageSize) rn this.pageSize = pageSize;rn rnrn public int getPageId() rn return pageId;rn rnrn public void setPageId(int pageId) rn this.pageId = pageId;rn rnrn public int getPageTotal() rn return pageTotal;rn rnrn /**rn * 计算总页数rn * @param pagesizern * @returnrn */rn public int getPageNum(int pageSize) rn if (pageTotal < pageSize) rn pageNum = 1;rn else if (pageTotal % pageSize == 0) rn pageNum = pageTotal / pageSize;rn else rn pageNum = pageTotal / pageSize + 1;rn rn return pageNum;rn rnrn[/code]rnrnrn这个是 DAOrn[code=Java]rnpackage dao;rnrnimport java.sql.*;rnimport java.util.ArrayList;rnimport java.util.List;rnrnimport entity.Archive;rnrnimport Util.DBUtil;rnimport Util.PageUtil;rnrnpublic class ArchiveDAO rn private static final String FIND_TOTAL = "select * from d_archive";rn private static final String FIND_ALL = "select * from d_archive limit ?,?";rn rn /**rn * 获取记录总数rn * @returnrn */rn public int getTotals() rn int pageTotal = 0;rn try rn Connection conn = DBUtil.getConnection();rn PreparedStatement prep = conn.prepareStatement(FIND_TOTAL);rn ResultSet res = prep.executeQuery();rn while (res.next()) rn pageTotal++;rn rn catch (Exception e) rn e.printStackTrace();rn rn return pageTotal;rn rn rn /**rn * 查询当前页的条目rn * @param page 当前页码rn * @returnrn */rn public List getPage(PageUtil page) rn int pageId = page.getPageId();//当前页码rn int pageSize = page.getPageSize();//页面大小rn //int pageNum = page.getPageNum(pageSize);//页码总数rn //int pageTotal = page.getPageTotal();//总条目数rn rn List list = new ArrayList();rn try rn Connection conn = DBUtil.getConnection();rn PreparedStatement prep = conn.prepareStatement(FIND_ALL);rn int begin = (pageId - 1) * pageSize;rn prep.setInt(1, begin);//开始索引位置rn prep.setInt(2, pageSize);//索引条目数rn ResultSet res = prep.executeQuery();rn rn while (res.next()) rn Archive archive = new Archive();rn archive.setId(res.getInt("id"));rn archive.setDocMgrName(res.getString("document_manager_name"));rn archive.setDepartmentName(res.getString("department_name"));rn archive.setCatchNum(res.getInt("catch_number"));rn archive.setArchiveNum(res.getInt("archive_number"));rn archive.setLastOpeTime(res.getString("last_operate_time"));rn list.add(archive);rn rn catch (Exception e) rn e.printStackTrace();rn rn return list;rn rnrn[/code]rnrn这个是 Servlet rn[code=Java]rnpackage action;rnrnimport java.io.IOException;rnimport java.io.PrintWriter;rnimport java.util.List;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnimport dao.ArchiveDAO;rnimport entity.Archive;rnrnimport Util.PageUtil;rnrn@SuppressWarnings("serial")rnpublic class ArchiveServlet extends HttpServlet rn /**rn * doGet 请求方法rn */rn public void doGet(HttpServletRequest request, HttpServletResponse response) rn throws ServletException, IOException rn //设置请求页面编码rn response.setContentType("text/html;charset=utf-8");rn request.setCharacterEncoding("utf-8");rn //获得Action请求rn String action = request.getParameter("action");rn if (action == null) rn return;rn else if ("select".equalsIgnoreCase(action)) rn select(request, response);rn rn rn rn public void doPost(HttpServletRequest request, HttpServletResponse response) rn throws ServletException, IOException rn doGet(request, response);rn rn /**rn * 获取当前页面的请求rn */rn public void select(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn //获取当前页码rn String pageIdNow = request.getParameter("pageId");rn int pageId = Integer.parseInt(pageIdNow);rn System.out.println(pageId);rn rn //获取当前页面大小rn String pageSizeNow = request.getParameter("pageSize");rn int pageSize = Integer.parseInt(pageSizeNow);rn rn PageUtil page = new PageUtil();rn page.setPageId(pageId);rn page.setPageSize(pageSize);rn rn toView(page, request, response); rn rn /**rn * 获得数据,构造静态 HTMLrn */ rn public void toView(PageUtil page, HttpServletRequest request, HttpServletResponse response) rn throws ServletException,IOException rn ArchiveDAO arcDAO = new ArchiveDAO();rn List list = arcDAO.getPage(page);rn PrintWriter out = response.getWriter();rn rn if (list == null) rn System.out.println("没有查询到数据...");rn return;rn else rn out.println("");rn out.println(" ");rn out.println(" ");rn out.println(" 档案员名称");rn out.println(" 部门名称");rn out.println(" 捕获数量");rn out.println(" 归档数量");rn out.println(" 最后操作时间 ");rn out.println("");rn for (int i=0; i " + archive.getDocMgrName() + "");rn out.println(" " + archive.getDepartmentName() + "");rn out.println(" " + archive.getCatchNum() + "");rn out.println(" " + archive.getArchiveNum() + "");rn out.println(" " + archive.getLastOpeTime() + "");rn out.println("");rn rn rn out.println("");rn rn rn out.println(" ");rn out.println("共条记录");rn out.println("共页");rn out.println("当前显示条");rn rn if (page.getPageSize() < page.getPageTotal()) rn out.println("第页");rn if (page.getPageId() == 1) rn out.println("");rn if (page.getPageId() != page.getPageNum(page.getPageSize())) rn out.println("");rn System.out.println(page.getPageId());rn else rn out.println("");rn rn else rn out.println("");rn if (page.getPageId() != page.getPageNum(page.getPageSize())) rn out.println("");rn else rn out.println("");rn rn rn else rn out.println("第页");rn out.println("");rn out.println("");rn rn out.println("");rn rnrnrn[/code]rnrn这是数据表的实例化类rn[code=Java]rnpackage entity;rnrnpublic class Archive rn private int id;rn private String docMgrName;//管理员姓名rn private String departmentName;//所属部门rn private int catchNum;//缓存数rn private int archiveNum;//归档文件数rn private String lastOpeTime;//最后操作时间rn rn public int getId() rn return id;rn rn public void setId(int id) rn this.id = id;rn rn public String getDocMgrName() rn return docMgrName;rn rn public void setDocMgrName(String docMgrName) rn this.docMgrName = docMgrName;rn rn public String getDepartmentName() rn return departmentName;rn rn public void setDepartmentName(String departmentName) rn this.departmentName = departmentName;rn rn public int getCatchNum() rn return catchNum;rn rn public void setCatchNum(int catchNum) rn this.catchNum = catchNum;rn rn public int getArchiveNum() rn return archiveNum;rn rn public void setArchiveNum(int archiveNum) rn this.archiveNum = archiveNum;rn rn public String getLastOpeTime() rn return lastOpeTime;rn rn public void setLastOpeTime(String lastOpeTime) rn this.lastOpeTime = lastOpeTime;rn rn rn public String toString() rn return "Archive [archiveNum=" + archiveNum + ", catchNum=" + catchNumrn + ", departmentName=" + departmentName + ", docMgrName="rn + docMgrName + ", id=" + id + ", lastOpeTime=" + lastOpeTimern + "]";rn rnrn[/code]rnrn
java.lang.NumberFormatException: For input string: "锘?23"如何解决?!
rn我想从txt文件中读取信息,封装成对象,但总是出现异常,求解决方法。rnrn控制台输出的内容如下:rn八月 24, 2012 4:29:07 下午 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet [ImportGoodsServlet] in context with path [/WarehouseManagementSystem] threw exceptionrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "锘?23"rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)rn at java.lang.Long.parseLong(Long.java:441)rn at java.lang.Long.parseLong(Long.java:483)rn at com.zhanghan.controller.ImportGoodsServlet.doPost(ImportGoodsServlet.java:54)rn at com.zhanghan.controller.ImportGoodsServlet.doGet(ImportGoodsServlet.java:30)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)rn at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1770)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)rn at java.lang.Thread.run(Thread.java:722)rnrn以下是相关的函数或文件:rnrn[code=Java]rnpublic void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn rn request.setCharacterEncoding("UTF-8");rn rn GoodsBeanDao existedGBDao = new GoodsBeanDao();rn BufferedReader reader = new BufferedReader(new FileReader("G:/我的程序/3.java/2.Myeclipse for j2ee/WarehouseManagementSystem/GoodsInfo.txt"));rn String line = null;rn while((line=reader.readLine())!=null)rn rn String[] list = line.split(" ");rn long goodsId = Long.parseLong(list[0].trim());//////这个地方出现的异常rn String goodsName = list[1];rn double goodsPrice = Double.parseDouble(list[2].trim());rn long goodsNum = Long.parseLong(list[3].trim());rn rn GoodsBean gb = new GoodsBean(goodsId, goodsName, goodsPrice, goodsNum);rn existedGBDao.addGoods(gb);rn rn request.getSession().setAttribute("existedGoods", existedGBDao);rn request.getRequestDispatcher("find.jsp").forward(request, response);rn rn[/code]rn读取的txt文件中前几行内容如下:rn223 悟空传 23.0 100rn1002 穆斯林的葬礼 20.0 45rn1003 平凡的世界 25.0 89rnrn还有,我保存txt时,编码为UTF-8,用Myeclipse看txt的属性时也是UTF-8的编码。
java.lang.NumberFormatException: For input string: " 1" 如何解决
a.setisActive(Integer.parseInt(temp[7]));rnrn我执行的是上面那个代码的时候报java.lang.NumberFormatException: For <em>input</em> <em>string</em>: " 1"rntemp[7]是抓的数据库里的isactive这列的值,这个值是number(1)的类型,里面的值是1或0。rntemp[]是String类型的,我在JAVA里面定义的isactive是int型的。rn此时那里面的值是1,我执行转换成int型的时候报错。rn请问该如何解决
求前辈解决java.lang.NumberFormatException: For input string: ""的问题
java.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn at java.lang.NumberFormatException.forInputString(Unknown Source)rn at java.lang.Integer.parseInt(Unknown Source)rn at java.lang.Integer.parseInt(Unknown Source)rn at com.gem.dao.impl.BaseDaoImpl.add(BaseDaoImpl.java:72)rn at com.gem.swing.MainSwing$2.actionPerformed(MainSwing.java:119)rn at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)rn at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)rn at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)rn at javax.swing.DefaultButtonModel.setPressed(Unknown Source)rn at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)rn at java.awt.Component.processMouseEvent(Unknown Source)rn at javax.swing.JComponent.processMouseEvent(Unknown Source)rn at java.awt.Component.processEvent(Unknown Source)rn at java.awt.Container.processEvent(Unknown Source)rn at java.awt.Component.dispatchEventImpl(Unknown Source)rn at java.awt.Container.dispatchEventImpl(Unknown Source)rn at java.awt.Component.dispatchEvent(Unknown Source)rn at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)rn at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)rn at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)rn at java.awt.Container.dispatchEventImpl(Unknown Source)rn at java.awt.Window.dispatchEventImpl(Unknown Source)rn at java.awt.Component.dispatchEvent(Unknown Source)rn at java.awt.EventQueue.dispatchEvent(Unknown Source)rn at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)rn at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)rn at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)rn at java.awt.EventDispatchThread.pumpEvents(Unknown Source)rn at java.awt.EventDispatchThread.pumpEvents(Unknown Source)rn at java.awt.EventDispatchThread.run(Unknown Source)rn
java.lang.NumberFormatException: For input string: ""怎么改??求教各位大神
try rn response.setContentType("text/html;charset=UTF-8");rn writer = response.getWriter();rn Session sc = (Session) request.getSession().getAttribute("session");rn long billTypeId = Long.parseLong(request.getParameter("billTypeId"));rn long [] ids = null;rn if (request.getParameter("ids") == null) rn ids = new long[] Long.parseLong(request.getParameter("id")) ;rn else rn ids = JsonUtil.getLongArray4Json(request.getParameter("ids"));rn rn List list = (List) commonService.loadBillsByIds(sc, billTypeId,ids);rn HashMap strMap = new HashMap();rn strMap.put("evoucherUrl", configService.getClientEvoucherUrl(sc));rn strMap.put("esatmpUrl", configService.getEstampUrl(sc));rn strMap.put("certID", "123");rn strMap.put("admivCode", PropertyUtils.getProperty(list.get(0), "admdiv_code"));rn strMap.put("year", PropertyUtils.getProperty(list.get(0), "year"));rn strMap.put("vtCode", PropertyUtils.getProperty(list.get(0), "vt_code"));rn String voucherNos = "";rn for (Object o : list) rn voucherNos += PropertyUtils.getProperty(o, "code") + ",";rn rn strMap.put("vouNos", voucherNos.sub<em>string</em>(0,voucherNos.length() - 1));rn JSONObject o = JSONObject.fromObject(strMap); rn writer.write(o.toString());rn
java.lang.NumberFormatException: For input string: "" 这个问题如何解决??
当我在页面上点击添加按扭时提交到action这个方法,就报这个错:rnrnpublic ActionForward addTabuInfo(ActionMapping mapping,rn ActionForm form, HttpServletRequest request,rn HttpServletResponse response)throws Exceptionrn [color=#FF0000]int firstDrugno = Integer.parseInt(request.getParameter("firstDrugno"));[/color]rn int secondDrugno = Integer.parseInt(request.getParameter("secondDrugno"));rn //根据id查出相关信息rn rn String hql = "from InjectionTabu i where i.firstDrug.id ="+firstDrugno+" and i.secondDrug.id = "+secondDrugno+"";rn List list = drugInjectionTabuBiz.findByHql(hql);rn if(list.size() != 0)rn response.getWriter().print("no");rn elsern response.getWriter().print("ok");rn rn rn return searchDrugInjection(mapping,form,request,response);rn rnrn它就报红字的地方错了!帮帮忙!谢谢!
input string: -">Exception in thread "main" java.lang.NumberFormatException: For input string: -
题目描述rnDescription 阶乘是数学中的一种运算,n的阶乘表示为:n!=1*2*3*...*n。rn编写程序,根据一个给出的n, 求得其阶乘值中所有数字之和P。并判断P是否为素数。rnInput 键盘输入一个自然数n (1≤ n ≤ 100 )。rnOutput n的阶乘值的所有数字之和P,若P为素数输出“T”,否则输出“F”。rnSample Input rn样例1: 5rn样例2: 20rnSample Output rn样例1: 3□Trn样例2: 54□FrnHint □表示空格rn输入rnInput 键盘输入一个自然数n (1≤ n ≤ 100 )。rn输出rnOutput n的阶乘值的所有数字之和P,若P为素数输出“T”,否则输出“F”。rn样例输入rn20rn样例输出rn54 Frnrn代码:rn为什么输20会报错,5的话就可以rn[code=java]public static void main(String[] args) rn // TODO Auto-generated method stubrn Scanner rd=new Scanner(System.in);rn Integer n=rd.nextInt();rn String str=jiecheng(n).toString();rn int array[]=new int[str.length()];rn int sum=0;rn for(int i=0;i
java.lang.NumberFormatException: For input string: ""报错,求大家帮助
java.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)rn at java.lang.Integer.parseInt(Integer.java:504)rn at java.lang.Integer.parseInt(Integer.java:527)rn at org.apache.jsp.cart_005fadd_jsp._jspService(cart_005fadd_jsp.java:68)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at Servlet.SetCharacterEncoding.doFilter(SetCharacterEncoding.java:43)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:729)rnrn代码如下:rn String goodsID=request.getParameter("fruit_id1");rn String goodsPrice=request.getParameter("price"); rn System.out.print(goodsID);rn System.out.print(goodsPrice); rn int goodsId=Integer.parseInt(goodsID);rn float goodsprice=Integer.parseInt(goodsPrice);rn
String转化为Double时出现java.lang.NumberFormatException: For input string: "3.0E"
String text = "3.0E0"rn怎样将它转换为Double d = 3.0,用Double.valueOf(text);就出现java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "3.0E"的错误,因为E不是数字,怎样解决这个问题?n[b]问题补充:[/b]n谢谢各位的回答,如果text = "3.0E0" 是没有问题的,我搞错了。其实出错是因为text = "3.0E",因为我是根据用户的输入给text赋值,结果用户输入到3.0E时就报错了,贴代码:rnrntext_2.addModifyListener(new ModifyListener()rnrn@Overridern rnpublic void modifyText(ModifyEvent e) rn // TODO Auto-generated method stubrn for(int i=0;i
Clob对象获取报错,java.lang.NumberFormatException: For input string: "4294967295"
报错如下:rnrnException:rnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "4294967295"rnat java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rnat java.lang.Integer.parseInt(Integer.java:480)rnat java.lang.Integer.parseInt(Integer.java:518)rnat oracle.jdbc.driver.OracleResultSetMetaData.getPrecision(OracleResultSetMetaData.java:276)rnrnrn以下是网上找到的rnResultSetMetaData接口方法getPrecision的原型是:rnrnpublic int getPrecision(int column) throws SQLException;rnrn可是Oracle的LOB最大长度是4G-1字节,即4294967295字节,已经超出int类型的范围,所以getPrecision方法会出现异常“NumberFormatException”。对于LOB长度是2G-1字节的sql server等数据库,不存在这个问题。这也可以说是sun错误的限制了LOB列的长度必须小于2G。rnrn解决方案是用oracle自己的CachedRowSet代替sun的CachedRowSet。rnrn或者不用CachedRowSet,反正就是避免对LOB列调用getPrecision。rnrnrnrn请问有什么具体的实现方法么?
请教:java.lang.NumberFormatException: For input string: "Jane" 是什么意思啊?
package register;rnrnimport javax.swing.*;rnimport java.awt.event.*;rnimport java.sql.*;rnrnpublic class HIMSRegister rn public static void main(String args[])rn rn Register_test reg = new Register_test();rn rnrnrnclass Register_test extends JFrame implements ActionListenerrnrn Connection con;rn Statement stmt; rn ResultSet rs;rn JLabel lab1,lab2,lab3,lab4,lab5,lab6,lab7,lab8,lab9,lab10,lab11,lab12,lab13,lab14;rn JTextField tf1,tf2,tf3,tf4,tf5,tf6,tf7,tf8,tf9,tf10,tf11,tf12,tf13;rn JButton bt1,bt2;rn public int IDint;//ID号rn public String RoomNo; //房间识别号rn public String Class1; // 房间类别rn public float StandardPri;//标准价rn public float RebatePri;//折后价rn public float Deposit;// 押金rn public float Total;//总额rn public String Name ;//客人姓名rn public String IDTitle;// 证件名称rn public long IDNo;// 证件号码rn public String Reason;// 住宿原因rn public int CustNo;// 住宿人数rn public String Operator;rn public String GetRoom()rn rn return RoomNo;rn rn rn Register_test()rn rn rn setLayout(null);rn setSize(1000,1000);rn setVisible(true);rn lab1 = new JLabel("订房系统界面");rn lab2 = new JLabel("房间号");rn lab3 = new JLabel("类别");rn lab4 = new JLabel("标准价");rn lab5 = new JLabel("折后价");rn lab6 = new JLabel("押金");rn lab7 = new JLabel("总额");rn lab8 = new JLabel("客户姓名");rn lab9 = new JLabel("证件类型");rn lab10 = new JLabel("证件号");rn lab11 = new JLabel("住宿原因");rn lab12 = new JLabel("住宿人数");rn lab13 = new JLabel("登记ID");rn lab14 = new JLabel("操作员");rn tf1 = new JTextField();rn tf2 = new JTextField();rn tf3 = new JTextField();rn tf4 = new JTextField();rn tf5 = new JTextField();rn tf6 = new JTextField();rn tf7 = new JTextField();rn tf8 = new JTextField();rn tf9 = new JTextField();rn tf10 = new JTextField();rn tf11 = new JTextField();rn tf12 = new JTextField();rn tf13 = new JTextField();rn bt1 = new JButton("重置");rn bt2 = new JButton("提交");rn add(lab1);add(lab2);add(lab3);add(lab4);add(lab5);add(lab6);add(lab7);rn add(lab8);add(lab9);add(lab10);add(lab11);add(lab12);add(lab13);add(lab14);rn add(tf1);add(tf2);add(tf3);add(tf4);add(tf5);add(tf6);add(tf7);add(tf8);add(tf9);add(tf10);add(tf11);add(tf12);add(tf13);rn add(bt1);add(bt2);rn rn lab1.setBounds(300, 50, 100, 50);rn lab2.setBounds(60, 120, 100, 40);rn tf1.setBounds(190, 120, 180, 40);rn lab3.setBounds(530, 120, 100, 40);rn tf2.setBounds(660, 120, 180, 40);rn rn lab4.setBounds(60, 180, 100, 40);rn tf3.setBounds(190,180,180,40);rn lab5.setBounds(530,180,100,40);rn tf4.setBounds(660, 180, 180, 40);rn rn lab6.setBounds(60,240,100,40);rn tf5.setBounds(190, 240, 180, 40);rn lab7.setBounds(530, 240, 100, 40);rn tf6.setBounds(660, 240, 180, 40);rn rn lab8.setBounds(60, 300, 100, 40);rn tf7.setBounds(190, 300, 180, 40);rn lab9.setBounds(530, 300, 100, 40);rn tf8.setBounds(660, 300, 180, 40);rn rn lab10.setBounds(60, 360,100, 40);rn tf9.setBounds(190, 360, 180, 40);rn lab11.setBounds(530, 360, 100, 40);rn tf10.setBounds(660, 360, 180, 40);rn rn lab12.setBounds(60, 420, 100, 40);rn tf11.setBounds(190, 420, 180, 40);rn lab13.setBounds(530, 420, 100, 40);rn tf12.setBounds(660, 420, 180, 40);rn rn lab14.setBounds(60, 480, 100, 40);rn tf13.setBounds(190, 480, 180, 40);rn rn bt1.setBounds(300, 540, 100, 40);rn bt2.setBounds(600, 540, 100, 40);rn bt1.addActionListener(this);rn bt2.addActionListener(this); rn tryrn rn rn Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");rn con = DriverManager.getConnection("jdbc:odbc:HIMS_hotel");rn stmt = con.createStatement();rn rn catch(Exception e)rn rn rn public void actionPerformed(ActionEvent e1)rn rn if(e1.getSource()==bt1)rn rn tf1.setText("");rn tf2.setText("");rn tf3.setText("");rn tf4.setText("");rn tf5.setText("");rn tf6.setText("");rn tf7.setText("");rn tf8.setText("");rn tf9.setText("");rn tf10.setText("");rn tf11.setText("");rn tf12.setText("");rn tf13.setText("");rn rn rn if(e1.getSource()==bt2)rn rn tryrn IDint=Integer.parseInt(tf1.getText());rn RoomNo=tf2.getText(); //房间识别号rn Class1=tf3.getText(); // 房间类别rn StandardPri=Float.parseFloat(tf4.getText());//标准价rn RebatePri=Float.parseFloat(tf5.getText());//折后价rn Deposit=Float.parseFloat(tf6.getText());// 押金rn Total=Float.parseFloat(tf7.getText());//总额rn Name=tf8.getText(); //客人姓名rn IDTitle=tf9.getText();// 证件名称rn IDNo=Long.parseLong(tf10.getText());// 证件号码rn Reason=tf11.getText();// 住宿原因rn CustNo=Integer.parseInt(tf12.getText());// 住宿人数rn Operator=tf13.getText();// 操作员rnrn /*String insertString =//不包括IDrn "INSERT INTO HIMS_Register(ID,RoomNo,Class1,StandardPri,RebatePri,Deposit,Total,Name, IDTitle,IDNo,Reason,CustNo,Operator) VALUES("rn +new Integer(IDint)+"," +"'"+RoomNo+"','"+Class1+"',"+new Float(StandardPri)+","+new Float(RebatePri)+","rn +new Float(Deposit)+","+new Float(Total) +",'"+Name+"','"+IDTitle+"',"+new Long(IDNo)+",'"rn +Reason+"',"+new Integer(CustNo)+",'"+Operator+"'"+")"; //查询语句*/rn String insertString =//不包括IDrn "INSERT INTO HIMS_Register(ID,RoomNo,Class1,StandardPri,RebatePri,Deposit,Total,Name, IDTitle,IDNo,Reason,CustNo,Operator) VALUES("rn +new Integer(IDint)+","+RoomNo+","+Class1+","+new Float(StandardPri)+","+new Float(RebatePri)+","rn +new Float(Deposit)+","+new Float(Total) +","+Name+","+IDTitle+","+new Long(IDNo)+","rn +Reason+","+new Integer(CustNo)+","+Operator+")";rn rn stmt.executeUpdate(insertString);rn System.exit(0);rnrn catch(Exception ex2)rn System.out.println(ex2);rn rnrn rn rn rn
使用JS脚本做分页但是出现错误:java.lang.NumberFormatException: For input string: ""
小弟现在在做的这个功能是希望通过调用JavaScript脚本而不通过servlet层在JSP页实现无刷新实现分页,我这个JSP页面本身使用了JavaScript代码实现点击3个DIV层触发显示,即一个Block,另外两个none,类似现在网站上的信息切换功能,但是如果我通过servlet层做分页,当点击上一页或下一页等分页按钮,页面就会跳转回原本刚刚跳入的该JSP页面,所以我使用下面的JS代码希望通过JS实现分页,但出现下面错误:rnrn严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn at java.lang.Integer.parseInt(Integer.java:468)rn at java.lang.Integer.parseInt(Integer.java:497)rn at org.apache.jsp.memeberCenter.releaseTopic_jsp._jspService(releaseTopic_jsp.java:570)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.QuestionNet.filter.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)rn at java.lang.Thread.run(Thread.java:619)rnrnrnJS代码:rnrn name=pageSize/>rn name=pageNo/> rn name=pageCount/>rnrn rnrn小弟在做毕业设计,这个问题出得非常棘手,请各位前辈,高手帮帮小弟!
Servlet运行出错,请求各位帮助!!!java.lang.NumberFormatException: For input string: "1325446
import java.io.IOException;rnimport java.io.PrintWriter;rnimport java.util.List;rnrnimport javax.servlet.ServletException;rnimport javax.servlet.http.HttpServlet;rnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnimport com.bai.dao.UserDao;rnimport com.bai.entity.Commodity;rnimport com.bai.entity.T_User;rnrnpublic class UserServlet extends HttpServlet rnrn private UserDao dao = new UserDao();rnrn public void doGet(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn request.setCharacterEncoding("utf-8");rn String flag = request.getParameter("flag");rn if ("all".equals(flag)) rn showAll(request, response);rn else if ("add".equals(flag)) rn this.addUser(request, response);rn else if ("del".equals(flag)) rn this.delOne(request, response);rn else if ("doModify".equals(flag)) rn this.doModify(request, response);rn else if ("modify".equals(flag)) rn this.modify(request, response);rn rn rnrn /**rn * 显示全部客户rn * rn * @param requestrn * @param responsern * @throws ServletExceptionrn * @throws IOExceptionrn */rn private void showAll(HttpServletRequest request,rn HttpServletResponse response) throws ServletException, IOException rn List list = dao.queryAll();rn request.setAttribute("list", list);rn request.getRequestDispatcher("backstage/Customer-management.jsp")rn .forward(request, response);rnrn rnrn /**rn * 添加客户rn * rn * @param requestrn * @param responsern * @throws ServletExceptionrn * @throws IOExceptionrn */rn private void addUser(HttpServletRequest request,rn HttpServletResponse response) throws ServletException, IOException rn // 获取信息rn int userid = Integer.parseInt(request.getParameter("userid"));rn String username = request.getParameter("username");rn String gender = request.getParameter("gender");rn String email = request.getParameter("email");rn int phnum = Integer.parseInt(request.getParameter("phnum"));rn dao.add(new T_User(userid, username, gender, email, phnum));rn // 跳转到商品类别列表页面rn this.showAll(request, response);rn
求助!java.lang.NumberFormatException: For input string: "+price+"高手请进!谢谢!急!!!!!
代码如下:rnwhile(rs.next())rn rn int productsId=rs.getInt(1) ;rn String productsName=rs.getString(2) ;rn String productsType=rs.getString(3);rn float price=rs.getFloat(4);rn float priceoff=rs.getFloat(5);rn String supplier=rs.getString(6) ;rn String place=rs.getString(7);rn int storage=rs.getInt(8);rn %>rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn出现以下问题,看了半天了,都不知道哪里错了,按理说+price+这里没错的啊,请高手指点! rnexception rnrnorg.apache.jasper.JasperException: For <em>input</em> <em>string</em>: "+price+"rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rnrnrnroot cause rnrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "+price+"rn sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)rn java.lang.Float.valueOf(Float.java:360)rn java.lang.Float.(Float.java:461)rn org.apache.jsp.client.addProducts_jsp._jspService(addProducts_jsp.java:95)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rnrn
Hadoop排序出现错误java.lang.NumberFormatException: For input string: ""怎么解决?
import java.io.IOException;rn//import java.util.StringTokenizer;rnrnimport org.apache.hadoop.conf.Configuration;rnimport org.apache.hadoop.fs.Path;rnimport org.apache.hadoop.io.IntWritable;rnimport org.apache.hadoop.io.Text;rnimport org.apache.hadoop.mapreduce.Job;rnimport org.apache.hadoop.mapreduce.Mapper;rnimport org.apache.hadoop.mapreduce.Reducer;rnimport org.apache.hadoop.mapreduce.lib.<em>input</em>.FileInputFormat;rnimport org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;rnimport org.apache.hadoop.util.GenericOptionsParser;rnrnpublic class Sort rn public static class Map extends Mapperrn private static IntWritable data = new IntWritable();rn public void map(Object key, Text value, Context context)rn throws IOException,InterruptedExceptionrn String line = value.toString();rn System.out.println(line);rn if(line != "")rn data.set(Integer.parseInt(line));rn context.write(data, new IntWritable(1));rn rn rnrn rn public static class Reduce extends Reducerrn private static IntWritable linenum = new IntWritable(1);rn rn public void reduce(IntWritable key, Iterable values, Context context)throws IOException, InterruptedExceptionrn for (IntWritable val : values)rn context.write(linenum, key);rn linenum = new IntWritable(linenum.get()+1);rn rn rn rn public static void main(String[] args) throws Exceptionrn Configuration conf = new Configuration();rn String [] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();rn if(otherArgs.length != 2)rn System.err.println("Usage: wordcount ");rn System.exit(2);rn rn rn Job job = new Job(conf, "Sort");rn job.setJarByClass(Sort.class);rn job.setMapperClass(Map.class);rn job.setReducerClass(Reduce.class);rn job.setOutputKeyClass(IntWritable.class);rn job.setOutputValueClass(IntWritable.class);rn rn FileInputFormat.addInputPath(job, new Path(otherArgs[0]));rn FileOutputFormat.setOutputPath(job, new Path(otherArgs[1]));rn System.exit(job.waitForCompletion(true) ? 0 :1);rn rn rnrnrnrn13/05/14 11:45:36 WARN mapred.LocalJobRunner: job_local_0001rn[color=#FF0000]java.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""[/color]rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)rn at java.lang.Integer.parseInt(Integer.java:493)rn at java.lang.Integer.parseInt(Integer.java:514)rn at Sort$Map.map(Sort.java:23)rn at Sort$Map.map(Sort.java:1)rn at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)rn at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)rn at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)rn at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:177)rn13/05/14 11:45:37 INFO mapred.JobClient: map 0% reduce 0%rn13/05/14 11:45:37 INFO mapred.JobClient: Job complete: job_local_0001rn13/05/14 11:45:37 INFO mapred.JobClient: Counters: 0rnrn数据为:rn 1)file1:rn2rn32rn654rn32rn15rn756rn65223rn 2)file2rn5956rn22rn650rn92rn 3)file3:rn26rn54rn6rnrn
java.lang.NumberFormatException: For input string: "null"]各位大神这怎么解决?
Servlet.service() for servlet [DispatcherServlet] in context with path [/TeachingAssistantSystem] threw exception [Request processing failed; nested exception is java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "null"] with root causernjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "null"rnrn前台代码:function distribution(rowIndex) rn user.datagrid('selectRow', rowIndex);rn var row = user.datagrid('getSelected');rn var id = row.id;rn layer.open(rn type : 2,rn title : '作业评语',rn area : [ '500px', '400px' ],rn content : '$ctx/work/remark?id='+idrn );rn rn后台代码:@RequestMapping("/remark")rn public String remark(HttpServletRequest request, Model model)rn Work work = service.findOne(Long.valueOf(request.getParameter("id")));//提示这是出错行!!rn model.addAttribute("work", work);rn return "work/remark";rn rn数据库:[img=https://img-bbs.csdn.net/upload/201705/16/1494901703_455520.jpg][/img]
求大神给个help:错误 java.lang.NumberFormatException: For input string: ""
现在用hibernate 连接数据库 作处理rnrn刚写了一个save方法,如下:rnpublic class BookDao rn private static SessionFactory sessionFactory=null;rn private Session session=null;rn Transaction tx=null;rnrn public void addBook(Books book) rn Configuration cfg=new Configuration().configure();rn sessionFactory=cfg.buildSessionFactory();rn try rn session=sessionFactory.openSession();rn session.beginTransaction();rn session.save(book);rn session.getTransaction().commit();rn catch(Exception e)rn e.printStackTrace();rn session.getTransaction().rollback();rn finallyrn if(session!=null)rn if(session.isOpen())rn session.close();rn rn rn rn然后在测试,测试代码如下:rn@Testrn public void test() rn BookDao bookDao=new BookDao();rn Books book = new Books();rn book.setBookId(1);rn book.setAuthor("leiyx");rn book.setClassify1("wuxia");rn book.setClassify2("zhongpian");rn book.setDescribe("leiyxxinzuopin");rn book.setPublishing("xinhuachubanshe");rn book.setTitleOfBook("NeverDie");rn book.setCoverImage(null);rn rn bookDao.addBook(book);rn rn然后就报错了,,,:::rnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn at java.lang.NumberFormatException.forInputString(Unknown Source)rn at java.lang.Integer.parseInt(Unknown Source)rn at java.lang.Integer.parseInt(Unknown Source)rn at org.hibernate.cfg.HbmBinder.bindColumn(HbmBinder.java:1764)rn at org.hibernate.cfg.HbmBinder.bindColumns(HbmBinder.java:1146)rn at org.hibernate.cfg.HbmBinder.bindColumnsOrFormula(HbmBinder.java:1628)rn at org.hibernate.cfg.HbmBinder.bindSimpleValue(HbmBinder.java:1208)rn at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:444)rn at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:387)rn at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:326)rn at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:177)rn at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:4006)rn at org.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXmlQueue(Configuration.java:3998)rn at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3986)rn at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1398)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1856)rn at com.control.dao.BookDao.addBook(BookDao.java:20)rn at com.control.dao.testBookDao.test(testBookDao.java:29)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at junit.framework.TestCase.runTest(TestCase.java:168)rn at junit.framework.TestCase.runBare(TestCase.java:134)rn at junit.framework.TestResult$1.protect(TestResult.java:110)rn at junit.framework.TestResult.runProtected(TestResult.java:128)rn at junit.framework.TestResult.run(TestResult.java:113)rn at junit.framework.TestCase.run(TestCase.java:124)rn at junit.framework.TestSuite.runTest(TestSuite.java:243)rn at junit.framework.TestSuite.run(TestSuite.java:238)rn at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)rn at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)rn at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)rn at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)rnrnbooks bean类:rnpublic class Books rn private int bookId;rn private String titleOfBook;rn private String author;rn private String publishing;rn private String coverImage;rn private String classify1;rn private String classify2;rn private String describe;rn rn rn public int getBookId() rn return bookId;rn rn public void setBookId(int bookId) rn this.bookId = bookId;rn rn public String getTitleOfBook() rn return titleOfBook;rn rn public void setTitleOfBook(String titleOfBook) rn this.titleOfBook = titleOfBook;rn rn public String getAuthor() rn return author;rn rn public void setAuthor(String author) rn this.author = author;rn rn public String getPublishing() rn return publishing;rn rn public void setPublishing(String publishing) rn this.publishing = publishing;rn rn public String getCoverImage() rn return coverImage;rn rn public void setCoverImage(String coverImage) rn this.coverImage = coverImage;rn rn public String getClassify1() rn return classify1;rn rn public void setClassify1(String classify1) rn this.classify1 = classify1;rn rn public String getClassify2() rn return classify2;rn rn public void setClassify2(String classify2) rn this.classify2 = classify2;rn rn public String getDescribe() rn return describe;rn rn public void setDescribe(String describe) rn this.describe = describe;rn rnrn
java.lang.NumberFormatException
mysql数据库rn表:productrnid int rnpro_name varcharrnpro_type varcharrnpro_price doublernstate intrn实体类rnprivate int id; type="java.lang.Integer" rnprivate String proName; type="java.lang.String"rnprivate String proType; type="java.lang.String"rnprivate Double proPrice; type="java.lang.Double"rnprivate int state; type="java.lang.Integer"rn查询集合后在后台打印信息:可以得到结果rnList products = productService.productList();rn if(products != null)rn request.setAttribute("product", products);rn System.out.println(products.get(0).getProName());rn System.out.println(products.get(0).getProType());rn System.out.println(products.get(0).getId());rn System.out.println(products.get(0).getProPrice());rn System.out.println(products.get(0).getState());rn rnrn就是jsp页面输出的时候有问题!rn$product.proNamern$product.proTypern$product.proPricern请大家给解决一下!rn
For input string: ""
java导入数据到excel后多出单引符号('), 怎么导入数据是去除(')?求大神指点
求助,诡异的简单输入异常java.lang.NumberFormatException: For input
代码片断如下: 一输入完a 按回车 就弹出异常rn[color=#FF0000]Exception in thread "main" java.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""[/color][code=Java]rn char flag = (char)System.in.read();rn //System.in.read();rn String str;rn if(flag=='a')rn rn System.out.println("请输入要产生的迷宫的大小 size=");rn BufferedReader br = new BufferedReader(new InputStreamReader(System.in));rn str = br.readLine(); rn size = Integer.parseInt(str); [color=#FF0000] //!!!这行出错[/color] <em>input</em>Maze(size);rn rn[/code]
xxxxx
请教高手:我是vc新手,请问如何在vc中创建类似vb中response,popup,main窗口,然后再上边放上各种控件,最好有源代码,在下有礼了。
std::string大小写转换及字符数字转换
#include   #include   #include   #include   int main() { std::<em>string</em> t_str = "AbCdEf" ; transform(t_str.begin(), t_str.end(), t_str.begin(), toupper); printf("UpperCase : %s\n", t_str.c_str(
数字转换数字转换数字转换
<em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em><em>数字转换</em>
NumberFormatException: For input string: ""求解
我做了一个BaseDao的泛型接口,按照书上写的,逻辑上还有点问题。rnrn然后在跑的时候网页报错这个。rnrnorg.apache.jasper.JasperException: An exception occurred processing JSP page /searchAll.jsp at line 47rnrn44: rn45: rn46: rn47: $list.gameNamern48: rn49: rn50: $list.gameTypernrn[code=java]rnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "gameName"rn java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn java.lang.Integer.parseInt(Integer.java:447)rn java.lang.Integer.parseInt(Integer.java:497)rn javax.el.ListELResolver.coerce(ListELResolver.java:166)rn javax.el.ListELResolver.getValue(ListELResolver.java:51)rn javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)rn org.apache.el.parser.AstValue.getValue(AstValue.java:123)rn org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:182)rn org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:897)rn org.apache.jsp.searchAll_jsp._jspx_meth_c_005fforEach_005f0(searchAll_jsp.java:146)rn org.apache.jsp.searchAll_jsp._jspService(searchAll_jsp.java:106)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:723)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:723)rn org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)rn org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)rn com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)[/code]rnrn然后查了一下 是类型转换的错误。琢磨了半个小时 实在琢磨不出来应该怎么改了 求大大们帮忙 出招。rnrnBaseDao代码:rn[code=java]public class BaseDaoImpl implements BaseDao rnrn private Class entityClass;rn protected SessionFactory sessionFactory;rnrn @SuppressWarnings("unchecked")rn public BaseDaoImpl()rn //BaseDaoImpl被继承的时候,获取t的类型rn entityClass=(Class) ((ParameterizedType)getClass().getGenericSuperclass()).getActualTypeArguments()[0];rn rnrn public void delete(T i) rn //删除rn Session session = sessionFactory.openSession();rn session.delete(i);rn rn rnrn @SuppressWarnings("unchecked")rn public List findAll() rn //查找rn Session session = sessionFactory.openSession();rn rn Query qy=session.createSQLQuery("select * from GAME").addEntity(Game.class);//防止在未查询前强转类型。rn List list=(List) qy.list();rn return list;rn rnrn public T findById(Serializable id) rn //根据ID查找rn Session session =sessionFactory.openSession();rn T instance=(T)session.get(entityClass, id);rn return instance;rn rnrn public void sava(T instance) rn //增加rn Session session = sessionFactory.openSession();rn session.save(instance);rn rn rnrn public void update(T instance) rn //修改rn Session session = sessionFactory.openSession();rn session.update(instance);rn rnrn public SessionFactory getSessionFactory() rn return sessionFactory;rn rnrn public void setSessionFactory(SessionFactory sessionFactory) rn this.sessionFactory = sessionFactory;rn rnrnrn[/code]rn[img=https://img-bbs.csdn.net/upload/201608/09/1470722106_931552.png][/img]rnrn[code=java]package com.mxz.service.impl;rnrnimport java.util.List;rnrnimport com.mxz.dao.GameDao;rnimport com.mxz.dao.impl.GameDaoImpl;rnimport com.mxz.entity.Game;rnimport com.mxz.service.GameService;rnrnrnpublic class GameServiceImpl implements GameServicern private GameDao gameDao;rn rn public boolean delete(Game game) rn try rn this.gameDao.delete(game);rn catch (Exception e) rn return false;rn rn return true;rn rn public boolean sava(Game game) rn try rn this.gameDao.sava(game);rn catch (Exception e) rn return false;rn rn return true;rn rn public List searchAll() rn List list=this.gameDao.findAll();rn return list;rn rn public Game searchGameById(Game id) rn Game game= this.gameDao.findById(id);rn return game;rn rn public boolean update(Game game) rn try rn this.gameDao.update(game);rn catch (Exception e) rn return false;rn rn return true;rn rn public GameDao getGameDao() rn return gameDao;rn rn public void setGameDao(GameDao gameDao) rn this.gameDao = gameDao;rn rn rnrnrnrnrn[/code]
For input string~~~急!
rnFor <em>input</em> <em>string</em>: "genUserID"rn从数据库查询一个结果集List,然后每条数据输出到页面rn而且一条数据是10个字段,每个字段都会遇到<em>input</em> xxx的问题,这个是哪的问题?
页面传值for input string:""
报错:rn------rn===---rnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn at java.lang.Integer.parseInt(Integer.java:468)rn at java.lang.Integer.valueOf(Integer.java:553)rn at com.sudi.action.UserManageAction.delUsers(UserManageAction.java:69)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:399)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:262)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:224)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:213)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:161)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.intercept(PrepareInterceptor.java:115)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)rn at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)rn at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:507)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)rn
关于for input String:""
[color=#FF0000]页面代码:[/color] rn rn rn rn rnrnrn rnrnrn[color=#FF00FF]Action内方法:[/color]rn public void deleteShujis() throws Exceptionrn HttpServletResponse response = ServletActionContext.getResponse();rn response.setContentType("text/html;charset=UTF-8");rn tryrn String[] ids = this.selectedIds.split(",");rn for (int i=0;i
For input string: "id"报错
是一个简单地本科javaee ssh的大实验rn在菜品页面前台取dishes.id的时候说我的id值类型不对。但是下面有一段展示用户列表的,却没有报错,正常显示。我的菜品页面是粘的用户页面的。后台也都是粘的。为什么菜品页面就有问题rn有问题的菜品页面:rn[code=java]rn rn rn rn rn rn $dishes.idrn rn rn $dishes.dishnamern rn rn $dishes.pricern rn rn rn rn rn rn rn rn rn rn rn 删除rn rn rn rn rn [/code]rnrn正常显示的用户页面rn[code=java]rn rn rn rn rn rn $users.id rn rn rn $users.usernamern rn rn $users.passwordrn rn rn rn rn rn rn rn rn rn rn rn 删除rn rn rn rn [/code]rnrn报错信息rn[code=text]六月 14, 2018 4:47:29 下午 org.apache.catalina.core.ApplicationDispatcher invokern严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "id"rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)rn at java.lang.Integer.parseInt(Integer.java:492)rn at java.lang.Integer.parseInt(Integer.java:527)rn at javax.el.ListELResolver.coerce(ListELResolver.java:163)rn at javax.el.ListELResolver.getValue(ListELResolver.java:51)rn at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:104)rn at org.apache.el.parser.AstValue.getValue(AstValue.java:183)rn at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)rn at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:967)rn at org.apache.jsp.WEB_002dINF.dishes.dish_005fdishQuery_005fsuccess_jsp._jspx_meth_s_005fiterator_005f0(dish_005fdishQuery_005fsuccess_jsp.java:217)rn at org.apache.jsp.WEB_002dINF.dishes.dish_005fdishQuery_005fsuccess_jsp._jspService(dish_005fdishQuery_005fsuccess_jsp.java:158)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)[/code]rn
错误类型:For input string: "userName"
报的错误:rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)rn at java.lang.Integer.parseInt(Integer.java:492)rn at java.lang.Integer.parseInt(Integer.java:527)rn at javax.el.ArrayELResolver.coerce(ArrayELResolver.java:158)rn at javax.el.ArrayELResolver.getValue(ArrayELResolver.java:45)rn at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:104)rn at org.apache.el.parser.AstValue.getValue(AstValue.java:184)rn at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)rn at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:950)rn at org.apache.jsp.index_jsp._jspx_meth_c_005fforEach_005f0(index_jsp.java:856)rn at org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f1(index_jsp.java:795)rn at org.apache.jsp.index_jsp._jspService(index_jsp.java:374)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:747)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)rn at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:157)rn at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)rn at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:50)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at com.justice.common.filter.CharacterFilter.doFilter(CharacterFilter.java:30)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)rn at org.springframewornrk.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at com.justice.common.filter.SecurityFilter.doFilter(SecurityFilter.java:87)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at com.justice.common.util.ReDispatcherFilter.doFilter(ReDispatcherFilter.java:44)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)rn at java.lang.Thread.run(Thread.java:745)rn
【求助】For input string: "CEO"!!!!!!
org.springframework.dao.InvalidDataAccessApiUsageException: For <em>input</em> <em>string</em>: "CEO"; nested exception is java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "CEO"rnrn at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:373)rn at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:255)rn at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:527)rn at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)rn at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)rn at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)rn at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:135)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)rn at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)rn at com.sun.proxy.$Proxy92.findAll(Unknown Source)rn at com.example.oa.OaApplicationTests.findAll1(OaApplicationTests.java:27)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)rn at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)rn at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)rn at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)rn at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)rn at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)rn at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)rn at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)rn at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)rn at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)rn at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)rn at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)rn at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)rn at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)rn at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)rn at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)rn at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)rn at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)rn at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)rn at org.junit.runners.ParentRunner.run(ParentRunner.java:363)rn at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)rn at org.junit.runner.JUnitCore.run(JUnitCore.java:137)rn at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)rn at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)rn at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)rn at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)rnCaused by: java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "CEO"rn at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)rn at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)rn at java.lang.Double.parseDouble(Double.java:538)rn at com.mysql.cj.protocol.a.MysqlTextValueDecoder.decodeDouble(MysqlTextValueDecoder.java:228)rn at com.mysql.cj.result.StringConverter.createFromBytes(StringConverter.java:114)rn at com.mysql.cj.protocol.a.MysqlTextValueDecoder.decodeByteArray(MysqlTextValueDecoder.java:238)rn at com.mysql.cj.protocol.result.AbstractResultsetRow.decodeAndCreateReturnValue(AbstractResultsetRow.java:143)rn at com.mysql.cj.protocol.result.AbstractResultsetRow.getValueFromBytes(AbstractResultsetRow.java:250)rn at com.mysql.cj.protocol.a.result.ByteArrayRow.getValue(ByteArrayRow.java:91)rn at com.mysql.cj.jdbc.result.ResultSetImpl.getNonStringValueFromRow(ResultSetImpl.java:656)rn at com.mysql.cj.jdbc.result.ResultSetImpl.getInt(ResultSetImpl.java:896)rn at com.mysql.cj.jdbc.result.ResultSetImpl.getInt(ResultSetImpl.java:916)rn at com.zaxxer.hikari.pool.HikariProxyResultSet.getInt(HikariProxyResultSet.java)rn at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$2.doExtract(IntegerTypeDescriptor.java:62)rn at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47)rn at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:261)rn at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257)rn at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:247)rn at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:333)rn at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:3007)rn at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.loadFromResultSet(EntityReferenceInitializerImpl.java:305)rn at org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl.hydrateEntityState(EntityReferenceInitializerImpl.java:233)rn at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.readRow(AbstractRowReader.java:103)rn at org.hibernate.loader.plan.exec.internal.EntityLoadQueryDetails$EntityLoaderRowReader.readRow(EntityLoadQueryDetails.java:261)rn at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:122)rn at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:122)rn at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:86)rn at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:188)rn at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:4269)rn at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:511)rn at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:481)rn at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:222)rn at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:281)rn at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:124)rn at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:92)rn at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1257)rn at org.hibernate.internal.SessionImpl.internalLoad(SessionImpl.java:1140)rn at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:682)rn at org.hibernate.type.EntityType.resolve(EntityType.java:464)rn at org.hibernate.type.ManyToOneType.resolve(ManyToOneType.java:239)rn at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:172)rn at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:129)rn at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:1151)rn at org.hibernate.loader.Loader.processResultSet(Loader.java:1010)rn at org.hibernate.loader.Loader.doQuery(Loader.java:948)rn at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:340)rn at org.hibernate.loader.Loader.doList(Loader.java:2689)rn at org.hibernate.loader.Loader.doList(Loader.java:2672)rn at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2506)rn at org.hibernate.loader.Loader.list(Loader.java:2501)rn at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:504)rn at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:395)rn at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:220)rn at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1508)rn at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1537)rn at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1505)rn at org.hibernate.query.Query.getResultList(Query.java:135)rn at org.hibernate.query.criteria.inte
报错:NumberFormatException: For input string
如下代码:rnrnrnpublic class Test rn public static void main(String[] args) rn // TODO 自动生成的方法存根rn if (args.length);rn System.exit(-1);rn rn System.out.println(d);rn rnrnrn其中当我执行java Test之后,录入 1 + 2可以得出结果3,但是当我重新输入 java Test 1 * 2之后即报错。rn我修改源码* 为x ,则没有这个问题,求解。rn
xfire异常:For input string: ""
soap包中,包含:rnrnrn3000rnrnjava代码中,rn@WebService(name = "**", targetNamespace = "***")rn@SOAPBinding(use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)rn抛出类型转换异常:rnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn at java.lang.Long.parseLong(Long.java:424)rn at java.lang.Long.parseLong(Long.java:461)rn at org.codehaus.xfire.aegis.AbstractMessageReader.getValueAsLong(AbstractMessageReader.java:78)rn请大侠指点!
java.lang.NumberFormatException: null
新手,各位前辈指导下。rn进行查询操作时,对象:age,类型:int.rnrnif(age!=0)rn rn count++;rn paramsMap.put(count,new Object[]"and t.age like ? ","%"+age+"%");rn rnrn---------------------------------------------------------rnint age=Integer.parseInt(request.getParameter("age"));rnrnList resultList=null;rn if(request.getParameterMap().size()==0)rn rn resultList=us.findAll();rn rn elsern rn Date birthday=JdbcUtil.<em>string</em>2Date(request.getParameter("birthday"));rn [color=#FF0000]resultList=us.find(userName, userNo, birthday,sex,age,address);[/color]rn抛出异常,获取到NULL,该怎样修改?
求助 java.lang.NumberFormatException
Error setting valuernjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "1401155259897"rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn at java.lang.Integer.parseInt(Integer.java:461)rn at java.lang.Integer.valueOf(Integer.java:528)rn at ognl.OgnlParserTokenManager.makeInt(OgnlParserTokenManager.java:63)rn at ognl.OgnlParserTokenManager.TokenLexicalActions(OgnlParserTokenManager.java:1624)rn at ognl.OgnlParserTokenManager.getNextToken(OgnlParserTokenManager.java:1498)rn at ognl.OgnlParser.jj_ntk(OgnlParser.java:3099)rn at ognl.OgnlParser.unaryExpression(OgnlParser.java:1079)rn at ognl.OgnlParser.multiplicativeExpression(OgnlParser.java:971)rn at ognl.OgnlParser.additiveExpression(OgnlParser.java:894)rn at ognl.OgnlParser.shiftExpression(OgnlParser.java:750)rn at ognl.OgnlParser.relationalExpression(OgnlParser.java:508)rn at ognl.OgnlParser.equalityExpression(OgnlParser.java:405)rn at ognl.OgnlParser.andExpression(OgnlParser.java:352)rn at ognl.OgnlParser.exclusiveOrExpression(OgnlParser.java:299)rn at ognl.OgnlParser.inclusiveOrExpression(OgnlParser.java:246)rn at ognl.OgnlParser.logicalAndExpression(OgnlParser.java:193)rn at ognl.OgnlParser.logicalOrExpression(OgnlParser.java:140)rn at ognl.OgnlParser.conditionalTestExpression(OgnlParser.java:101)rn at ognl.OgnlParser.assignmentExpression(OgnlParser.java:64)rn at ognl.OgnlParser.expression(OgnlParser.java:23)rn at ognl.OgnlParser.topLevelExpression(OgnlParser.java:15)rn at ognl.Ognl.parseExpression(Ognl.java:110)rn at com.opensymphony.xwork2.ognl.OgnlUtil.compile(OgnlUtil.java:241)rn at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:213)rn at com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:186)rn at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:173)rn at com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:151)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:317)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:228)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:236)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:511)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at com.h5.weibo.ApplicationFilter.doFilter(ApplicationFilter.java:47)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:662)
java.lang.NumberFormatException的问题
我的html 文件是这样的rntest.htmlrnrnrnrn rn 无标题文档rnrnrnrn rn rn rn rn rn rn 输入您的生日:rn rn rn rn rn rn 年rn rn 月rn rn 日 rn rn rn rn rn rn rnrn rn rn rn rnrnrnrnjsp文件是这样的rntest.jsprnrnrnrnrn rntestrnrnrnrn2001)rn rn haserror=true;rn errormsg[0]=" error!year must be in 1800~2001";rn rn if(month>12||month0&&day";rn rn if(haserror)rn rn out.print("your <em>input</em> is"+year+"_"+month+"_"+day+"!");rn out.print(" ");rn for(int i=0;irnrnrnrn不知道为什么rnif(stryear.compareTo("")==0||strmonth.compareTo("")==0||strday.compareTo("")==0)rn rn out.println("your must <em>input</em> your birthay!");rn rnrn这个会出现异常rn我是新手rn请大家帮帮忙看看rn谢谢了
数字转换
数据库有一字段为文本的,内容为19850302,报表直接读取该字段,打印报表时想将19850302显示为一九八五三二,有直接转换的函数吗?
org.apache.jasper.JasperException: java.lang.NumberFormatException:
SSHrn小弟查询主表中的字段 和 子表中的字段,查询后换回一个LIST集合rnList里面全是rn[Ljava.lang.Object;@104eabbrn[Ljava.lang.Object;@1ce9f9drn[Ljava.lang.Object;@510dc2rn[Ljava.lang.Object;@15e3dc4rn[Ljava.lang.Object;@2942darn这种rnrn在页面中用el循环遍历 $list.bookName rnrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "bookName"rn java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn java.lang.Integer.parseInt(Integer.java:449)rn java.lang.Integer.parseInt(Integer.java:499)rn javax.el.ArrayELResolver.coerce(ArrayELResolver.java:161)rn javax.el.ArrayELResolver.getValue(ArrayELResolver.java:45)rn javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)rn org.apache.el.parser.AstValue.getValue(AstValue.java:123)rn org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)rn org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935)rn org.apache.jsp.myBorrowing_jsp._jspService(myBorrowing_jsp.java:132)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)rn org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)rn com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rn
java.lang.NumberFormatException:的问题
java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "all"rnrn出现上面的异常!rnrn在jsp页面中,是下面的html代码:rn rn 请输入关键字查找: rn rn 所有资讯rn 国内快讯rn 国际快讯rn 市场行情rn 新产品新技术rn rn rnrnrnrn下面是另外的一段代码:rnrn public String getSqlString(String table)rn rn if (cif=="all".trim())rn if(qvalue!="")rn String sqlStr="select * from "+table+" where title like '%"+rn qvalue+"%' order by date desc";rn return sqlStr;rn elsern String sqlStr="select * from "+table+" order by date desc";rn return sqlStr;rn rn elsern if (qvalue!="")rn String sqlStr="select * from "+table+" where fenlei="+rn Integer.parseInt(cif)+" and title like '%"+rn qvalue+"%' order by date desc";rn return sqlStr;rn elsern String sqlStr="select * from "+table+" where fenlei="+rn Integer.parseInt(cif)+" order by date desc";rn return sqlStr;rn rn rn rn rnrn请问这些语句有什么不对的地方还是怎样的错误。我一直看不出,请高手指教!rnrn另外数据库的 fenlei 是 int 类型的!rnrn
javascript java.lang.NumberFormatException
在写javascript的时候遇到了java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "+num+"n n代码是这样的nn```n var i = $requestScope.records.size();n if(i > 0)n for(var num = 0; num < i ; num++)n var li = " $requestScope.records["+num+"].className"n alert(li);n// $("#myClass").append(li);n n n```n求解惑!n
数字转换???
谁能给我一个函数,将输入的阿拉伯<em>数字转换</em>为汉字!在线急等!
请问如何将REAL的数字转换为String?
如标题
【急】请教一个 ERROR [STDERR] java.lang.NumberFormatException: For input string: "" 的问题,如能解答奉上所有积分!!
我在用jboss运行程序时,通过网页向数据库中插入数据。于是遇到了这样的问题。rnrnERROR [STDERR] java.lang.NumberFormatException: For <em>input</em> <em>string</em>: " "sfa""rnERROR [STDERR] at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rnERROR [STDERR] at java.lang.Integer.parseInt(Integer.java:447)rnERROR [STDERR] at java.lang.Integer.valueOf(Integer.java:553)rnERROR [STDERR] at pcc4.core.session.Admin.setRow(Admin.java:524)rnERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rnERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rnERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rnERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)rnERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)rnERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)rnERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)rnERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)rnERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)rnERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)rnERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)rnERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)rnERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)rnERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)rnERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)rnERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)rnERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)rnERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240)rnERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210)rnERROR [STDERR] at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84)rnERROR [STDERR] at $Proxy89.setRow(Unknown Source)rnERROR [STDERR] at pcc4.flex.AdminRO.setRow(AdminRO.java:69)rnRROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rnERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rnERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rnERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)rnERROR [STDERR] at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:406)rnERROR [STDERR] at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)rnERROR [STDERR] at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1417)rnERROR [STDERR] at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:878)rnERROR [STDERR] at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)rnERROR [STDERR] at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)rnERROR [STDERR] at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:49)rnERROR [STDERR] at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)rnERROR [STDERR] at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)rnERROR [STDERR] at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:274)rnERROR [STDERR] at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:377)rnERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rnERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rnERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)rnERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rnERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rnERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rnERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rnERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)rnERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)rnERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rnERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rnERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)rnERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rnERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)rnERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rnERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rnERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)rnERROR [STDERR] at java.lang.Thread.run(Thread.java:619)看了许多网上的资料,但是我的问题还是没有解决。希望大家不吝赐教。必有重谢。rn
关于一个年份日期的错误500 Servlet Exception java.lang.NumberFormatException: For input string:"9-"
[size=12px]小弟在维护过程中遇到个小问题,请大家帮忙解答rnrn我在查看一部分学生用户信息时会遇到如下报错:[/size]rnrn[code=Java]500 Servlet Exceptionrnrn[show] java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "9-"rnrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "9-"rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn at java.lang.Integer.parseInt(Integer.java:456)rn at java.lang.Integer.(Integer.java:620)rn at _jsp._servlets._showstudentevent__jsp._jspService(servlets/ShowStudentEvent.jsp:103)rn at com.caucho.jsp.JavaPage.service(JavaPage.java:61)rn at com.caucho.jsp.Page.pageservice(Page.java:578)rn at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:195)rn at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187)rn at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266)rn at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:270)rn at com.caucho.server.port.TcpConnection.run(TcpConnection.java:678)rn at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721)rn at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643)rn at java.lang.Thread.run(Thread.java:619)[/code]rnrn[size=12px]我在检查了数据库对应表内数据时发现 报错的用户信息都有个共同点 就是date为 2009-02-21rn当我将2009改为2008时 问题解决,能够顺利查看信息.rn请问我该如何修改才能解决该问题,让date为2009-02-21的用户信息顺利显示?rn(注:其他如2009-03-24的日期不存在这个问题,都能正常显示,只有2009-02-21这个date的数据无法正常显示)rn非常感谢!rnrn下面是对应jsp的代码:(下划线部分为报错的103行内容)rn[/size]rn[code=Java]12)rn hour-=12;rn String StTime = (new Integer(hour)).toString() + StartTime.sub<em>string</em>(2);rn String EventEndTime = st.nextToken();rn String EndTime = EventEndTime.trim().sub<em>string</em>(3); rn hour = new Integer(EndTime.sub<em>string</em>(0,2)).intValue();rn if(hour>12)rn hour-=12;rn String EnTime = (new Integer(hour)).toString() + EndTime.sub<em>string</em>(2);rn String Hours = st.nextToken().trim();rn String SportHrs = st.nextToken();rn String PubAwaHrs = st.nextToken();rn String OutSideHrs = st.nextToken();rn boolean flag = false;rn float HoursCompleted = 0;rn float SportHrsComp = 0;rn float PubAwaHrsComp = 0;rn float OutSideHrsComp = 0;rn if(Hours.equals("Yet to Attend"))rn rn flag = true;rn rn elsern rn HoursCompleted = (new Float(Hours)).floatValue();rn SportHrsComp = (new Float(SportHrs)).floatValue();rn PubAwaHrsComp = (new Float(PubAwaHrs)).floatValue();rn OutSideHrsComp = (new Float(OutSideHrs)).floatValue();rn rn%>[/code]
tomcat老是编译不了jsp(出现java.lang.NumberFormatException: For input string: " Invalid class file format in c"错误)
tomcat运行正常,但就是运行不了jsp。出现如下错误:rnException Report:rnorg.apache.jasper.JasperException: Unable to compile class for JSPrnrn。。。。。。rnRoot Cause:rnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: " Invalid class file format in c"rnrn。。。。rn各位,这是什么错误呀?是哪弄错了?rn谢谢。急!
Afx:xxxxx:x:xxxxx:x:x问题!!!!!
如何更改注册类名,为什么我写的几个从CWnd继承的类都是Afx:<em>xxxxx</em>:x:<em>xxxxx</em>:x:x,而不是CxxxWnd。
linux 环境使用openssl 生CA 和密钥报异常java.lang.NumberFormatException: For input string: "
真的好奇怪,使用shell脚本生成CA和密钥对,报异常keytool error: java.lang.NumberFormatException: For <em>input</em> <em>string</em>: "",说异常出现在第一条语句,检察了十几遍,尝试了很多次还是不可以,希望大神帮忙解决一下,雪地里跪求等待。单条拿出来执行是没有问题,执行脚本就有问题。脚本如下:rnVALIDITY=365rnSERVER_KEYSTORE_PASSWORD=javakingrnSERVER_KEYSTORE_KEY_PASSWORD=javastudentrnCA_PASSWORD=jackrabbitrnSERVER_TRUSTSTORE_PASSWORD=htmlkingrnSERVER_TRUSTSTORE_KEY_PASSWORD=htmlstudentrnCLIENT_TRUSTSTORE_PASSWORD=jsonkingrnCLIENT_TRUSTSTORE_KEY_PASSWORD=jsonstudentrnCLIENT_KEYSTORE_PASSWORD=opencvkingrnCLIENT_KEYSTORE_KEY_PASSWORD=opencvstudentrnD_NAME="CN=Chan, OU=Itcs, O=KK, L=Shanghai, ST=Shanghai, C=CN"rnSUBJECT="/C=CN/ST=Shanghai/L=Shanghai/O=KK/CN=Chan"rnecho "1. 创建集群证书到server keystore......"rnkeytool -keystore kafka.server.keystore.jks -alias localhost -validity $VALIDITY -genkey -keyalg RSA -storepass "$SERVER_KEYSTORE_PASSWORD" -keypass "$SERVER_KEYSTORE_KEY_PASSWORD" -dname "$D_NAME"rnecho "2. 创建CA......"rnopenssl req -new -x509 -keyout ca-key -out ca-cert -days "$VALIDITY" -passin pass:"$CA_PASSWORD" -passout pass:"$CA_PASSWORD" -subj "$SUBJECT"rnecho "3. 导入CA文件到server truststore和client truststore......"rnkeytool -keystore kafka.server.truststore.jks -alias CARoot -import -file ca-cert -storepass "$SERVER_TRUSTSTORE_PASSWORD" -keypass "$SERVER_TRUSTSTORE_KEY_PASSWORD" -nopromptrnkeytool -keystore kafka.client.truststore.jks -alias CARoot -import -file ca-cert -storepass "$CLIENT_TRUSTSTORE_PASSWORD" -keypass "$CLIENT_TRUSTSTORE_KEY_PASSWORD" -nopromptrnecho "4. 从server keystore中导出集群证书......"rnkeytool -keystore kafka.server.keystore.jks -alias localhost -certreq -file cert-file -storepass "$SERVER_KEYSTORE_PASSWORD" -keypass "$SERVER_KEYSTORE_KEY_PASSWORD" -nopromptrnecho "5. 签发server证书......"rnopenssl x509 -req -CA ca-cert -CAkey ca-key -in cert-file -out cert-signed -days "$VALIDITY" -CAcreateserial -passin pass:"$CA_PASSWORD"rnecho "6. 导入CA文件到server keystore......"rnkeytool -keystore kafka.server.keystore.jks -alias CARoot -import -file ca-cert -storepass "$SERVER_KEYSTORE_PASSWORD" -keypass "$SERVER_KEYSTORE_KEY_PASSWORD" -nopromptrnecho "7. 导入已签发证书到server keystore......"rnkeytool -keystore kafka.server.keystore.jks -alias localhost -import -file cert-signed -storepass "$SERVER_KEYSTORE_PASSWORD" -keypass "$SERVER_KEYSTORE_KEY_PASSWORD" -nopromptrnecho "8. 创建集群证书到client keystore......"rnkeytool -keystore kafka.client.keystore.jks -alias localhost -validity $VALIDITY -genkey -keyalg RSA -storepass "$CLIENT_KEYSTORE_PASSWORD" -keypass "$CLIENT_KEYSTORE_KEY_PASSWORD" -dname "$D_NAME"rnecho "9. 从client keystore中导出集群证书......"rnkeytool -keystore kafka.client.keystore.jks -alias localhost -certreq -file cert-file -storepass "$CLIENT_KEYSTORE_PASSWORD" -keypass "$CLIENT_KEYSTORE_KEY_PASSWORD" -nopromptrnecho "10. 签发client证书......"rnopenssl x509 -req -CA ca-cert -CAkey ca-key -in cert-file -out cert-signed -days "$VALIDITY" -CAcreateserial -passin pass:"$CA_PASSWORD"rnecho "11. 导入CA文件到client keystore......"rnkeytool -keystore kafka.client.keystore.jks -alias CARoot -import -file ca-cert -storepass "$CLIENT_KEYSTORE_PASSWORD" -keypass "$CLIENT_KEYSTORE_KEY_PASSWORD" -nopromptrnecho "12. 导入已签发证书到client keystore......"rnkeytool -keystore kafka.client.keystore.jks -alias localhost -import -file cert-signed -storepass "$CLIENT_KEYSTORE_PASSWORD" -keypass "$CLIENT_KEYSTORE_KEY_PASSWORD" -noprompt
xxxxx"">include"xxxxx"
请问在源文件和头文件中include"xxxx" 有什么区别?
Input string was not in a correct format.
本地测试好好的代码,传到服务器上总是报错:Input <em>string</em> was not in a correct format.rn页面上有一个文本框接收输入的金额数字,点击按钮后代码里转换为double类型总是提示输入不正确的格式
急!xfire异常 For input string: ""
服务端是 AXIS ,自己用xfire写了一个客户端,我是把 WSDL 文件copy到本地叫xfire去访问rn[code=Java]rnrn public void testClient() throws Exception rn String wsdl = "DoBeanService.wsdl" ; // 对应的WSDL文件 rn ClassPathResource resource = new ClassPathResource(wsdl); rn Client client = new Client(resource.getInputStream(),null); // 根据WSDL创建客户实例 rn rn Object[] objArray = new Object[8];rn objArray[0] = "-1" ;rn objArray[1] = "-1" ;rn objArray[2] = "FWZL" ;rn objArray[3] = "FWZL_TEST" ;rn objArray[4] = "X0001" ;rn objArray[5] = "0" ;rn objArray[6] = "WWW.SOHU.COM" ;rn objArray[7] = "FWZL" ;rn // 调用特定的Web Service方法 rn Object[] results = client.invoke( "saveData" , objArray);rn System.out.println( "result:====" + results[0]);rn rnrn[/code]rnrn[code=XML]rnrnrn rn rn rn rn rn rn rn rn rnrn[/code]rnrn[code=Java]rnException in thread "main" org.codehaus.xfire.fault.XFireFault: For <em>input</em> <em>string</em>: ""rn at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)rn at org.codehaus.xfire.client.Client.onReceive(Client.java:410)rn at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)rn at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)rn at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)rn at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)rn at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)rn at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)rn at org.codehaus.xfire.client.Client.invoke(Client.java:336)rn at org.codehaus.xfire.client.Client.invoke(Client.java:368)rn at com.szair.fwzl.webservice.Impl.testNew.testClient(testNew.java:30)rn at com.szair.fwzl.webservice.Impl.testNew.main(testNew.java:12)rnCaused by: java.lang.NumberFormatException: For <em>input</em> <em>string</em>: ""rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn at java.lang.Integer.parseInt(Integer.java:468)rn at java.lang.Integer.parseInt(Integer.java:497)rn at org.codehaus.xfire.aegis.AbstractMessageReader.getValueAsInt(AbstractMessageReader.java:68)rn at org.codehaus.xfire.aegis.type.basic.IntType.readObject(IntType.java:18)rn at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:169)rn at org.codehaus.xfire.service.binding.RPCBinding.readMessage(RPCBinding.java:91)rn at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)rn at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)rn at org.codehaus.xfire.client.Client.onReceive(Client.java:406)rn ... 10 morernrnrn[/code]
For input string:"name"问题,请教!!!!
异常:rn严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.NumberFormatException: For <em>input</em> <em>string</em>: "gxdwmc"rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn at java.lang.Integer.parseInt(Integer.java:447)rn at java.lang.Integer.parseInt(Integer.java:497)rn at javax.el.ListELResolver.coerce(ListELResolver.java:166)rn at javax.el.ListELResolver.getValue(ListELResolver.java:51)rn at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)rnrnAction:rnpublic String pjd_Tesk() rn ServletRequest request = ServletActionContext.getRequest();rn //String jjdbh = request.getParameter("jjdbh");rn String id = "2009101010045280001";rn try rn JcjJjdb jjd_infos = pjdTeskService.listJjd_infos(id);rn request.setAttribute("jjd_infos", jjd_infos);rn if(jjd_infos.getJcjBjfsb().getBjfsdm() != null || jjd_infos.getJcjBjfsb().getBjfsdm().length()!=0)rn List gxdw_infos = pjdTeskService.listGxdws(jjd_infos.getJcjBjfsb().getBjfsdm());rn request.setAttribute("gxdw_infos", gxdw_infos);rn rn rn JcjPjdb listPjd_infos = pjdTeskService.listPjd_infos(id);rn request.setAttribute("pjd_infos", listPjd_infos);rn return "success";rn catch (JcjServiceException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn addActionError(e.getMessage());rn return "false";rn rn rn rnrnrnjsp:rnrnrn rn rnrnrnrnrn找了半天了,都不知道是错在那里,对了,我整个流程都没有用到rn Integer.parseInt("");类似的东东!!rn 谢谢!!rn 在线等......
for input string:原因及其解决方案
[javascript] view plain copy 首先我这里遇到的错误:for <em>input</em> String :** if(类型==money){   Double.parseDouble(数据库中获取的内容);  }else if(类型==number){ Integer.parseInt(数据库中获取的内容); } 首先
For input string是什么错啊?!
org.apache.jasper.JasperException: For <em>input</em> <em>string</em>: "33.0"rn......
String和input Stream的转换问题
问题的背景是需求要生成一个文件动态生成下载,我为了偷懒,采用了生成字符串,然后转成<em>input</em>steam流输出, 参考了别人的代码如下: 写道 1. String --&amp;gt; InputStream Java代码 InputStream StringToInputStream(String str){ ByteArrayInputStream stream = new ByteArrayIn...
joomla隐藏后台地址插件ksecure下载
可以隐藏joomla后台地址,防止非相关人员访问。 相关下载链接:[url=//download.csdn.net/download/blueengle/3057904?utm_source=bbsseo]//download.csdn.net/download/blueengle/3057904?utm_source=bbsseo[/url]
malab提取图像的边界下载
首先用matlab工具将图像进行二值化处理,然后提取边界。里面有实验的图像,以及程序介绍。 相关下载链接:[url=//download.csdn.net/download/wjx2040/3776089?utm_source=bbsseo]//download.csdn.net/download/wjx2040/3776089?utm_source=bbsseo[/url]
Bugzilla 4.4.5 user manual下载
Bugzilla 4.4.5 英文版 包括安装及使用 相关下载链接:[url=//download.csdn.net/download/testatestatest/7882673?utm_source=bbsseo]//download.csdn.net/download/testatestatest/7882673?utm_source=bbsseo[/url]
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池
我们是很有底线的