Can some one explain me oracle MVC configuration or point me to a guide
I use oracle MVC in my application. cle20.jar is used for it. The application was working fine and now all of sudden I get a null pointer exception in my code where i use this line of code: "ProcessInfo info = (ProcessInfo)getInfo(aKey);" where getInfo is from the oracle.cle.process.GenericProcess and aKey is not null.
Any help or direction will help. I debugged the application and see that getInfo is always returning null value for all values of aKey.
Error Message is as follow:
ERROR [STDERR] java.lang.NullPointerException
15:23:32,752 ERROR [STDERR] at myapp.application.process.GetData.persist(GetData.java:302)
15:23:32,752 ERROR [STDERR] at oracle.cle.process.PersistingProcess.start(PersistingProcess.java:83)
15:23:32,752 ERROR [STDERR] at oracle.cle.process.CLEStateMachine.start(CLEStateMachine.java:61)
15:23:32,752 ERROR [STDERR] at oracle.cle.process.Process.start(Process.java:108)
15:23:32,752 ERROR [STDERR] at oracle.cle.process.GenericProcess.start(GenericProcess.java:84)
15:23:32,752 ERROR [STDERR] at oracle.cle.process.ParentProcess.start(ParentProcess.java:226)
15:23:32,752 ERROR [STDERR] at oracle.cle.process.DisplayGroup.start(DisplayGroup.java:75)
15:23:32,752 ERROR [STDERR] at oracle.cle.process.CLEStateMachine.start(CLEStateMachine.java:61)
15:23:32,752 ERROR [STDERR] at oracle.cle.process.Service.start(Service.java:389)
15:23:32,752 ERROR [STDERR] at oracle.clex.process.controller.HttpServletController.doPost(HttpServletController.java:422)
15:23:32,752 ERROR [STDERR] at oracle.clex.process.controller.HttpServletController.doGet(HttpServletController.java:836)
15:23:32,752 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
15:23:32,752 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:23:32,752 ERROR [STDERR] at myapp.application.servlets.SessionFilter.doFilter(SessionFilter.java:42)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:23:32,752 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
15:23:32,752 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
15:23:32,752 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
15:23:32,752 ERROR [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
15:23:32,752 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
15:23:32,752 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
15:23:32,752 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
15:23:32,752 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
15:23:32,752 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
15:23:32,752 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
Thanks in advance....
Edited by: user1694903 on Feb 10, 2009 12:46 PM
Edited by: user1694903 on Feb 10, 2009 12:48 PM
KB 60446, How to clean an LCD Panel
Similar Messages
-
Can some one explain me on Exchange server / CAL licesing & where I can find current cost information?
Hi,
As far as I know, every user need a license to use Exchange server and we can choose User CAL or Device CAL.
For more information about license, you can refer to the following articles:
Licensing Basics: What are CALs (Client Access Licenses):
http://blogs.msdn.com/b/mssmallbiz/archive/2007/11/06/5942350.aspx
Exchange Server 2013 licensing:
http://office.microsoft.com/en-001/exchange/microsoft-exchange-server-licensing-licensing-overview-FX103746915.aspx
Exchange Licensing FAQ:
http://office.microsoft.com/en-001/exchange/microsoft-exchange-licensing-faq-email-for-business-FX103934581.aspx
For the cost issue, I recommend you call Microsoft Licensing for useful information. And they will be able to give you an estimate based on your requirement.
http://www.microsoft.com/licensing/
If you have any question, please feel free to let me know.
Best regards,
Angela Shi
TechNet Community Support -
How come extend is the physical structure ? Can some one explain.
How come extend is the physical structure ? Can some one explain.
thanks
siva"Tablespaces physically group schema objects for administration convenience. They bridge physical structures, such as datafiles or extents, and logical structures, such as tables and indexes. Tablespaces can store zero or more segments. Segments are schema objects that require storage outside the data dictionary. Tables and indexes are examples of segments. Constraints and sequences are examples of schema objects that do not store data outside the data dictionary and are therefore not segments." - Study Guide.
Read above, it reads "physical structures, such as datafiles or extents", this is where I got confused ?
thanks
siva -
HI frnds..
I jst started BW/Bi training..can someone explain me basics in BW.. like
what are dimesion id's n surrogate id's??
what is extended schema???
what is master data??
how master data is stored??
what is datasource,infosource,infopackage,application component,transfer rules,update rules....have much confusion..
please can some one clear it...First of all this is not the correct forum for your questions. This forum handles questions regarding the BusinessObjects on Demand offering.
Secondly it is not realistic to expect an answer to ALL those questions in a forum. I would suggest either to buy book about SAP Netweaver/BW (Beginner's level) or search for the keywords you are refering to either in SDN or in the Internet. There are some SAP BW tutorilas available out there.
eg.
Step By Step BW Exercise
http://searchsap.techtarget.com/tutorial/SAP-NetWeaver-BI-training-tutorial
Regards,
Stratos -
Can some one explain each line of this abap code
Hi..
I got this code from a document, where they try to add account group (LFA1-KTOKK) to 0VENDOR_ATTR. I have no idea of ABAP syntax. Can some one tell me the meaning of each line of code.
Tables: LFA1. "vendor master data table
data: l_tabix like sy-tabix.
case i_CHABASNM.
*Enhancement of Vendor Master Record
WHEN '0VENDOR'.
case i_datasource.
WHEN '0VENDOR_ATTR'.
data: l_s_BIW_LFA1_S like BIW_LFA1_S.
loop at i_t_data into l_s_BIW_LFA1_S.
l_tabix = sy-tabix.
select single * from lfa1 where LIFNR = l_s_BIW_LFA1_S-LIFNR.
if sy-subrc = 0.
l_s_BIW_lfa1_s-ZZacctgrp = lfa1-ktokk.
modify i_t_data from l_s_BIW_lfa1_s index l_tabix.
endif.
endloop.
endcase.
endcase.
Thanks in advance.Hi
Tables: LFA1. "vendor master data table
<b>"here by saying Tables they have delcared the LFA1 table for further use in the program"</b>data: l_tabix like sy-tabix.
<b>"here they have defined own table index by copying the structure of system index"</b>case i_CHABASNM.
<b>"when character"</b>
*Enhancement of Vendor Master Record
WHEN '0VENDOR'.
<b>"here it says that its 0vendor"</b>case i_datasource.
<b>"when this datasource"</b>
WHEN '0VENDOR_ATTR'.
<b>"when datasource 0vendor_attr"</b>
data: l_s_BIW_LFA1_S like BIW_LFA1_S.
<b>"here we are declaring an internal table like BW internal table"</b>loop at i_t_data into l_s_BIW_LFA1_S.
<b>"here looping at i_t_data table data into l_s_BIW_LFA1_S".</b>l_tabix = sy-tabix.
<b>"here we are saying that our defined table index is equal to system index"</b>select single * from lfa1 where LIFNR = l_s_BIW_LFA1_S-LIFNR.
<b>"selecting single rows from table lfa1 where lifnr is equal to l_s_biw_lfa1 field s-lifnr"</b>
if sy-subrc = 0.
<b>"if system field returns 0 that means the above line has been executed"</b>
l_s_BIW_lfa1_s-ZZacctgrp = lfa1-ktokk.
"internal table field is equal to lfa1 field."
modify i_t_data from l_s_BIW_lfa1_s index l_tabix.
<b>"changing the internal table data as per i_t_data"</b>endif.
endloop.
endcase.
endcase.
THIS IS MY UNDERSTANDING PLEASE KINDLY CORRECT ME IF I AM WRONG.
thanks
harish -
Deadlock - can some one explain pls?
public class Lazy {
private static boolean initialized = false;
static {
Thread t = new Thread(new Runnable() {
public void run() {
initialized = true; // Deadlocks here
t.start();
try {
t.join();
} catch(InterruptedException e) {
throw new AssertionError(e);
public static void main(String[] args) {
System.out.println(initialized);
}The above given program deadlocks at the point specified in comment. Can someone explain the reason for this? Thanks in advanceSounds reasonable. But I do also expect some voodoo
magic to be involved since the posted code isn't
synchronized.If I understand the few lines of the VM Spec correctly, the above would lead to:
public class Lazy {
private static boolean initialized = false;
static {
Thread t = new Thread(new Runnable() {
public void run() {
// <VM>
if( !Lazy.class.ready() ) {
synchronize( Lazy.class ) {
// Do Lazy init
// </VM>
initialized = true; // Deadlocks here
t.start();
try {
t.join();
} catch(InterruptedException e) {
throw new AssertionError(e);
public static void main(String[] args) {
// <VM>
if( !Lazy.class.ready() ) {
synchronize( Lazy.class ) {
Do Lazy init
// </VM>
System.out.println(initialized);
VM Spec (squiggly thing)2.17.5 Detailed Initialization Procedure
Message was edited by:
mlk -
Hi all,
I was facing problem from last week.Suddenly i was getting ora-12505 error while connecting to the database through toad.I tried to change tnsnames.ora & listener.ora in multiple ways,but no luck...Inspite i was getting different errors like ora - 01034: ORACLE not available / ora - 27101: shared memory realm does not exist...When i try to connect using sys / sys as sysdba,connection is establishing and when issue the command startup it was throwing the error ORA-01821: date format not recognized......Fed up solving these issues....Can some one help me out...It's very very urgent..
Thanks in advance,
pavankumar.Well, the obviously solution is to use separate Apple ID's for iCloud.
-
Can some one please tell me what is the problem in the below pl/sql block
Hi, I have problem with the following pl/sql block, I need this with bulk operation.
-- Assume the following scenario, we are validating dept (master) and emp(child) which are my temporary tables and updating the status back to
-- dept ( for all the validation errors, even if we have any validation at child it has to update the header record with error message),
-- upon successful validation insert the data into dept3, and emp3 interms of batches
-- I have give the sample example with dept and emp, but i have around 10 million records which has around 30-40 validations,
-- I would like to process them in terms of batches using bulk collection as this would do fast processing
-- Can some one please tell me how to insert them in terms of bulk with every set of 1000 records in each batch in this example,for every set of 1000 records
-- i need update batch id with unique number in dept table
-- with current data i can have 50 batches , I need to pass, deptno as parameter to my emp cursor.
-- can some one please tell me how to make this validation and insertion more efficient. so that while inserting the data for every batch it should insert batch id
-- Tried with LIMIT clause as well but not working
-- I am correcting the code as per your comments Request you to please suggest me so that I can correct , I am new to PL/sql, started learning now.
step - 1:
CREATE TABLE DEPT
(DEPTNO NUMBER(6) primary key,
DNAME VARCHAR2(25),
LOC VARCHAR2(23),
batch_id number );
INSERT INTO DEPT VALUES (10, 'ACCOUNTING', 'NEW YORK', null);
INSERT INTO DEPT VALUES (20, 'RESEARCH', 'DALLAS', null);
INSERT INTO DEPT VALUES (30, 'SALES', 'CHICAGO', null);
INSERT INTO DEPT VALUES (40, 'OPERATIONS', 'BOSTON', null);
step - 2:
declare
begin
for i in 1..50000 loop
insert into dept values(40+i, 'OPERATIONS'||i,'BOSTON'||i, null);
end loop;
commit;
exception
when others then
dbms_output.put_line('Exception occured:'||SQLERRM);
end;
step - 3:
create sequence emp_seq start with 1 increment by 1;
step - 4:
CREATE TABLE EMP
(EMPNO NUMBER(15) NOT NULL primary key,
ENAME VARCHAR2(20),
JOB VARCHAR2(20),
MGR NUMBER(4),
HIREDATE DATE,
SAL NUMBER(7, 2),
COMM NUMBER(7, 2),
DEPTNO NUMBER(6));
INSERT INTO EMP VALUES
(7369, 'SMITH', 'CLERK', 7902,
TO_DATE('17-DEC-1980', 'DD-MON-YYYY'), 800, NULL, 20);
INSERT INTO EMP VALUES
(7499, 'ALLEN', 'SALESMAN', 7698,
TO_DATE('20-FEB-1981', 'DD-MON-YYYY'), 1600, 300, 30);
INSERT INTO EMP VALUES
(7521, 'WARD', 'SALESMAN', 7698,
TO_DATE('22-FEB-1981', 'DD-MON-YYYY'), 1250, 500, 30);
INSERT INTO EMP VALUES
(7566, 'JONES', 'MANAGER', 7839,
TO_DATE('2-APR-1981', 'DD-MON-YYYY'), 2975, NULL, 20);
INSERT INTO EMP VALUES
(7654, 'MARTIN', 'SALESMAN', 7698,
TO_DATE('28-SEP-1981', 'DD-MON-YYYY'), 1250, 1400, 30);
INSERT INTO EMP VALUES
(7698, 'BLAKE', 'MANAGER', 7839,
TO_DATE('1-MAY-1981', 'DD-MON-YYYY'), 2850, NULL, 30);
INSERT INTO EMP VALUES
(7782, 'CLARK', 'MANAGER', 7839,
TO_DATE('9-JUN-1981', 'DD-MON-YYYY'), 2450, NULL, 10);
INSERT INTO EMP VALUES
(7788, 'SCOTT', 'ANALYST', 7566,
TO_DATE('09-DEC-1982', 'DD-MON-YYYY'), 3000, NULL, 20);
INSERT INTO EMP VALUES
(7839, 'KING', 'PRESIDENT', NULL,
TO_DATE('17-NOV-1981', 'DD-MON-YYYY'), 5000, NULL, 10);
INSERT INTO EMP VALUES
(7844, 'TURNER', 'SALESMAN', 7698,
TO_DATE('8-SEP-1981', 'DD-MON-YYYY'), 1500, NULL, 30);
INSERT INTO EMP VALUES
(7876, 'ADAMS', 'CLERK', 7788,
TO_DATE('12-JAN-1983', 'DD-MON-YYYY'), 1100, NULL, 20);
INSERT INTO EMP VALUES
(7900, 'JAMES', 'CLERK', 7698,
TO_DATE('3-DEC-1981', 'DD-MON-YYYY'), 950, NULL, 30);
INSERT INTO EMP VALUES
(7902, 'FORD', 'ANALYST', 7566,
TO_DATE('3-DEC-1981', 'DD-MON-YYYY'), 3000, NULL, 20);
INSERT INTO EMP VALUES
(7934, 'MILLER', 'CLERK', 7782,
TO_DATE('23-JAN-1982', 'DD-MON-YYYY'), 1300, NULL, 10);
commit;
step :- 5
declare
cursor c1 is select * from dept;
k number:=0;
m number:=0;
begin
for i in c1 loop
k:=k+1;
--dbms_output.put_line('k:'||k);
--dbms_output.put_line('i.deptno:'||i.deptno);
m:=0;
for j in 1..5 loop
m:=m+1;
--dbms_output.put_line('m:'||m);
--dbms_output.put_line('i.deptno:'||i.deptno);
insert into emp values
(9000+emp_seq.nextval, 'SMITH'||'_'||emp_seq.currval, 'CLERK'||'_'||emp_seq.currval, 7902,
TO_DATE('17-DEC-1980', 'DD-MON-YYYY'), 800, NULL, i.deptno);
end loop;
end loop;
commit;
exception
when others then
dbms_output.put_line('Exception occured:'||sqlerrm);
end;
step :-6
create table dept3 as select * from dept where 1=2;
create table emp3 as select * from emp where 1=2;
alter table dept add object_id number;
alter table dept add status varchar(20);
alter table dept add err_msg varchar2(200);
alter table emp add object_id number;
-- I have not included the alter statements in the inital creation because i dont want them to insert into dept3 and emp3
CREATE OR REPLACE
PACKAGE test_b
AS
g_batch_id NUMBER;
PROCEDURE emp_ins(
p_EMPNO NUMBER,
p_ENAME VARCHAR2,
p_JOB VARCHAR2,
p_MGR NUMBER,
p_HIREDATE DATE,
p_SAL NUMBER,
p_COMM NUMBER,
p_DEPTNO NUMBER);
PROCEDURE dept_ins(
p_DEPTNO NUMBER,
p_dname VARCHAR2 ,
p_LOC VARCHAR2,
p_batch NUMBER);
PROCEDURE validate_prc;
PROCEDURE main;
TYPE dept_t
IS
TABLE OF dept%ROWTYPE;
hdr_tbl dept_t;
TYPE emp_t
IS
TABLE OF emp%ROWTYPE;
line_tbl emp_t;
TYPE dept_i_t
IS
TABLE OF dept3%ROWTYPE;
hdr_ins_tbl dept_i_t;
TYPE emp_i_t
IS
TABLE OF emp3%ROWTYPE;
line_ins_tbl emp_i_t;
END;
-- pacakge body
CREATE OR REPLACE
PACKAGE body test_b
AS
PROCEDURE emp_ins(
p_EMPNO NUMBER,
p_ENAME VARCHAR2,
p_JOB VARCHAR2,
p_MGR NUMBER,
p_HIREDATE DATE,
p_SAL NUMBER,
p_COMM NUMBER,
p_DEPTNO NUMBER)
IS
BEGIN
INSERT
INTO EMP3
EMPNO ,
ENAME ,
JOB ,
MGR ,
HIREDATE ,
SAL ,
COMM ,
DEPTNO
VALUES
P_EMPNO ,
P_ENAME ,
P_JOB ,
P_MGR ,
P_HIREDATE ,
P_SAL ,
P_COMM ,
P_DEPTNO
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('EXCEPTION AT EMP INSERT'||SQLERRM);
END;
PROCEDURE dept_ins
p_DEPTNO NUMBER,
p_dname VARCHAR2 ,
p_LOC VARCHAR2,
p_batch NUMBER
IS
BEGIN
INSERT
INTO DEPT3
DEPTNO ,
DNAME ,
LOC ,
batch_id
VALUES
p_DEPTNO ,
p_DNAME ,
p_LOC ,
p_batch
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('EXCEPTION AT DEPT INSERT'||SQLERRM);
END ;
PROCEDURE validate_prc
IS
CURSOR c1
IS
SELECT * FROM dept WHERE status IS NULL ;--AND rownum <25;
CURSOR c2(p_dept NUMBER )
IS
SELECT * FROM emp WHERE deptno=p_dept;
e_validation EXCEPTION;
BEGIN
OPEN c1;
LOOP
FETCH c1 BULK COLLECT INTO hdr_tbl limit 5000;
SELECT emp_seq.nextval INTO g_batch_id FROM dual;
EXIT
WHEN hdr_tbl.count = 0;
dbms_output.put_line('batch'||g_batch_id);
END LOOP;
CLOSE c1;
dbms_output.put_line('C1 closed');
--------- Loading data into the inv line table type -------------------------------
FOR i IN 1 .. hdr_tbl.count
LOOP
dbms_output.put_line('started validation');
-- do header level validations
IF hdr_tbl(i).dname IS NULL THEN
hdr_tbl(i).status := 'ERROR';
hdr_tbl(i).err_msg :=',DNAME is null';
END IF;
OPEN c2(hdr_tbl(i).deptno);
LOOP
FETCH c2 BULK COLLECT INTO line_tbl;
-- EXIT WHEN c2%NOTFOUND;
END LOOP;
CLOSE c2;
FOR j IN 1 .. line_tbl.count
LOOP
-- do line validations
IF line_tbl(j).ename IS NULL THEN
hdr_tbl(i).status := 'ERROR';
hdr_tbl(i).err_msg :=',ENAME is null';
END IF;
BEGIN
FORALL j IN line_tbl.FIRST .. line_tbl.LAST
SAVE EXCEPTIONS
UPDATE EMP
SET object_id =3
-- I have multiple columns to update based on validations
WHERE deptno =hdr_tbl(i).deptno------------
AND empno =line_tbl (j).empno;
COMMIT;
line_tbl.DELETE;
dbms_output.put_line( 'Successfully updated emp temp table.');
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
dbms_output.put_line( 'Error while updating line temp table. ' || sqlerrm );
FOR j IN 1 .. sql%BULK_EXCEPTIONS.COUNT
LOOP
DBMS_OUTPUT.put_line(' occurred during line temp table updation ' || sql%BULK_EXCEPTIONS(i).ERROR_INDEX );
END LOOP;
raise e_validation;
END;
END LOOP; -- j
--CLOSE c2;
IF hdr_tbl(i).err_msg IS NULL THEN
hdr_tbl (i).status := 'VALID';
hdr_tbl (i).err_msg := NULL;
END IF;
-- even if I have line validation failed I have to update header status and erorr msg
BEGIN
FORALL i IN hdr_tbl.FIRST .. hdr_tbl.LAST
SAVE EXCEPTIONS
UPDATE DEPT
SET object_id =4,
status = hdr_tbl (i).status,
err_msg = hdr_tbl (i).err_msg
-- batch_id =
-- I have multiple columns to update based on validations
WHERE deptno = hdr_tbl (i).deptno
AND status IS NULL; ------------
COMMIT;
hdr_tbl.DELETE;
dbms_output.put_line( 'Successfully updated dept temp table.');
--close c1;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
dbms_output.put_line( 'Error while updating hdr temp table. ' || sqlerrm );
FOR i IN 1 .. sql%BULK_EXCEPTIONS.COUNT
LOOP
DBMS_OUTPUT.put_line(' occurred during line temp table updation ' || sql%BULK_EXCEPTIONS(i).ERROR_INDEX );
END LOOP;
raise e_validation;
END;
END LOOP; --i
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('EXCEPTION AT validate'||SQLERRM);
END ;
PROCEDURE main
IS
CURSOR dept_ins_cur
IS
SELECT * FROM dept WHERE status='VALID';
CURSOR emp_ins_cur(p_deptno NUMBER)
IS
SELECT * FROM emp WHERE deptno= p_deptno;
BEGIN
validate_prc;
OPEN dept_ins_cur;
LOOP
FETCH dept_ins_cur BULK COLLECT INTO hdr_ins_tbl limit 1000
EXIT
WHEN dept_ins_cur%NOTFOUND;
END LOOP;
CLOSE dept_ins_cur;
--------- Loading data into the inv line table type -------------------------------
FOR i IN 1 .. hdr_tbl.count
loop
dept_ins(hdr_ins_tbl(i).deptno ,
hdr_ins_tbl(i).DNAME ,
hdr_ins_tbl(i).LOC , emp_seq.nextval);
commit;
OPEN emp_ins_cur(hdr_ins_tbl(i).deptno);
LOOP
FETCH emp_ins_cur BULK COLLECT INTO line_ins_tbl;
--EXIT WHEN emp_ins_cur%NOTFOUND;
END LOOP;
CLOSE emp_ins_cur;
for j in 1..line_ins_tbl.count loop
emp_ins(line_ins_tbl(j).EMPNO ,
line_ins_tbl(j).ENAME ,
line_ins_tbl(j).JOB ,
line_ins_tbl(j).MGR ,
line_ins_tbl(j).HIREDATE ,
line_ins_tbl(j).SAL ,
line_ins_tbl(j).comm ,
line_ins_tbl(j).DEPTNO );
end loop;
end loop;
commit;
BEGIN
forall i IN hdr_ins_tbl.first .. hdr_ins_tbl.last
SAVE exceptions
UPDATE dept
SET status = 'INSERTED',
err_msg = null
WHERE deptno=hdr_ins_tbl (i).deptno
AND status = 'VALID';
COMMIT;
hdr_ins_tbl.delete;
dbms_output.put_line( 'inserting into temp tables.');
EXCEPTION
WHEN OTHERS THEN
rollback;
end;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('exception in main' ||SQLERRM);
END ;
END;
Thanks in advance...
Message was edited by: 888025Hi, I have problem with the following pl/sql block
Well, as Hoek already said, that is the understatement of the century.
I can't be absolutely certain but I think that set of DDL and code that you posted has just about every possible error and design issue that there is! It would make an excellent addition to BluShadow's FAQs an an example of what NOT to do.
I don't think it is even possible to 'fix the basics first' as Hoek suggested. IMHO the first step needs to be to create a functional requirements document (FRD) that explains in detail WHAT needs to be done. That doc should also contain info about how any errors/recovery/restart is to be handled. It is premature to try to implement ANY solution without first knowing what is needed functionally.
Once the FRD is done you should do a walk-through based on your current architecture and sample data to make sure that the document really covers ALL of the steps that need to be performed and that it adequately explains how to deal with any processing or data issues that might arise.
The next document you need is the TRD - Technical Requirements Doc that covers the different technical implementions of the FRD that can be done and the advantages/disadvantages of each.
Then you can start working on a prototype.
1. The DDL you posted isn't coherent - there are CREATE table statements and then later ALTER statements that add additional columns. There doesn't appear to be any reason for not including ALL of the columns in the CREATE table statement.
2. You are using PL/SQL types instead of SQL types. That makes it impossible to use those types in SQL statements and makes it much more difficult to test since it is much easier to test a query in SQL (e.g. using sql*plus) that to embed the query in PL/SQL.
3. You are defining the same type twice but giving it different names.
TYPE dept_t
IS
TABLE OF dept%ROWTYPE
INDEX BY binary_integer;
TYPE dept_i_t
IS
TABLE OF dept%ROWTYPE
INDEX BY binary_integer;
Those are both based on the same DEPT table! Why the duplication?
Also you are using associative arrays instead of just using nested tables. Get rid of the INDEX BY clause.
4. You have some serious architectural and data model issues
-- Assume the following scenario, we are validating dept (master) and emp(child) which are my temporary tables and updating the status back to
-- dept ( for all the validation errors, even if we have any validation at child it has to update the header record with error message),
Why would you do that? You say 'it has to update the header record ...'. Says who? That is just one indication that you are trying to implement a 'solution' before you have adequately defined the 'problem'.
Typically you would NOT alter any of the data tables; any validation errors/issues would get inserted into a table specifically designed to hold/log those issues. That table would contain key field values to correlate with the source of the error.
Those 'master' and 'child' entities are two SEPARATE things. Issues with a 'master' row have NOTHING to do with any possible child rows.
And issues with a 'child' row have NOTHING to do with any possible master rows. The ONLY connection between 'child' and 'master' is the foreign key that correlates them.
So you don't necessarily have to validate the 'child' rows in sync with their 'master' row. In many cases you would have a procedure that performs validation of the entire set of 'master' rows and log those issues/problems. You would use a different procedure to validate the entire set of 'child' rows and log their issues.
Those validation procedures can often work with ALL of the data using SQL statements instead of bulk processing.
5. You are using loop constructs that are not valid for the type of processing you are using
LOOP
FETCH c1 BULK COLLECT INTO hdr_tbl;
EXIT
WHEN c1%NOTFOUND;
END LOOP;
There can be NO exit since the bulk collect with either get EVERYTHING or NOTHING. Possibly that is just a holdover from your attempt to use the LIMIT clause but you removed that clause from the FETCH; I don't know.
There is so much wrong with what you posted it is really rather pointless to try to 'fix' it.
I suggest you start over and clarify and DOCUMENT the actual requirements without prejudice about the solution that someone seems to want to force on you. -
i am using iphone5 and when sending sms within 160 characters i am getting 2 sms counts deduction & i hear the message send sound twice. what is wrong here. can some one please help me here???
APPLE need to do something here!!!!!!1Hi...
Thanks for your repaly .
and i am not bale to post a question in developer forum i tried hard but i didnt get .Can you plz explain me how to post a question in developer forum this is very helpfull for me.Because i never did this thing. -
please please can some one tell me how do you charge ur ipad with ur laptop. it doesn't chage wen I put use the wire. only charges when I plug the socket in. Iv never used an ipad b4 so don't really know much. Hope some one knowz.
The quickest way (and really the only way) to charge your iPad is with the included 10W or 12W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (2.5W, most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
How to Calibrate Your Mac, iPhone, or iPad Battery
http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
Also, if you have a 3rd generation iPad, look at
Apple: iPad Battery Nothing to Get Charged Up About
http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
New iPad Takes Much Longer to Charge Than iPad 2
http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
Extend iPad Battery Life (Look at pjl123 comment)
https://discussions.apple.com/thread/3921324?tstart=30
New iPad Slow to Recharge, Barely Charges During Use
http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
Tips About Charging for New iPad 3
http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
How to Save and Prolong the battery life of your new ipad
https://discussions.apple.com/thread/4480944?tstart=0
Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
iPhone, iPod, Using the iPad Charger
http://support.apple.com/kb/HT4327
Install and use Battery Doctor HD
http://itunes.apple.com/tw/app/battery-doctor-hd/id459702901?mt=8
To Extend a Device’s Battery Life, Get to Know It Better
http://tinyurl.com/b67c7xz
iPad Battery Replacement
http://www.apple.com/batteries/replacements.html
In rare instances when using the Camera Connection Kit, you may notice that iPad does not charge after using the Camera Connection Kit. Disconnecting and reconnecting the iPad from the charger will resolve this issue.
Cheers, Tom -
Can any one explain me about bursting in bi publisher
hi all
can any one explain me about bursting in bi publisher
i need with small example with screen shots
Thanks
SreedharHi,
http://blogs.oracle.com/BIDeveloper/2009/03/bursting_1.html
look into this http://www.strsoftware.com/blogs/oracle/2009/12/how-to-burst-and-deliver-documents-from-bi-publisher-enterprise/
Thanks,
Srikanth -
Can any one explain me about Listeners in Java
Hi,
Can any one explain the Listeners concept in Java??
Will that work like net send in Windows NT??
How can we achieve the net send type of messaging in an Intenet application??
Is there any possibility??
Please help me out...
Thanks in advance,
Chaitanya.The idea is that the "observable" object holds a list of listening classes which conform to a given interface. When an event occurs it walks the list calling a specific method in all the listeners with whatever parameters are suitable to speficy the event. Very often the listeneing objects are inner classes of some larger class which implement whatever effect the event is to have on the larger class.
Anyonymous inner classes are a convenient abbreviation here.
Usually the observable class has methods called add???Listener and
remove???Listener to add and remove listeners from it's list. There's also often a protected method called fire???Listeners (where ??? is the event type).
So for instance:
public interface DirtyListener {
public void dirtyChanged(boolean to);
class DataModule {
private Set dirtListeners = new HashSet(10);
public void addDirtyListener(DirtyListener d) {
dirtListeners.add(d);
public void remiverDirtyListeners(DirtyListener d) {
dirtListeners.remove(d);
public void fireDirtyListeners(boolean to) {
Iterater it;
for(it = dirtyListeners.iterator(); it.hasNext();)
((DirtyListener)it->next()).dirtyChanged(to);
class ObservingClass {
DateModule data = new DataModule();
data.addDirtyListener(new DirtyListener() {
public void dirtyChanged(boolean to) {
saveButton.setEnabled(to); -
Can any one explain me about Field symbols in Genral Reports?
Can any one explain me about Field symbols in Genral Reports?
If possible, plz explain me with the code to explain me about the field symbols.
Regards,
Krishna ChaitanyaSyntax
FIELD-SYMBOLS <fs> { typing | STRUCTURE struc DEFAULT dobj }.
Extras:
1. ... typing
2. ... STRUCTURE struc DEFAULT dobj
Effect
The FIELD-SYMBOLS statement declares a field symbol <fs>. The naming conventions apply to the name fs. The angle brackets of the field symbols indicate the difference to data objects and are obligatory. You can declare field symbols in any procedure and in the global declaration section of an ABAP program, but not in the declaration section of a class or an interface. You can use a field symbol in any operand position in which it is visible and which match the typing defined using typing.
After its declaration, a field symbol is initial - that is, it does not reference a memory area. You have to assign a memory area to it (normally using the ASSIGN statement) before you can use it as an operand. Otherwise an exception will be triggered.
Addition 1
... typing
Effect
You can use the addition typing to type the field symbol. The syntax of typing is described under Syntax of Typing. The typing specifies which memory areas can be assigned to the field symbol (see Checking the Typing) and in which operand positions it can be used.
Note
You can omit the addition typing outside of methods. In this case, the field symbol has the complete generic type any and is implicitly assigned the predefined constant space during the declaration.
Addition 2
... STRUCTURE struc DEFAULT dobj
Effect
If you specify the addition STRUCTURE instead of typing for a field symbol, and struc is a local program structure (a data object, not a data type) or a flat structure from the ABAP Dictionary, this structure is cast for the field symbol <fs>. You have to specify a data object dobj that is initially assigned to the field symbol.
The field symbol copies the technical attributes of structure struc as if it were completely typed. When you assign a data object using the addition DEFAULT, or later using ASSIGN, its complete data type is not checked in non- Unicode programs. Instead, the system merely checks whether it has at least the length of the structure and its alignment.
In Unicode programs, we differentiate between structured and elementary data objects. For a structured data object dobj, its Unicode fragment view has to match the one of struc. In the case of an elementary data object, the object must be character-type and flat, and struc must be purely character-type. The same applies to assignments of data objects to field symbols typed using STRUCTURE when using the ASSIGN statement.
Note
Field symbols declared using the addition STRUCTURE are a mixture of typed field symbols and a utility for casting structured data types. You should use the additions TYPE or LIKE for the FIELD-SYMBOLS statement to type field symbols, while the addition CASTING of the ASSIGN statement is used for casting.
Example
The first example shows the obsolete usage of the addition STRUCTURE.
DATA wa1 TYPE c LENGTH 512.
FIELD-SYMBOLS <scarr1> STRUCTURE scarr DEFAULT wa1.
<scarr1>-carrid = '...'.
The second example shows the replacement of STRUCTURE with the additions TYPE and CASTING.
DATA wa2 TYPE c LENGTH 512.
FIELD-SYMBOLS <scarr2> TYPE scarr.
ASSIGN wa2 TO <scarr2> CASTING.
<scarr2>-carrid = '...'.
Also,
Field Symbols
Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to each field symbol before you can address the latter in programs.
Field symbols are similar to dereferenced pointers in C (that is, pointers to which the content operator * is applied). However, the only real equivalent of pointers in ABAP, that is, variables that contain a memory address (reference) and that can be used without the contents operator, are reference variables in ABAP Objects.
All operations programmed with field symbols are applied to the field assigned to it. For example, a MOVE statement between two field symbols moves the contents of the field assigned to the first field symbol to the field assigned to the second field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before.
You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks the compatibility of the field symbol and the field you are assigning to it during the ASSIGN statement.
Field symbols provide greater flexibility when you address data objects:
If you want to process sections of fields, you can specify the offset and length of the field dynamically.
You can assign one field symbol to another, which allows you to address parts of fields.
Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
You can also force a field symbol to take different technical attributes from those of the field assigned to it.
The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. However, since the MOVE statement also supports variable offset and length specifications, you should use it instead. The MOVE statement (with your own auxiliary variables if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
check the below links u will get the answers for your questions
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm
http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html
Syntax Diagram
FIELD-SYMBOLS
Basic form
FIELD-SYMBOLS <fs>.
Extras:
1. ... TYPE type
2. ... TYPE REF TO cif
3. ... TYPE REF TO DATA
4. ... TYPE LINE OF type
5. ... LIKE s
6. ... LIKE LINE OF s
7. ... TYPE tabkind
8. ... STRUCTURE s DEFAULT wa
The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Untyped Field Symbols ad Cannot Use Field Symbols as Components of Classes.
Effect
This statement declares a symbolic field called <fs>. At runtime, you can assign a concrete field to the field symbol using ASSIGN. All operations performed with the field symbol then directly affect the field assigned to it.
You can only use one of the additions.
Example
Output aircraft type from the table SFLIGHT using a field symbol:
FIELD-SYMBOLS <PT> TYPE ANY.
DATA SFLIGHT_WA TYPE SFLIGHT.
ASSIGN SFLIGHT_WA-PLANETYPE TO <PT>.
WRITE <PT>.
Addition 1
... TYPE type
Addition 2
... TYPE REF TO cif
Addition 3
... TYPE REF TO DATA
Addition 4
... TYPE LINE OF type
Addition 5
... LIKE s
Addition 6
... LIKE LINE OF s
Addition 7
... TYPE tabkind
Effect
You can define the type of the field symbol using additions 2 to 7 (just as you can for FORM parameters (compare Defining the Type of Subroutine Parameters). When you use the ASSIGN statement, the system carries out the same type checks as for USING parameters of FORMs.
This addition is not allowed in an ABAP Objects context. See Cannot Use Obsolete Casting for FIELD SYMBOLS.
In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See Defining Types Using STRUCTURE.
Effect
Assigns any (internal) field string or structure to the field symbol from the ABAP Dictionary (s). All fields of the structure can be addressed by name: <fs>-fieldname. The structured field symbol points initially to the work area wa specified after DEFAULT.
The work area wa must be at least as long as the structure s. If s contains fields of the type I or F, wa should have the structure s or at least begin in that way, since otherwise alignment problems may occur.
Example
Address components of the flight bookings table SBOOK using a field symbol:
DATA SBOOK_WA LIKE SBOOK.
FIELD-SYMBOLS <SB> STRUCTURE SBOOK
DEFAULT SBOOK_WA.
WRITE: <SB>-BOOKID, <SB>-FLDATE.
Related
ASSIGN, DATA
Additional help
Declaring Field Symbols -
Can any one explain the steps to coinfigure PGP Encryption in B2B
Hello B2B Guru's,
Can any one explain how to configure PGP Encryption in B2B console?
were to specify path for loading pgp encryption jar in b2b console?
is it mandatory that PGP Encryption should have class to implement Call out interface?
which methods we need to implement in Call Out interface?
Thanks,Please refer :
How to configure Call out in B2B ? -
Could some one explain the "Preparationu201D and u201CTechnical Setup" of apo snp
could some one explain the "Preparationu201D and u201CTechnical Setup" of apo snp
Hi,
Can you go through the following threads?
process of snp
SNP
SNP Cycle
Please let me know if you need more information.
Maybe you are looking for
-
Do i have a virus, or is it just Mountain Lion teething problems?
Ever since i upgraded to Mountain Lion, it has impressed me, but also shocked me. It has some really useful features, and looks beautiful, but i cant help wondering if Apple is loosing it's touch, when it behaves like Windows Vista. The first problem
-
"Workflow Template Create" screen appears while executing the work item.
Hi, I am learning the workflow. I have created a test workflow in which there is a user decision step and 2 mail sending steps for the outcomes of the user decision.The workflow is activated properly . When I excute the workflow the screen for "Wo
-
Pse 13 printing picture package
I recently upgraded to PSE 13 and the old way of printing picture packages no longer seems available. How do I print a picture package? thanks.
-
IPad to Apple TV to Dual Projectors?
I have an odd shaped classroom and have 2 projectors that are connected to my classroom computer (which is a PC). I have an apple tv, and my projectors have HDMI, but I cannot for the life of me figure out how to get my apple tv to display on both pr
-
How to get reports cumulated balances? need help please
Dear all, I need your help please in this issue. I am creting a report using reports designer in oracle, well the fact is i don't know how to do the following: if i have for example in the report the following to be diplayed : Date Amount Balance 25/