• Post Reply Bookmark Topic Watch Topic
  • New Topic

Prb in compiling the JSP  RSS feed

 
Vijayalakshmi Muthusswamy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I have a prb in compiling the JSP in Tomcat5.0. The error i get is

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 36 in the jsp file: /WarehouseMgmt/Receiving/recvExtResults.jsp
Generated servlet error:
/apps/tomcat/work/Catalina/localhost/pz2/org/apache/jsp/WarehouseMgmt/Receiving/recvExtResults_jsp.java:121: cannot resolve symbol
symbol : method getRowsWOPackGenerated (java.sql.Connection,java.lang.String,java.lang.String,java.lang.String)
location: class com.comcom.pubzone.fast_procRow
ArrayList al = (new fast_procRow()).getRowsWOPackGenerated(con,project_code,pub_no,rev_no);
^
1 error



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

******** I have my classes in the package the other classes in the same JSP works fine except for this one method also I have the method in the class. **********

Any help is greatly appreciated

Thanks
viji
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66153
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijayalakshmi , JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" (or "prb" for "problem") is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.

thanks,
bear
Forum Bartender
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66153
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error indicates that there is no methoed named getRowsWOPackGenerated in class fast_procRow (did you really name a class 'fast_procRow'? I highly recommend following standard Java naming conventions. Not doing so makes code surprisingly hard to read).
 
Vijayalakshmi Muthusswamy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Yes the class fast_procRow has the method getRowsWOPackGenerated (java.sql.Connection,java.lang.String,java.lang.String,java.lang.String). Here is the code for the class

package com.comcom.pubzone;
import com.comcom.Database.*;
import com.comcom.pubzone.tables.*;
import java.io.*;
import java.sql.*;
import java.util.*;

