Package javax.servlet does not exist, package javax.servlet.http does not
Dear All,
I am a newbie to JAVA.
I installed JDK1.6.0_04, then NetBeans IDE 6.0
I tried compiling an example servlet, but got this error message:
package javax.servlet does not exist, package javax.servlet.http does not exist
I tried locating these packages, but in vain. I also tried setting the CLASSPATH to many values, still it did not work.
Can anyone, please, help me with this.
Should I be able to see/locate these packages, do I have to download them?
Thank you very much.
davidgoodman wrote:
Dear All,
I am a newbie to JAVA.
I installed JDK1.6.0_04, then NetBeans IDE 6.0
I tried compiling an example servlet, but got this error message:
package javax.servlet does not exist, package javax.servlet.http does not exist
What servlet/JSP engine do you plan to deploy to? Tomcat, perhaps?I think it's Tomcat (C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14). Are there other engines that come with NetBeans IDE 6.0 (when I downloaded NetBeans, I chose ALL)
>
If so, you'll need to put the servlet JAR in your CLASSPATH. (servlet-api.jar for Tomcat 5.5 and earlier, servlet.jar for 6.0 >and later.)
I tried locating these packages, but in vain.
You won't find them until you realize that you have to deploy that servlet someplace.How to deploy?
I also tried setting the CLASSPATH to many values, still it did not work.
See above. What were you planning to set CLASSPATH to?First I set to:
C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14\lib (because I found jar named servlet-api.jar in this folder)
Later I added this:
C:\Program Files\Java\jdk1.6.0_04\lib (out of trial-and-fail)
Finally I added some paths that lead to a library such as
C:\Program Files\glassfish-v2\lib
C:\Program Files\glassfish-v2\lib\ant\lib
Can anyone, please, help me with this.
Should I be able to see/locate these packages, do I have to download them?
You have to get a servlet/JSP engine. Step 1.Thank you for your help
Similar Messages
-
Package javax.servlet.http does not exist & package javax.servlet does not
Hello!
I am trying to compile this file:
/* serv2.java 29 Sep 04 */
import java.util.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class serv2 extends HttpServlet
protected void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("<HTML><HEAD><TITLE>Sample Servlet</TITLE></HEAD>"+'\n'+
"<BODY BGCOLOR='lightgreen'>"+'\n'+
"<H1 ALIGN=CENTER>Heading</H1>" + '\n' +
"<P><H2 ALIGN=CENTER>Message</H2");
out.println("</BODY></HTML>");
}And I am getting this error message:
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:4: package javax.servlet does not exist
import javax.servlet.*;
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:5: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:7: cannot resolve symbol
symbol : class HttpServlet
location: class serv2
public class serv2 extends HttpServlet
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:9: cannot resolve symbol
symbol : class HttpServletRequest
location: class serv2
protected void doPost(HttpServletRequest req, HttpServletResponse res)
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:9: cannot resolve symbol
symbol : class HttpServletResponse
location: class serv2
protected void doPost(HttpServletRequest req, HttpServletResponse res)
^
C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\WEB-INF\classes\serv2.java:10: cannot resolve symbol
symbol : class ServletException
location: class serv2
throws ServletException, IOException
^
6 errors
Tool completed with exit code 1
I have tried setting CLASSPATH lib/servlet.jar but it still will not work.
Please help me!!!Please check this page,
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html
and also
serv2 -> set it to Serv2
another nice to read :-)
http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html
+"Class names should be nouns, in mixed case with the first letter of each internal word capitalized"+
Another thing,
Put your class in a package, thanks =)
regards and goodluck,
jie -
Header ID does not exist on this record or does not match ID
Hi ,
I'm trying to import the sales order using OE_ORDER_PUB.process_order() API. If all my orders has equal no. of lines, I can able to import all the orders at one stoke. But if each order has different no. of lines, I'm unable to import all the orders at single stoke. At first run, certain no. of records are getting processed and remaining records are ending up with error stating *'Header ID does not exist on this record or does not match ID specified on header record. You require a valid header ID if the operation is Create*'. If I re-execute the errored records, its getting processed successfully.
Please help me in getting it resolved.
Find below the procedure code which I'm using to import sales order.
CREATE OR REPLACE PROCEDURE XXRT_SALES_ORDER (ERRBUF VARCHAR2, RETCODE NUMBER)
AS
l_header_rec OE_ORDER_PUB.Header_Rec_Type;
l_line_tbl OE_ORDER_PUB.Line_Tbl_Type;
l_line_adj_tbl OE_ORDER_PUB.Line_Adj_Tbl_Type;
l_return_status varchar2(200);
l_msg_count number;
l_msg_data varchar2(20000);
l_header_val_rec OE_ORDER_PUB.Header_Val_Rec_Type;
l_Header_Adj_tbl OE_ORDER_PUB.Header_Adj_Tbl_Type;
l_Header_Adj_val_tbl OE_ORDER_PUB.Header_Adj_Val_Tbl_Type;
l_Header_price_Att_tbl OE_ORDER_PUB.Header_Price_Att_Tbl_Type;
l_Header_Adj_Att_tbl OE_ORDER_PUB.Header_Adj_Att_Tbl_Type;
l_Header_Adj_Assoc_tbl OE_ORDER_PUB.Header_Adj_Assoc_Tbl_Type;
l_Header_Scredit_tbl OE_ORDER_PUB.Header_Scredit_Tbl_Type;
l_Header_Scredit_val_tbl OE_ORDER_PUB.Header_Scredit_Val_Tbl_Type;
l_line_val_tbl OE_ORDER_PUB.Line_Val_Tbl_Type;
l_Line_Adj_val_tbl OE_ORDER_PUB.Line_Adj_Val_Tbl_Type;
l_Line_price_Att_tbl OE_ORDER_PUB.Line_Price_Att_Tbl_Type;
l_Line_Adj_Att_tbl OE_ORDER_PUB.Line_Adj_Att_Tbl_Type;
l_Line_Adj_Assoc_tbl OE_ORDER_PUB.Line_Adj_Assoc_Tbl_Type;
l_Line_Scredit_tbl OE_ORDER_PUB.Line_Scredit_Tbl_Type;
l_Line_Scredit_val_tbl OE_ORDER_PUB.Line_Scredit_Val_Tbl_Type;
l_Lot_Serial_tbl OE_ORDER_PUB.Lot_Serial_Tbl_Type;
l_Lot_Serial_val_tbl OE_ORDER_PUB.Lot_Serial_Val_Tbl_Type;
l_action_request_tbl OE_ORDER_PUB.Request_Tbl_Type;
v_remarks varchar2(250);
v_count number;
v_transaction_type number;
v_cust_id number;
v_invoice_to number;
v_ship_to number;
v_itemid1 number;
v_itemid2 number;
v_itemid3 number;
v_itemid4 number;
v_itemid5 number;
v_item_type1 varchar2(15);
v_item_type2 varchar2(15);
v_item_type3 varchar2(15);
v_item_type4 varchar2(15);
v_item_type5 varchar2(15);
cursor c_data_val is select * from XXSC_SALES_ORDER_IMPORT
where process_flag='N';
cursor c_data is select * from XXSC_SALES_ORDER_IMPORT
where process_flag='N';
Begin
fnd_global.apps_initialize(1681,51411,660);
for c_data_val_rec in c_data_val
loop
v_remarks:=NULL;
select count(*) into v_count from apps.oe_order_headers_all
where cust_po_number=c_data_val_rec.iwb_no;
if v_count > 0 then
v_remarks:='Customer PO already used';
end if;
BEGIN
select transaction_type_id into v_transaction_type
from apps.OE_TRANSACTION_TYPES_tl
where name like c_data_val_rec.BILL_TO||'-DOMESTIC';
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_remarks:=v_remarks||'Invalid trans type';
END;
BEGIN
select cust_account_id into v_cust_id
from apps.hz_cust_accounts hca,
apps.hz_parties hp
where hca.party_id=hp.party_id
and hp.party_name=c_data_val_rec.CUSTOMER_NAME;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_remarks:=v_remarks||'Invalid Customer name';
END;
BEGIN
select SITE_USE_ID into v_invoice_to
from apps.hz_parties hp,
apps.hz_party_sites_v hps,
apps.hz_cust_acct_sites_all hcasa,
apps.hz_cust_site_uses_all hcsua
where
party_name=c_data_val_rec.CUSTOMER_NAME
and hp.party_id=hps.party_id
and hps.address1 like '%'||c_data_val_rec.BILL_TO||'%'
and hps.site_use_type='BILL_TO'
and hps.party_site_id=hcasa.party_site_id
and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
and SITE_USE_CODE='BILL_TO'
and hcsua.Status='A';
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid BILL_TO';
END;
BEGIN
select SITE_USE_ID into v_ship_to
from apps.hz_parties hp,
apps.hz_party_sites_v hps,
apps.hz_cust_acct_sites_all hcasa,
apps.hz_cust_site_uses_all hcsua
where
party_name=c_data_val_rec.CUSTOMER_NAME
and hp.party_id=hps.party_id
and hps.address1 like '%'||c_data_val_rec.SHIP_TO||'%'
and hps.site_use_type='SHIP_TO'
and hps.party_site_id=hcasa.party_site_id
and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
and SITE_USE_CODE='SHIP_TO'
and hcsua.Status='A';
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid SHIP_TO';
END;
IF c_data_val_rec.item1 is not null then
BEGIN
select distinct inventory_item_id into v_itemid1
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item1;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM1';
END;
BEGIN
select distinct Item_type into v_item_type1
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item1;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype1';
END;
END IF;
IF c_data_val_rec.item2 is not null then
BEGIN
select distinct inventory_item_id into v_itemid2
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item2;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM2';
END;
BEGIN
select distinct Item_type into v_item_type2
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item2;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype2';
END;
END IF;
IF c_data_val_rec.item3 is not null then
BEGIN
select distinct inventory_item_id into v_itemid3
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item3;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM3';
END;
BEGIN
select distinct Item_type into v_item_type3
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item3;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype3';
END;
END IF;
IF c_data_val_rec.item4 is not null then
BEGIN
select distinct inventory_item_id into v_itemid4
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item4;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM4';
END;
BEGIN
select distinct inventory_item_id into v_item_type4
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item4;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype4';
END;
END IF;
IF c_data_val_rec.item5 is not null then
BEGIN
select distinct inventory_item_id into v_itemid5
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item5;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid ITEM5';
END;
BEGIN
select distinct inventory_item_id into v_item_type5
from apps.mtl_system_items_b
where segment1=c_data_val_rec.item5;
EXCEPTION
WHEN OTHERS THEN
v_remarks:=v_remarks||'Invalid Itemtype5';
END;
END IF;
IF v_remarks is not null then
update XXSC_SALES_ORDER_IMPORT
set process_flag='E', remarks=v_remarks
where iwb_no=c_data_val_rec.iwb_no;
commit;
END IF;
end loop;
for c_data_rec in c_data
loop
select transaction_type_id into v_transaction_type
from OE_TRANSACTION_TYPES_tl
where name like c_data_rec.BILL_TO||'-DOMESTIC';
select cust_account_id into v_cust_id
from hz_cust_accounts hca,
hz_parties hp
where hca.party_id=hp.party_id
and hp.party_name=c_data_rec.CUSTOMER_NAME;
select SITE_USE_ID into v_invoice_to
from hz_parties hp,
hz_party_sites_v hps,
hz_cust_acct_sites_all hcasa,
hz_cust_site_uses_all hcsua
where
party_name=c_data_rec.CUSTOMER_NAME
and hp.party_id=hps.party_id
and hps.address1 like '%'||c_data_rec.BILL_TO||'%'
and hps.site_use_type='BILL_TO'
and hps.party_site_id=hcasa.party_site_id
and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
and SITE_USE_CODE='BILL_TO'
and hcsua.Status='A';
select SITE_USE_ID into v_ship_to
from hz_parties hp,
hz_party_sites_v hps,
hz_cust_acct_sites_all hcasa,
hz_cust_site_uses_all hcsua
where
party_name=c_data_rec.CUSTOMER_NAME
and hp.party_id=hps.party_id
and hps.address1 like '%'||c_data_rec.SHIP_TO||'%'
and hps.site_use_type='SHIP_TO'
and hps.party_site_id=hcasa.party_site_id
and hcasa.cust_acct_site_id=hcsua.cust_acct_site_id
and SITE_USE_CODE='SHIP_TO'
and hcsua.Status='A';
IF c_data_rec.item1 is not null then
select distinct inventory_item_id into v_itemid1
from apps.mtl_system_items_b
where segment1=c_data_rec.item1;
select distinct Item_type into v_item_type1
from apps.mtl_system_items_b
where segment1=c_data_rec.item1;
ELSE
v_itemid1:= null;
v_item_type1:= null;
END IF;
IF c_data_rec.item2 is not null then
select distinct inventory_item_id into v_itemid2
from apps.mtl_system_items_b
where segment1=c_data_rec.item2;
select distinct Item_type into v_item_type2
from apps.mtl_system_items_b
where segment1=c_data_rec.item2;
ELSE
v_itemid2:=null;
v_item_type2:= null;
END IF;
IF c_data_rec.item3 is not null then
select distinct inventory_item_id into v_itemid3
from apps.mtl_system_items_b
where segment1=c_data_rec.item3;
select distinct Item_type into v_item_type3
from apps.mtl_system_items_b
where segment1=c_data_rec.item3;
ELSE
v_itemid3:=null;
v_item_type3:=null;
END IF;
IF c_data_rec.item4 is not null then
select distinct inventory_item_id into v_itemid4
from apps.mtl_system_items_b
where segment1=c_data_rec.item4;
select distinct Item_type into v_item_type4
from apps.mtl_system_items_b
where segment1=c_data_rec.item4;
ELSE
v_itemid4:= null;
v_item_type4:= null;
END IF;
IF c_data_rec.item5 is not null then
select distinct inventory_item_id into v_itemid5
from apps.mtl_system_items_b
where segment1=c_data_rec.item5;
select distinct Item_type into v_item_type5
from apps.mtl_system_items_b
where segment1=c_data_rec.item5;
ELSE
v_itemid5:= null;
v_item_type5:= null;
END IF;
l_header_rec := OE_ORDER_PUB.G_MISS_HEADER_REC; -- Required attributes (e.g. Order Type and Customer)
l_header_rec.order_type_id := v_transaction_type;
l_header_rec.ordered_date := c_data_rec.iwb_date;
l_header_rec.sold_to_org_id := v_cust_id;
l_header_rec.price_list_id := 93174;
l_header_rec.cust_po_number := c_data_rec.iwb_no;
l_header_rec.ship_to_org_id := v_ship_to;
l_header_rec.invoice_to_org_id := v_invoice_to;
l_header_rec.CONTEXT:='566' ;
l_header_rec.ATTRIBUTE1:=c_data_rec.DELIVERY_TYPE;
-- l_header_rec.freight_term_code = NULL;
l_header_rec.operation := OE_GLOBALS.G_OPR_CREATE;
-- FIRST LINE RECORD. Initialize record to missing
if c_data_rec.item1 is not null and
c_data_rec.item2 is not null and
c_data_rec.item3 is not null and
c_data_rec.item4 is not null and
c_data_rec.item5 is not null then
l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(1).inventory_item_id :=v_itemid1;
l_line_tbl(1).ordered_quantity := c_data_rec.quantity1;
l_line_tbl(1).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(1).UNIT_SELLING_PRICE := c_data_rec.price1;
l_line_tbl(1).UNIT_LIST_PRICE := c_data_rec.price1;
l_line_tbl(1).attribute13:= v_item_type1;
l_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- SECOND LINE RECORD
--elsif c_data_rec.item2 is not null then
l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(2).inventory_item_id := v_itemid2;
l_line_tbl(2).ordered_quantity := c_data_rec.quantity2;
l_line_tbl(2).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(2).UNIT_SELLING_PRICE := c_data_rec.price2;
l_line_tbl(2).UNIT_LIST_PRICE := c_data_rec.price2;
l_line_tbl(2).attribute13:=v_item_type2;
l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- THIRD LINE RECORD
--elsif c_data_rec.item3 is not null then
l_line_tbl(3) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(3).inventory_item_id := v_itemid3;
l_line_tbl(3).ordered_quantity := c_data_rec.quantity3;
l_line_tbl(3).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(3).UNIT_SELLING_PRICE := c_data_rec.price3;
l_line_tbl(3).UNIT_LIST_PRICE := c_data_rec.price3;
l_line_tbl(3).attribute13:=v_item_type3;
l_line_tbl(3).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- FOURTH LINE RECORD
--elsif c_data_rec.item4 is not null then
l_line_tbl(4) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(4).inventory_item_id := v_itemid4;
l_line_tbl(4).ordered_quantity := c_data_rec.quantity4;
l_line_tbl(4).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(4).UNIT_SELLING_PRICE := c_data_rec.price4;
l_line_tbl(4).UNIT_LIST_PRICE := c_data_rec.price4;
l_line_tbl(4).attribute13:=v_item_type4;
l_line_tbl(4).operation := OE_GLOBALS.G_OPR_CREATE;
--END IF;
-- FIFTH LINE RECORD
--elsif c_data_rec.item5 is not null then
l_line_tbl(5) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(5).inventory_item_id := v_itemid5;
l_line_tbl(5).ordered_quantity := c_data_rec.quantity5;
l_line_tbl(5).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(5).UNIT_SELLING_PRICE := c_data_rec.price5;
l_line_tbl(5).UNIT_LIST_PRICE := c_data_rec.price5;
l_line_tbl(5).attribute13:= v_item_type5;
l_line_tbl(5).operation := OE_GLOBALS.G_OPR_CREATE;
elsif c_data_rec.item1 is not null and
c_data_rec.item2 is not null and
c_data_rec.item3 is not null and
c_data_rec.item4 is not null then
l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(1).inventory_item_id :=v_itemid1;
l_line_tbl(1).ordered_quantity := c_data_rec.quantity1;
l_line_tbl(1).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(1).UNIT_SELLING_PRICE := c_data_rec.price1;
l_line_tbl(1).UNIT_LIST_PRICE := c_data_rec.price1;
l_line_tbl(1).attribute13:= v_item_type1;
l_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- SECOND LINE RECORD
--elsif c_data_rec.item2 is not null then
l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(2).inventory_item_id := v_itemid2;
l_line_tbl(2).ordered_quantity := c_data_rec.quantity2;
l_line_tbl(2).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(2).UNIT_SELLING_PRICE := c_data_rec.price2;
l_line_tbl(2).UNIT_LIST_PRICE := c_data_rec.price2;
l_line_tbl(2).attribute13:=v_item_type2;
l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- THIRD LINE RECORD
--elsif c_data_rec.item3 is not null then
l_line_tbl(3) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(3).inventory_item_id := v_itemid3;
l_line_tbl(3).ordered_quantity := c_data_rec.quantity3;
l_line_tbl(3).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(3).UNIT_SELLING_PRICE := c_data_rec.price3;
l_line_tbl(3).UNIT_LIST_PRICE := c_data_rec.price3;
l_line_tbl(3).attribute13:=v_item_type3;
l_line_tbl(3).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- FOURTH LINE RECORD
--elsif c_data_rec.item4 is not null then
l_line_tbl(4) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(4).inventory_item_id := v_itemid4;
l_line_tbl(4).ordered_quantity := c_data_rec.quantity4;
l_line_tbl(4).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(4).UNIT_SELLING_PRICE := c_data_rec.price4;
l_line_tbl(4).UNIT_LIST_PRICE := c_data_rec.price4;
l_line_tbl(4).attribute13:=v_item_type4;
l_line_tbl(4).operation := OE_GLOBALS.G_OPR_CREATE;
elsif c_data_rec.item1 is not null and
c_data_rec.item2 is not null and
c_data_rec.item3 is not null then
l_line_tbl(1) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(1).inventory_item_id :=v_itemid1;
l_line_tbl(1).ordered_quantity := c_data_rec.quantity1;
l_line_tbl(1).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(1).UNIT_SELLING_PRICE := c_data_rec.price1;
l_line_tbl(1).UNIT_LIST_PRICE := c_data_rec.price1;
l_line_tbl(1).attribute13:= v_item_type1;
l_line_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- SECOND LINE RECORD
--elsif c_data_rec.item2 is not null then
l_line_tbl(2) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(2).inventory_item_id := v_itemid2;
l_line_tbl(2).ordered_quantity := c_data_rec.quantity2;
l_line_tbl(2).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(2).UNIT_SELLING_PRICE := c_data_rec.price2;
l_line_tbl(2).UNIT_LIST_PRICE := c_data_rec.price2;
l_line_tbl(2).attribute13:=v_item_type2;
l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
--end if;
-- THIRD LINE RECORD
--elsif c_data_rec.item3 is not null then
l_line_tbl(3) := OE_ORDER_PUB.G_MISS_LINE_REC;
l_line_tbl(3).inventory_item_id := v_itemid3;
l_line_tbl(3).ordered_quantity := c_data_rec.quantity3;
l_line_tbl(3).CALCULATE_PRICE_FLAG :='N';
l_line_tbl(3).UNIT_SELLING_PRICE := c_data_rec.price3;
l_line_tbl(3).UNIT_LIST_PRICE := c_data_rec.price3;
l_line_tbl(3).attribute13:=v_item_type3;
l_line_tbl(3).operation := OE_GLOBALS.G_OPR_CREATE;
end if;
-- CALL TO PROCESS ORDER
OE_Order_PUB.Process_Order(
p_api_version_number=>1.0,
p_header_rec => l_header_rec,
p_line_tbl=> l_line_tbl,
p_line_adj_tbl=> l_line_adj_tbl,
-- OUT variables,
x_header_rec =>l_header_rec
, x_header_val_rec =>l_header_val_rec
, x_Header_Adj_tbl =>l_Header_Adj_tbl
, x_Header_Adj_val_tbl =>l_Header_Adj_val_tbl
, x_Header_price_Att_tbl =>l_Header_price_Att_tbl
, x_Header_Adj_Att_tbl =>l_Header_Adj_Att_tbl
, x_Header_Adj_Assoc_tbl =>l_Header_Adj_Assoc_tbl
, x_Header_Scredit_tbl =>l_Header_Scredit_tbl
, x_Header_Scredit_val_tbl=>l_Header_Scredit_val_tbl
, x_line_tbl =>l_line_tbl
, x_line_val_tbl =>l_line_val_tbl
, x_Line_Adj_tbl =>l_Line_Adj_tbl
, x_Line_Adj_val_tbl =>l_Line_Adj_val_tbl
, x_Line_price_Att_tbl =>l_Line_price_Att_tbl
, x_Line_Adj_Att_tbl =>l_Line_Adj_Att_tbl
, x_Line_Adj_Assoc_tbl =>l_Line_Adj_Assoc_tbl
, x_Line_Scredit_tbl =>l_Line_Scredit_tbl
, x_Line_Scredit_val_tbl =>l_Line_Scredit_val_tbl
, x_Lot_Serial_tbl =>l_Lot_Serial_tbl
, x_Lot_Serial_val_tbl =>l_Lot_Serial_val_tbl
, x_action_request_tbl =>l_action_request_tbl,
x_return_status=> l_return_status,
x_msg_count=> l_msg_count,
x_msg_data=> l_msg_data);
if l_msg_count > 0 then
for l_index in 1..l_msg_count loop
l_msg_data := oe_msg_pub.get(p_msg_index => l_index, p_encoded => 'F');
update XXSC_SALES_ORDER_IMPORT
set process_flag='E',remarks=l_msg_data
where iwb_no=c_data_rec.iwb_no;
commit;
dbms_output.put_line('Order Failed.'||l_msg_data);
end loop;
end if;
-- Check the return status
if l_return_status = FND_API.G_RET_STS_SUCCESS then
update XXSC_SALES_ORDER_IMPORT
set process_flag='Y',ORDER_NUMBER=l_header_rec.order_number,remarks='SUCCESS'
where iwb_no=c_data_rec.iwb_no;
commit;
fnd_file.put_line (fnd_file.output,'Order no:'||l_header_rec.order_number||' Created for the IWB no:'||c_data_rec.iwb_no);
dbms_output.put_line('Order..'||l_header_rec.order_number);
Else
dbms_output.put_line('Order Failed.');
end if;
commit;
END LOOP;
End;
/Your code always sends 4 line records with each header. Code is not checking if it belongs to same header or not. Please check your code.
-
User does not exist in this period / ESS does not work anymore ;-(
Hello experts,
starting any ess application on portal side (leave request), I get the follwoing error code:
com.sap.pcuigp.xssfpm.java.FPMRuntimeException: User TESTUSER does not exist in this period
Starting application personal data I get the message: "There are no services in the area."
I know, that this error has often been discussed in this forum. So I check the hints I found, but I could not solve my problem.
The HR user TESTUSER is assigned to the portal user TESTUSER in IT0105 and the user is not exceeded.
TESTUSER got SAP_ALL on HR side.
The error appears for all users, that worked propably a few days before.
Login on portal side and HR works. ESS overview is shown for TESTUSER. For a user that has not a login to HR system it does not appear. So the single singn on (SSO) between portal and HR system seems to work.
The ESS applications worked fine until two days ago. Portal guys said, they had not done any changes on portal side.
Where could the error occure on HR side? How can I recognize if any changes have been made on HR side?
Thank you for your help.TX HRUSER seems not working.
Using the function 'Set Up and Maintain ESS User (Overview)' in TX HRUSER with my test-PERNR it is shown under 'Employees with deleted users'.
Clicking on it I got the Information:
PERS.NO: 12345678 (i.e.) NAME: Test User FROM: 01.01.2011 TO: 31.12.9999 USER: Name: FROM: TO: User does not exist.
But in IT0105 the PERNR is assigned to user TESTUSER in that period.
When I try to assign PERNR to TESTUSER with TX HRUSER under 'Assign Employees to Existing Users' I read the follwing information:
USER: TESTUSER Name: FROM: 01.01.2011 TO: 31.12.9999 USER GROUP: IT PERS.NO.: NAME: FROM: TO: no employee assigned.
Trying to 'assign employees' I get the message 'Error occurred when creating relationship for user ESSUSER-B to employee'.
Please create the appropriate assignment manually in HR master data.
But I have assigned it manualy in IT 0105.
Concurrent employment (CCURE PAUIX) is not activated. -
If image file not exist in image path crystal report not open and give me exception error problem
Hi guys my code below show pictures for all employees
code is working but i have proplem
if image not exist in path
crystal report not open and give me exception error image file not exist in path
although the employee no found in database but if image not exist in path when loop crystal report will not open
how to ignore image files not exist in path and open report this is actually what i need
my code below as following
DataTable dt = new DataTable();
string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
using (SqlConnection con = new SqlConnection(connString))
con.Open();
SqlCommand cmd = new SqlCommand("ViewEmployeeNoRall", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
da.Fill(dt);
foreach (DataRow dr in dt.Rows)
FileStream fs = null;
fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + dr[0] + ".jpg", FileMode.Open);
BinaryReader br = new BinaryReader(fs);
byte[] imgbyte = new byte[fs.Length + 1];
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dr["Image"] = imgbyte;
fs.Dispose();
ReportDocument objRpt = new Reports.CrystalReportData2();
objRpt.SetDataSource(dt);
crystalReportViewer1.ReportSource = objRpt;
crystalReportViewer1.Refresh();
and exception error as belowFirst: I created a New Column ("Image") in a datatable of the dataset and change the DataType to System.Byte()
Second : Drag And drop this image Filed Where I want.
private void LoadReport()
frmCheckWeigher rpt = new frmCheckWeigher();
CryRe_DailyBatch report = new CryRe_DailyBatch();
DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter ta = new CheckWeigherReportViewer.DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter();
DataSet1.DataTable_DailyBatch1DataTable table = ta.GetData(clsLogs.strStartDate_rpt, clsLogs.strBatchno_Rpt, clsLogs.cmdeviceid); // Data from Database
DataTable dt = GetImageRow(table, "Footer.Jpg");
report.SetDataSource(dt);
crv1.ReportSource = report;
crv1.Refresh();
By this Function I merge My Image data into dataTable
private DataTable GetImageRow(DataTable dt, string ImageName)
try
FileStream fs;
BinaryReader br;
if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + ImageName))
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
else
// if photo does not exist show the nophoto.jpg file
fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
// initialise the binary reader from file streamobject
br = new BinaryReader(fs);
// define the byte array of filelength
byte[] imgbyte = new byte[fs.Length + 1];
// read the bytes from the binary reader
imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
dt.Rows[0]["Image"] = imgbyte;
br.Close();
// close the binary reader
fs.Close();
// close the file stream
catch (Exception ex)
// error handling
MessageBox.Show("Missing " + ImageName + "or nophoto.jpg in application folder");
return dt;
// Return Datatable After Image Row Insertion
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
Universe does not exist or your security profile does not allow to access
Hello, I have built a universe using IDT tool and sql server 2008 R2 is the source database used(installed in my local machine). It is very strange that sometimes I am able to access the universe via Web Intelligence Rich client and sometimes not. I do have created some sample webi reports but however because of some issue, i frequently get an error message as shown below. Over a period of time if i try again connecting to the universe, as a surprise it works. Please help me on this.
BOBJ version: 4.1 SP 2
DB: SQL server 2008 R2 64 bit
Error message:
Appreciate the quick help.
Thanks,
LokeshGo to CMC -> Access Levels -> Select the access Level that is in use in your desirable universe and connection folder -> Add/Remove Rights -> System -> Universe/Universe (IDT) and select the Grant for Data Access.
Best Regards,
Rodrigo. -
Package javax.servlet.http does not exist
Hello All,
A few problems here
1. My classpath doesnt seem to work.:
.;"C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar"
2. As a result, i get many errors in my simple code, but there are still a few that are not related to javac not recognizing the servlet api.
I also tried setting the classpath at the command line (event hough its temporary)
set classpath="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar"
but the servlet package is still not recognized
I have 2 classes, one to read the database connection details from a file and another class, my servlet.
Servlet Code:
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class CustomQuery extends HttpServlet
public void init() throws ServletException
EstablishDBConnetion.establishConnection();
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
response.setContentType("text/html");
PrintWriter printer = new response.getWriter();
String title = "Result from custom query";
Statement stmt = EstablishDBConnetion.establishConnection.con.createStatement();
ResultSet rs = stmt.executeQuery("select customerID from customer");
while(rs.next())
printer.println("<html> <head><title>" + title + "</title><br><br><table border=\"0\"> <tr><td>" + rs.getString(1));
rs.close();
stmt.close();
EstablishDBConnetion.establishConnection.con.close();
Database connection code
import java.io.*;
import java.sql.*;
import java.util.StringTokenizer;
class EstablishDBConnetion
public static void establishConnection()
try
String dbDriver = "";
String dbUrl = "";
String dbName = "";
String dbUser = "";
String dbPassword = "";
String newLine = "";
BufferedReader fileRead = new BufferedReader(new FileReader("connection.txt"));
boolean readerStatus = fileRead.ready();
newLine = fileRead.readLine();
while (readerStatus)
StringTokenizer st = new StringTokenizer(newLine, ",");
while (st.hasMoreTokens())
dbDriver = st.nextToken();
dbUrl = st.nextToken();
dbName = st.nextToken();
dbUser = st.nextToken();
dbPassword = st.nextToken();
readerStatus = fileRead.ready();
Class.forName(dbDriver);
String url = dbUrl + dbName;
System.out.print(url);
Connection con = DriverManager.getConnection(url, dbUser, dbPassword);
catch (IOException e)
System.out.println("IO exception in establishConnection()");
e.printStackTrace();
catch (java.lang.Exception ex)
System.out.println("General exception in establishConnection()");
ex.printStackTrace();
public static void main(String[] args)
//EstablishDBConnetion edbc = new EstablishDBConnetion();
establishConnection();
}also, full error list below
CustomQuery.java:4: package javax.servlet does not exist
import javax.servlet.*;
^
CustomQuery.java:5: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
CustomQuery.java:7: cannot find symbol
symbol: class HttpServlet
public class CustomQuery extends HttpServlet
^
CustomQuery.java:10: cannot find symbol
symbol : class ServletException
location: class CustomQuery
public void init() throws ServletException
^
CustomQuery.java:16: cannot find symbol
symbol : class HttpServletRequest
location: class CustomQuery
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
^
CustomQuery.java:16: cannot find symbol
symbol : class HttpServletResponse
location: class CustomQuery
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
^
CustomQuery.java:16: cannot find symbol
symbol : class ServletException
location: class CustomQuery
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
^
CustomQuery.java:19: package response does not exist
PrintWriter printer = new response.getWriter();
^
CustomQuery.java:24: cannot find symbol
symbol : variable establishConnection
location: class EstablishDBConnetion
Statement stmt = EstablishDBConnetion.establishConnection.con.createStatement();
^
CustomQuery.java:39: cannot find symbol
symbol : variable establishConnection
location: class EstablishDBConnetion
EstablishDBConnetion.establishConnection.con.close();
^
10 errors
I appreciate your help
Message was edited by:
paulchwd
null
Message was edited by:
paulchwdThe library is in tomcat/common/lib, not in tomcat/lib.
-
Javax.servlet.http.* package does not exist ?
i am using j2sdk which does not include servlets, so in the forums i found that including servlet.jar file in jdk1.6.0\jre\lib\ext javax.servlet.* was included but javax.servlet.http did not ..... now this is strange either both do not work or both work. here is the code
import javax.servlet.*;
import javax.servlet.Http.*;
class login
error is package javax.servlet.Http.*; does not exist.Dear,
javax.servlet is one of the J2EE (Java Enterprise Edition) packages that is not included in the J2SE (Java Standard Edition) , so that one used for developing server side application.
I hope this help.
Regards. -
Package javax.servlet does not exist - settings appear to be correct
laugh as I write this post...it's hardly a "new topic."...but everything seems set just as it should be...
Okay...I'm a seasoned programmer in every language but JAVA. Here's the issue...every time I try to use the Core Servlets book/website by Marty Hall and Larry Brown I get hung up on the packages. This time, I downloaded and followed step by step what the website said to do...it was even preconfigured for me! Alas...I am getting the following compliation errors on a "simple packagless" program with NetBeans:
Compiling 1 source file to C:\Servlets+JSP\HelloServlet\build\classes
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:2: package javax.servlet does not exist
import javax.servlet.*;
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:13: cannot find symbol
symbol: class HttpServlet
public class HelloServlet extends HttpServlet {
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:14: cannot find symbol
symbol : class HttpServletRequest
location: class HelloServlet
public void doGet(HttpServletRequest request,
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:15: cannot find symbol
symbol : class HttpServletResponse
location: class HelloServlet
HttpServletResponse response)
C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:16: cannot find symbol
symbol : class ServletException
location: class HelloServlet
throws ServletException, IOException {
6 errors
BUILD FAILED (total time: 0 seconds)
These are my environment settings (note that the JAVAX package is located under the src folder in Java)
Catalina Home:
C:\apache-tomcat-6.0.10
CLASSPATH:
C:\apache-tomcat-6.0.10\lib\servlet-api.jar;
C:\apache-tomcat-6.0.10\lib\jsp-api.jar;
C:\apache-tomcat-6.0.10\lib\el-api.jar;
C:\Servlets+JSP;..;..\..;
C:\Program Files\Java\jdk1.6.0_03\src
JAVA_HOME
C:\Program Files\Java\jdk1.6.0_03
Path:
C:\Program Files\Java\jdk1.6.0_03\bin;%PATH%
Any ideas (excluding the one that maybe I should let my hair grow out, put on some tackey shorts and sandles and start palying an instrument in the streets of Austin for living?)cabkats wrote:
You are then suggesting that I make the corrections directly to the files in apache using notepad instead of using the envir. variables?No I am not suggesting that. I am suggesting that you need to read the documentation about the product(s) and set them up the way they require, rather than blindly think that the CLASSPATH environment variable is some magical entity.
I will try this, but I was hoping that since my IDE auto configured (with exception to java_home) that I would not have to do this. I wil give it try....thanks for the suggestion.See, you're using an IDE. Like I mentioned, IDEs do not use the CLASSPATH environment variable. You need to set up your project in your IDE in such a way that it knows what the dependent jars are. I'm sure there's a way to add jars to your project's dependencies. -
Problem: package javax.servlet.jsp does not exist
I am a novice JSP programmer. My projects that use any javax.servlet classes are not seeing those at all. I am working with a group of folks using Java SE 1.5. (Note: I'm using Windows so the directory separator is "\")
What Used to work:
1. Nearly all my projects were working using Java version 1.6. These projects were developed as examples from Wrox and Apress books about JSP and Struts.
What has changed:
1. I un-installed the version 1.6 of JDK and JRE, as well as tomcat, netbeans, and all the associated libraries/jars.
2. I installed version 1.5 of JDK and JRE, as well as tomcat, netbeans, and all the associated libraries/jars.
3. I updated my JAVA_HOME, CATALINA_HOME, CLASSPATH, and PATH environmental variables. I made sure that the path to servlet-api.jar (in the tomcat common\lib) is included in the classpath.
What is wrong:
1. References to javax.servlet.* are not satisfied--they are flagged in the source code in NetBeans and I get compiler errors with any project containing those references. For example:
... package javax.servlet.jsp does not exist
import javax.servlet.jsp.*;
What I've found:
1. My CATALINA_HOME=C:\Java\Tomcat 5.5
2. My JAVA_HOME=C:\Java\jdk1.5.0_11
3. My CLASSPATH=.;C:\Program Files\QuickTime\QTSystem\QTJava.zip;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib;%JAVA_HOME%\lib\jsp-api.jar;%CATALINA_HOME%\common\lib\servlet-api.jar;C:\Java\logging-log4j-1.2.14\dist\lib\log4j-1.2.14.jar
4. My PATH=c:\wint\BIN;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%CATALINA_HOME%\bin;C:\MySQL\MySQL Server 5.0\bin;D:\MiKTeX 2.5\miktex\bin;C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\SFU\Perl\bin\;C:\SFU\common\;C:\Program Files\Lahey-Fujitsu Fortran\v7.1\Bin;C:\Program Files\Lahey-Fujitsu Fortran\v7.1\Win32\Bin
What I need:
1. I need to have some reference to the servlet classes satisfied in my configuration. Any help is appreciated.
thanks
jondrOh. I got some over-the-shoulder debug help.
My error was in the classpath specification:
The path: %JAVA_HOME%\lib\jsp-api.jar
Should be: %CATALINA_HOME%\lib\jsp-api.jar
That contains the javax.servlet.jsp.*
Thimk.
Message was edited by: jon
jondr -
Error: package javax.servlet.http does not exist
Hi all,
How do I import javax.servlet?
package com.example.web;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class BeerSelect extends HttpServlet {
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("text/html");
PrintWriter out = response.getWrite();
out.println ("Beer Selection Advide<br>");
String c = request.getParameter("color");
out.println ("<br>Got beer color " + c);
}What does this error mean? The error message:
Compiling 1 source file to C:\Program Files\Apache Software Foundation\MyProjects\J2EE\build\classes
C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:3:
package javax.servlet does not exist
import javax.servlet.*;
C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:4:
package javax.servlet.http does not exist
import javax.servlet.http.*;
C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:7:
cannot find symbol
symbol: class HttpServlet
public class BeerSelect extends HttpServlet {
C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:8:
cannot find symbol
symbol : class HttpServletRequest
location: class com.example.web.BeerSelect
public void doPost(HttpServletRequest request,
C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:9:
cannot find symbol
symbol : class HttpServletResponse
location: class com.example.web.BeerSelect
HttpServletResponse response)
C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:10:
cannot find symbol
symbol : class ServletException
location: class com.example.web.BeerSelect
throws IOException, ServletException {
6 errors
BUILD FAILED (total time: 0 seconds)Thank you.Hi,
The file servlet-api.jar / servlet.jar is not available in your classpath.
To compile an Servlet you need the jar file to be in classpath.
The jar file can be found in your webserver / application server lib folder.
Regards,
Zack -
ATMTag.java:5: package javax.servlet does not exist
My j2ee jdk1.4.2 is not supporting javx package.
i already set all pathh and class path.
anybody can help me.
details are given below ::
C:\AVA\J2EE Programs\JSP\JSPCustomTag>javac ATMTag.java
ATMTag.java:5: package javax.servlet does not exist
import javax.servlet.*;
^<br>
ATMTag.java:6: package javax.servlet.http does not exist
<br>
import javax.servlet.http.*;
<br>
ATMTag.java:18: cannot resolve symbol
symbol : class TagSupport
location: class ATMTag
public class ATMTag extends TagSupport{
<br> ^
ATMTag.java:29: cannot resolve symbol
symbol : class JspTagException
location: class ATMTag
public int doStartTag() throws JspTagException{
<br> ^
ATMTag.java:31: cannot resolve symbol
symbol : class JspWriter
location: class ATMTag
<br> JspWriter out =pageContext.getOut();
^
ATMTag.java:31: cannot resolve symbol
symbol : variable pageContext
location: class ATMTag
<br> JspWriter out =pageContext.getOut();
^
ATMTag.java:56: cannot resolve symbol
symbol : variable pageContext
location: class ATMTag
pageContext.getOut().write(str);
<br> ^
ATMTag.java:60: cannot resolve symbol
symbol : variable EVAL_PAGE
location: class ATMTag
return EVAL_PAGE;
^
8 errorsWhen compiling servlets etc, you need to include in your classpath a jar file with all the javax.* classes defined in it.
For Tomcat this is called servlet.jar and is in (I think) [TOMCAT_HOME]/shared/lib or /common/lib
For J2EE 1.4 Server, the jar is [J2EE_HOME]/lib/j2ee.jar
Where the _HOME directory is the directory where you installed J2EE.
Include this jar file in your classpath when compiling.
Good luck,
evnafets -
Package javax.servlet.jsp does not exist.
dear all!
I've one program which import javax.servlet.jsp.* as one of the package to be used in
the program, and I am using j2sdk 1.4.0_01 to compiled it.
However I got this error message : package javax.servlet.jsp does not exist.
Where does it wrong?.
error message like :
logisticslib.java:6: package javax.servlet.jsp does not exist
import javax.servlet.jsp.*;
^
logisticslib.java:201: cannot resolve symbol
symbol : class JspWriter
location: class elogistic.db.logisticslib
public void getServiceInfo(JspWriter out, String SQL) {You need a J2EE implementation, I recomemend Tomcat, you also need to put the .jar w/ the implementation in in your classpath.
-
Package javax.servlet doest not exist
Hi,
I just started to learn servlets. But when I am trying to compile my first program, which is HelloServlet , I am getting compilation error saying that Package javax.servlet does not exist, package javax.servlet.http does not exist.
I am using j2sdk version 1.4.2_04 and Tomcat 5 .
I set the classpath and it looks like this
set CLASSPATH=.; C:\ServletPrograms;C:\Tomact\common\lib\servlet-api.jar;C:\Tomcat \common\lib\jsp-api.jar
I stored my servlet program in C:\ServletPrograms directory.
Can any body please help with this?????I just started to learn servlets. But when I am trying to compile my first program, which is HelloServlet , I am getting compilation error saying that Package javax.servlet does not exist, package javax.servlet.http does not exist.The OP is attempting to compile.
I set the classpath and it looks like this
set CLASSPATH=.; C:\ServletPrograms;C:\Tomact\common\lib\servlet-api.jar;C:\Tomcat \common\lib\jsp-api.jarThe OP is also attempting to set the classpath but notice that here the path to the servlet-api.jar has Tomcat mis-spelled. Is this the actual classpath or a typo when posting the question? -
Package javax.mail does not exist (Still having trouble)
Good Morning
I know that there are several posts regarding issues with javamail. I have viewed them for the past hour. While several of them address my issue I have been unable to locate a solution.
Bare with me please, I am making this post very thorough. The other threads I have read are frusterating because the problems people tend to post are not clear.
I am trying to run "msgsend" which is a provided demo of javamail-1.4 using command prompt (start - run - cmd) with the javac command.
The output below is directly pasted from command prompt and written in bold.
C:\download\javamail-1.4\demo>javac msgsend.java
C:\download\javamail-1.4\demo>javac msgsend.java
msgsend.java:44: package javax.mail does not exist
import javax.mail.*;
^
msgsend.java:45: package javax.mail.internet does not exist
import javax.mail.internet.*;
^
msgsend.java:140: cannot find symbol
symbol : class Session
location: class msgsend
Session session = Session.getInstance(props, null);
^
msgsend.java:140: cannot find symbol
symbol : variable Session
location: class msgsend
Session session = Session.getInstance(props, null);
^
msgsend.java:145: cannot find symbol
symbol : class Message
location: class msgsend
Message msg = new MimeMessage(session);
^
msgsend.java:145: cannot find symbol
symbol : class MimeMessage
location: class msgsend
Message msg = new MimeMessage(session);
^
msgsend.java:147: cannot find symbol
symbol : class InternetAddress
location: class msgsend
msg.setFrom(new InternetAddress(from));
^
msgsend.java:151: package Message does not exist
msg.setRecipients(Message.RecipientType.TO,
^
msgsend.java:152: cannot find symbol
symbol : variable InternetAddress
location: class msgsend
InternetAddress.parse(to,
^
msgsend.java:154: package Message does not exist
msg.setRecipients(Message.RecipientType.CC,
^
msgsend.java:155: cannot find symbol
symbol : variable InternetAddress
location: class msgsend
InternetAddress.parse(cc,
^
msgsend.java:157: package Message does not exist
msg.setRecipients(Message.RecipientType.BCC,
^
msgsend.java:158: cannot find symbol
symbol : variable InternetAddress
location: class msgsend
InternetAddress.parse(bcc,
^
msgsend.java:167: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp1 = new MimeBodyPart();
^
msgsend.java:167: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp1 = new MimeBodyPart();
^
msgsend.java:169: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp2 = new MimeBodyPart();
^
msgsend.java:169: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp2 = new MimeBodyPart();
^
msgsend.java:171: cannot find symbol
symbol : class MimeMultipart
location: class msgsend
MimeMultipart mp = new MimeMultipart();
^
msgsend.java:171: cannot find symbol
symbol : class MimeMultipart
location: class msgsend
MimeMultipart mp = new MimeMultipart();
^
msgsend.java:185: cannot find symbol
symbol : variable Transport
location: class msgsend
Transport.send(msg);
^
msgsend.java:193: cannot find symbol
symbol : class Store
location: class msgsend
Store store = null;
^
msgsend.java:195: cannot find symbol
symbol : class URLName
location: class msgsend
URLName urln = new URLName(url);
^
msgsend.java:195: cannot find symbol
symbol : class URLName
location: class msgsend
URLName urln = new URLName(url);
^
msgsend.java:212: cannot find symbol
symbol : class Folder
location: class msgsend
Folder folder = store.getFolder(record);
^
msgsend.java:218: cannot find symbol
symbol : variable Folder
location: class msgsend
folder.create(Folder.HOLDS_MESSAGES);
^
msgsend.java:220: cannot find symbol
symbol : class Message
location: class msgsend
Message[] msgs = new Message[1];
^
msgsend.java:220: cannot find symbol
symbol : class Message
location: class msgsend
Message[] msgs = new Message[1];
27 errors
Here are the methods I have tried...
1. Make sure you have most current version of Java
2. Reinstall Java
3. Attempt to compile in an IDE (Attempted in Eclipse 3.2)
4. Set class path
Some sources suggest "CLASSPATH" some suggest "CLASS PATH" as the variable name. I have tried both.
Below is what the classpath looks like in bold.
Variable Name: CLASS PATH
Variable value: c:\download\javamail-1.4\mail.jar;C:\download\jaf-1.1\activation.jar;.
I have double checked all folder names and copy pasted all entries to eliminate typos. Javamail-1.4 and jaf-1.1 are both located in c:\download which is the same location Class Path points to.
Thank you very much for your input and effort. I can imagine how frusterating it is responding to 20million javamail posts :) (that may be a bit of an overstatement!)
Thank you again!
Irbi
Message was edited by:
irbi
Message was edited by:
irbiYes - I have read that part of the README and did exactly as it has said in a previous attempt. I should have mentioned that here I'm sorry :)
I moved the .jar files into the download folder and set the classpath exactly as the readme shows.
When I do that the msgsend.java compiles correctly but it still does not run.
Below is what happens.
C:\download\javamail-1.4\demo>set CLASSPATH=%CLASSPATH%;c:\download\javamail-1.4
\mail.jar;%CLASSPATH%;c:\download\jaf-1.1\activation.jar.
C:\download\javamail-1.4\demo>javac msgsend.java
C:\download\javamail-1.4\demo>java msgsend.java
Exception in thread "main" java.lang.NoClassDefFoundError: msgsend/java
C:\download\javamail-1.4\demo>
I have tried fixing this error as well via forums and FAQs but it seems to be the most generic error.
One suggestion was to clear your classpath. I tried this with a test hello world program which was giving the same error - "NoClassDefFoundError". By clearing the classpath I was able to get the hello world program to run without this error. But I can't just clear the classpath in this instance because it needs to point to mail.jar and activation.jar for the program to compile.
Thanks again for all of your efforts. You are more appreciated than you know.
Maybe you are looking for
-
ODI Variables in Mutliple Sessions
Hi All, I would like to know if I set a variable as "Latest Value" and I have multiple users running multiple packages setting the same variable with different values, Can ODI handle it properly? Will those packages running in sequence by submitting
-
How to validate: only characters
Hi I need to validate a textfield that can only contain characters (doesn't mather what case and how many). How do I do that? Thanks
-
Allow Tool Recording Action Problem with Pen Tool -PS6 beta
Hi, I'm trying to create an action that will erase a shape layer box that I am using for a registration point. I have "allow tool recording" on I select the shape layer in the layer palette Use the direct selection tool to marquee the box on the sh
-
Failed to retrieve data from database?
I am a new user When I try to Preview a document I am prompted to enter in database information. I have tried a few times to connect to my server and continuously keep getting the same error page No matter what I enter in the two fields, this is what
-
I can't seem to download my TV shows, so I can watch them on an airplane. Movies work fine. I have all the shows checked for download onto my ipad.