java.lang.NoSuchMethodError

戏剧性的说找不到该方法。静置一会奇迹般的又能运行了
阅读更多
换一批

java.lang.NoSuchMethodError:

08-13

[code=Java]件号id:nullrn判断是否给予外键件号:com.whhd.entity.ArticleId@5e9a94rnHibernate: insert into hdData.dbo.articleId (articleId_Name, articleId_ATA) values (?, ?)rn==========-==========rn2009-8-13 11:35:41 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet action threw exceptionrnjava.lang.NoSuchMethodError: com.whhd.biz.ArticleIdBiz.findbyintName(Ljava/lang/String;)Ljava/lang/Integer;rn at com.whhd.struts.action.MainAction.main_doAdd(MainAction.java:140)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 org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)rn at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)rn at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)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)rn[/code]rnactionrn[code=XML]public ActionForward main_doAdd(ActionMapping mapping, ActionForm form,rn HttpServletRequest request, HttpServletResponse response) rn System.out.println("+++++++++++++++++++我进了doAdd了");rn // TODO Auto-generated method stub rn HdmainForm hdmainForm = (HdmainForm)form;rn Hdmain hd = new Hdmain();rn ArticleId aid = new ArticleId();rn Corporation cor = new Corporation();rn Hddate hdd = new Hddate();rn rn List list = hdmainBiz.findAll();rnrn rn System.out.println("====================");rn hd.setMainCycle(request.getParameter("hdmainCycle"));//周期rn System.out.println("main_doAdd cycle:"+"+"+hd.getMainCycle());rn rn hd.setMainWarrantyTime(request.getParameter("hdmainWarrantyTime"));//保修期rn System.out.println("warrantyTime:"+hd.getMainWarrantyTime());rn rn hd.setMainManhourTest(request.getParameter("manhourTest"));rn hd.setMainManhourRepair(request.getParameter("manhourRepair"));rn hd.setMainManhourOverhaul(request.getParameter("manhourOverhaul"));rn hd.setMainImmobilityRepair(request.getParameter("immobilityRepair"));rn hd.setMainImmobilityOverhaul(request.getParameter("immobilityOverhaul"));rn hdd.setDateData(request.getParameter("hdDate"));rn hd.setHddate(hdd);rn //给件号跟ATA章节号赋值rn aid.setArticleIdName(request.getParameter("hdmainArticleId"));rn aid.setArticleIdAta(request.getParameter("hdmainAta")); rn String jh = articleIdBiz.findbyId(aid.getArticleIdName()); rn System.out.println("件号id:"+jh);rn //把ID给予查询出返回一个件号rn if(jh == null)//判断是否有这个件号;rn System.out.println("判断是否给予外键件号:"+aid);rn articleIdBiz.addIArticle(aid);//如果没有这个件号系统就会添加这个件号rn System.out.println("==========-==========");rn Integer jhh = articleIdBiz.findbyintName(aid.getArticleIdName());rn //String jhh= articleIdBiz.findbyId(aid.getArticleIdName());rn System.out.println("==========-==========");rn System.out.println("看看jh是否有返回件号ID:"+jhh+"==也要看看有没有:"+aid.getArticleIdName()); rn System.out.println(jhh);rn hd.setArticleId(jhh);//然后在把这个件号给hd的外键给予联系 rn else//如果有返回件号的id给Hmain上的外键赋值rn hd.setArticleId(Integer.parseInt(articleIdBiz.findbyId(aid.getArticleIdName())));rn rn rn System.out.println(articleIdBiz.findbyId(aid.getArticleIdName()));rnrn System.out.println("!!!!!!!!!:"+hd.getArticleId());rn rnrnrn rn System.out.println(aid.getArticleIdAta()+"|"+aid.getArticleIdName());rn rn cor.setCorporationName(request.getParameter("hdmainName"));//添加公司名称rn hd.setCorporation(cor);//添加入外键的公司名称rn Hdmain p = hdmainBiz.findbyCorAndId(cor.getCorporationName(), aid.getArticleIdName());rn rn if (p == null) //来判断是不是有公司名称并且件号同时相等的条件,如果存在说明以添加过rn System.out.println("看看是否能进判断语句");rn System.out.println("HD前一句:"+hd);rn articleIdBiz.addIArticle(aid);rn corporationBiz.addIArticle(cor);rn hddateBiz.addIArticle(hdd);rn hdmainBiz.addHdmain(hd);// TODO 有问题的一句话rn System.out.println("HD后一句:"+hd);rn return mapping.findForward("Add_success");rn else rn return mapping.findForward("Add_Failure");rn rn [/code]

没有更多推荐了,返回首页