public class fast_procRow {

public fast_procRow() {}

public ArrayList getRowsWOPackGenerated(Connection connect,String project_code, String pub_no, String rev_no) {
ArrayList al = new ArrayList();
StringBuffer query = new StringBuffer(1400);
query.append("select NVL(primkey,0) primkey,project_code,NVL(pack_list,0) pack_list,wip_date,wip_time,back_date,back_time,");
query.append("jcom_date,jcom_time,hist_date,hist_time,process_status,prev_status,inv_pull_code,");
query.append("NVL(order_number,0) order_number,order_date,order_recd_by,order_ref,cust_cci_id,order_ref2,order_ref3,");
query.append("order_ref4,prefix_over_code,prefix_over_flag,po_numb,order_op_code,cust_ship_via,");
query.append("NVL(seq_no,0) seq_no,pub_no,rev_no,desc,NVL(qty,0) qty,NVL(price,0) price,NVL(line_cost,0) line_cost,NVL(handle_cost,0) handle_cost,NVL(adjust_amt,0) adjust_amt,NVL(ship_cost,0) ship_cost,");
query.append("NVL(est_ship_cost,0) est_ship_cost,zone,NVL(weight,0) weight,NVL(tax_amt,0) tax_amt,cust_paymnt_type,taxable,cust_ship_flag,");
query.append("cust_ship_date,NVL(pub_docs8,0) pub_docs8,NVL(pub_sheets8,0) pub_sheets8,NVL(pub_docs11x17,0) pub_docs11x17,NVL(pub_sheets11x17,0) pub_sheets11x17,NVL(pub_docs11x22,0) pub_docs11x22,");
query.append("NVL(pub_sheets11x22,0) pub_sheets11x22,NVL(pub_docs17x24,0) pub_docs17x24,NVL(pub_sheets17x24,0) pub_sheets17x24,NVL(pub_docs5x8,0) pub_docs5x8,NVL(pub_sheets5x8,0) pub_sheets5x8,pub_tabs,");
query.append("pub_binding,pub_cover_spine,pub_foldouts,stock_at_cci,due_date,NVL(job_id,0) job_id,NVL(cci_order_number,0) cci_order_number,");
query.append("cybercash_order_id,NVL(invoice_no,0) invoice_no,kit_pub_no,kit_rev_no,NVL(original_line_item,0) original_line_item,NVL(order_proc_fee,0) order_proc_fee,");
query.append("division_num,branch_order_num,order_prefix_num,production_code,NVL(group_no,0) group_no,NVL(tax_pct,0) tax_pct,");
query.append("cust_bill_type,tax_exempt_no,NVL(containers,0) containers,NVL(qty_per_ctn,0) qty_per_ctn,NVL(cci_lookup,0) cci_lookup,NVL(line_item_no,0) line_item_no,");
query.append("pub_mast_type,jobid,NVL(allocated_qty,0) allocated_qty,NVL(shipped_qty,0) shipped_qty,NVL(backorder_qty,0) backorder_qty,process_date ,nvl(service_id, 0) service_id, shipper_number, consolodate, address_id ");
query.append("from ffdb1:fast_proc ");
query.append("where project_code = ? ");
query.append("and pub_no = ? ");
query.append("and rev_no = ? ");
query.append("and process_status in ('wip','pend') ");
query.append("and pack_list = 0 ");
query.append("order by 15,28");

try {
PreparedStatement pst = connect.prepareStatement(query.toString());
pst.setString(1, project_code);
pst.setString(2, pub_no);
pst.setString(3, rev_no);
ResultSet rs = pst.executeQuery();
while(rs.next()) {
fast_proc tmp = new fast_proc();
tmp.setPrimkey(rs.getInt("primkey"));
tmp.setProject_code(rs.getString("project_code"));
tmp.setPack_list(rs.getInt("pack_list"));
tmp.setWip_date(rs.getDate("wip_date"));
tmp.setWip_time(rs.getTime("wip_time"));
tmp.setBack_date(rs.getDate("back_date"));
tmp.setBack_time(rs.getTime("back_time"));
tmp.setJcom_date(rs.getDate("jcom_date"));
tmp.setJcom_time(rs.getTime("jcom_time"));
tmp.setHist_date(rs.getDate("hist_date"));
tmp.setHist_time(rs.getTime("hist_time"));
tmp.setProcess_status(rs.getString("process_status"));
tmp.setPrev_status(rs.getString("prev_status"));
tmp.setInv_pull_code(rs.getString("inv_pull_code"));
tmp.setOrder_number(rs.getInt("order_number"));
tmp.setOrder_date(rs.getDate("order_date"));
tmp.setOrder_recd_by(rs.getString("order_recd_by"));
tmp.setOrder_ref(rs.getString("order_ref"));
tmp.setCust_cci_id(rs.getString("cust_cci_id"));
tmp.setOrder_ref2(rs.getString("order_ref2"));
tmp.setOrder_ref3(rs.getString("order_ref3"));
tmp.setOrder_ref4(rs.getString("order_ref4"));
tmp.setPrefix_over_code(rs.getString("prefix_over_code"));
tmp.setPrefix_over_flag(rs.getString("prefix_over_flag"));
tmp.setPo_numb(rs.getString("po_numb"));
tmp.setOrder_op_code(rs.getString("order_op_code"));
tmp.setCust_ship_via(rs.getString("cust_ship_via"));
tmp.setSeq_no(rs.getInt("seq_no"));
tmp.setPub_no(rs.getString("pub_no"));
tmp.setRev_no(rs.getString("rev_no"));
tmp.setDesc(rs.getString("desc"));
tmp.setQty(rs.getInt("qty"));
tmp.setPrice(rs.getDouble("price"));
tmp.setLine_cost(rs.getDouble("line_cost"));
tmp.setHandle_cost(rs.getDouble("handle_cost"));
tmp.setAdjust_amt(rs.getDouble("adjust_amt"));
tmp.setShip_cost(rs.getDouble("ship_cost"));
tmp.setEst_ship_cost(rs.getDouble("est_ship_cost"));
tmp.setZone(rs.getString("zone"));
tmp.setWeight(rs.getDouble("weight"));
tmp.setTax_amt(rs.getDouble("tax_amt"));
tmp.setCust_paymnt_type(rs.getString("cust_paymnt_type"));
tmp.setTaxable(rs.getString("taxable"));
tmp.setCust_ship_flag(rs.getString("cust_ship_flag"));
tmp.setCust_ship_date(rs.getDate("cust_ship_date"));
tmp.setPub_docs8(rs.getInt("pub_docs8"));
tmp.setPub_sheets8(rs.getInt("pub_sheets8"));
tmp.setPub_docs11x17(rs.getInt("pub_docs11x17"));
tmp.setPub_sheets11x17(rs.getInt("pub_sheets11x17"));
tmp.setPub_docs11x22(rs.getInt("pub_docs11x22"));
tmp.setPub_sheets11x22(rs.getInt("pub_sheets11x22"));
tmp.setPub_docs17x24(rs.getInt("pub_docs17x24"));
tmp.setPub_sheets17x24(rs.getInt("pub_sheets17x24"));
tmp.setPub_docs5x8(rs.getInt("pub_docs5x8"));
tmp.setPub_sheets5x8(rs.getInt("pub_sheets5x8"));
tmp.setPub_tabs(rs.getString("pub_tabs"));
tmp.setPub_binding(rs.getString("pub_binding"));
tmp.setPub_cover_spine(rs.getString("pub_cover_spine"));
tmp.setPub_foldouts(rs.getString("pub_foldouts"));
tmp.setStock_at_cci(rs.getString("stock_at_cci"));
tmp.setDue_date(rs.getDate("due_date"));
tmp.setJob_id(rs.getInt("job_id"));
tmp.setCci_order_number(rs.getInt("cci_order_number"));
tmp.setCybercash_order_id(rs.getString("cybercash_order_id"));
tmp.setInvoice_no(rs.getInt("invoice_no"));
tmp.setKit_pub_no(rs.getString("kit_pub_no"));
tmp.setKit_rev_no(rs.getString("kit_rev_no"));
tmp.setOriginal_line_item(rs.getInt("original_line_item"));
tmp.setOrder_proc_fee(rs.getDouble("order_proc_fee"));
tmp.setDivision_num(rs.getString("division_num"));
tmp.setBranch_order_num(rs.getString("branch_order_num"));
tmp.setOrder_prefix_num(rs.getString("order_prefix_num"));
tmp.setProduction_code(rs.getString("production_code"));
tmp.setGroup_no(rs.getInt("group_no"));
tmp.setTax_pct(rs.getDouble("tax_pct"));
tmp.setCust_bill_type(rs.getString("cust_bill_type"));
tmp.setTax_exempt_no(rs.getString("tax_exempt_no"));
tmp.setContainers(rs.getInt("containers"));
tmp.setQty_per_ctn(rs.getInt("qty_per_ctn"));
tmp.setCci_lookup(rs.getInt("cci_lookup"));
tmp.setLine_item_no(rs.getInt("line_item_no"));
tmp.setPub_mast_type(rs.getString("pub_mast_type"));
tmp.setJobid(rs.getString("jobid"));
tmp.setAllocated_qty(rs.getInt("allocated_qty"));
tmp.setShipped_qty(rs.getInt("shipped_qty"));
tmp.setBackorder_qty(rs.getInt("backorder_qty"));
tmp.setProcess_date(rs.getDate("process_date"));
tmp.setService_id(rs.getInt("service_id"));
tmp.setShipper_number(rs.getString("shipper_number"));
tmp.setConsolodate(rs.getString("consolodate"));
tmp.setAddress_id(rs.getInt("address_id"));
al.add(tmp);
}
pst.close();
}
catch(SQLException ex) {
System.out.println(ex.getMessage());
}
return al;
}
}

The same code works fine in a different system which has Tomcat5.0 but not in our server.

Thanks
Viji
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijayalakshmi,

A Javaranch tip:
Whenever posting more than a line or two of your code, wrap the code in UBB Code tags (there's a button on the edit screen to help with this). Doing so
preserves your indenting and makes your code much easier to read.
This generally results in more people actually reading it and, thus, more help.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess is that you've got multiple versions of this fast_procRow class floating around. The version that the webapp is finding on the new machine doesn't have this method. Check the JAR files on that machine to make sure they're the same ones in use on the other machine. If the server has multiple copies of your JAR file installed on it, be sure to delete all but one, so you know for sure which one is being found.

P.S. That is some of the scariest code I've seen in a long time.
 
Vijayalakshmi Muthusswamy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I have only one copy of that class and its in tomcat-home/webapps/WEB-INF/classes/.

thanks
viji
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant, primarily, that the version you have in this server is not the same as the version installed on the other server that's working. You could use "javap -c" to disassmble that class file and see if it's got the method signature you're looking for.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!