DB adapter returning 0 rows = Error
Im using the database adapter to recieve multiple rows. The BPEL process works ok when the supplied ID has records (ie when the procedure call returns rows in the table). When there are no records returned however, my db adapter call gives me an error:
<bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>6502</code>
</part><part name="summary"><summary>file:/C:/soa_suite/bpel/domains/default/tmp/.bpel_GetAssessmentsForMultiPxReferral_1.0_ec761d48116898da9d36c7401e882f66.tmp/getAssessmentsForPxReferral.wsdl [ getAssessmentsForPxReferral_ptt::getAssessmentsForPxReferral(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'getAssessmentsForPxReferral' failed due to: Error while trying to prepare and execute an API.
An error occurred while preparing and executing the NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR.NHSSOA_GET_ASSESS_TAB$GETPXAS API. Cause: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at line 1
[Caused by: ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at line 1
; nested exception is:
ORABPEL-11811
Error while trying to prepare and execute an API.
An error occurred while preparing and executing the NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR.NHSSOA_GET_ASSESS_TAB$GETPXAS API. Cause: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at line 1
[Caused by: ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at line 1
Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
</summary>
</part><part name="detail"><detail>
Internal Exception: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at "NHSSOA.BPEL_GETASSESSMENTSFORPXREFERR", line 1
ORA-06512: at line 1
Error Code: 6502</detail>
</part></bindingFault>
I suspect that this could be handled either way (through PL/SQL, or BPEL - error handling perhaps?) my question is; what is the recomended way to approach a db adapter call not returning any records? Ive checked the XSD and the minoccurs for the record is set to 0.
The PL/SQL db adapter code is as follows:
FUNCTION getPxAssessTab (p_ref_id NUMBER) RETURN assessTabType
IS
CURSOR c_get_px_assess IS
SELECT *
FROM nhscont_assess
WHERE ref_id = p_ref_id;
r_c_get_px_assess c_get_px_assess%ROWTYPE;
v_new_tab assessTabType;
x PLS_INTEGER := 0;
BEGIN
OPEN c_get_px_assess;
LOOP
FETCH c_get_px_assess INTO r_c_get_px_assess;
EXIT WHEN c_get_px_assess%NOTFOUND;
x := x + 1;
v_new_tab(x) := r_c_get_px_assess;
END LOOP;
CLOSE c_get_px_assess;
RETURN v_new_tab;
END;
One possible cause for this may be due to a version incompatibility between JDeveloper and SOA. Make sure that both components are version 10.1.3.3 or above. From the stack trace, it looks like the use of JPublisher is involved. There were several fixes added for 10.1.3.3/10.1.3.4 to address problems like yours. We've seen this issue posted in the BPEL and SOA forums before.
Similar Messages
-
DB / Integation adapter returning duplicate rows on select [not all rows]
I am seeing some unusal behavior, we have Application adapter invoking BEPL and which invokes DB adapter to make a select call to ERP database. Select should return 2 different records, where as in the response xml it has same record [only first record] listed twice. On DB adapter wsdl, -"Return Single Resultset " is unchecked. Should this be checked? or is there any other reason why the first record may be cached. I have not seen this in other connectors, restarted server but still same issue. connector is in prod environment. Any help/ideas are welcome.
Edited by: user3622460 on Aug 5, 2009 10:23 PMCan you tell us more about the options you have selected in the Adapter to select the records ?
-
Hi,
I have the following table:
ID number, not null, unique
fname varchar2(50),not null
lname varchar2(50), not null
email varchar2(200)not null, uniqueand the following procedure that queries the table:
declare
name varchar2(100);
email varchar2(500);
stmt varchar2(4000);
nbr number;
begin
name:=substr('sam wilkins:[email protected]',1,(instr('sam wilkins:[email protected]',':')-1));
email:=substr('sam wilkins:[email protected]',(instr('sam wilkins:[email protected]',':')+1));
stmt:='select id from tbl where '
|| 'fname ||'' ''||'
|| 'lname='|| ''''||lower(name)||''''||' and email='||''''||lower(email)||''''||'';
execute immediate stmt into nbr;
select id into nbr from tbl where fname||' '||lname = name and email = email;
dbms_output.put_line(stmt);
dbms_output.put_line(nbr);
end;When I run the procedure with just the execute immediate, the query returns just one id, but when I use the select into, I get the 'Fetch returns more rows' error. Why is this?
Thanks.Hi,
natet wrote:
Hi,
I have the following table:
ID number, not null, unique
fname varchar2(50),not null
lname varchar2(50), not null
email varchar2(200)not null, uniqueand the following procedure that queries the table:
declare
name varchar2(100);
email varchar2(500);
stmt varchar2(4000);
nbr number;
begin
name:=substr('sam wilkins:[email protected]',1,(instr('sam wilkins:[email protected]',':')-1));
email:=substr('sam wilkins:[email protected]',(instr('sam wilkins:[email protected]',':')+1));
stmt:='select id from tbl where '
|| 'fname ||'' ''||'
|| 'lname='|| ''''||lower(name)||''''||' and email='||''''||lower(email)||''''||'';
execute immediate stmt into nbr;
select id into nbr from tbl where fname||' '||lname = name and email = email;
dbms_output.put_line(stmt);
dbms_output.put_line(nbr);
end;When I run the procedure with just the execute immediate, the query returns just one id, but when I use the select into, I get the 'Fetch returns more rows' error. Why is this?
Thanks.Give your local variables names that cannot be confused for column names.
In this statement:
select id
into nbr
from tbl
where fname ||' '|| lname = name
and email = email;email (in both places) refers to the column in the table. No doubt you want to use the local variable in place of one of them. -
If the result from the stored procedure returns 0 rows I get this error returned:
If the result from the following stored procedure returns 0
rows I get this error returned:
faultCode:Server.Processing faultString:'Variable transfers
is undefined.' faultDetail:''
How can I get round this?Well if I try this in a cfm page:
<cfstoredproc procedure="GetTransfers"
datasource="datasource" returncode="true">
<cfprocparam type="in" cfsqltype="CF_SQL_VARCHAR"
value="4">
<cfprocparam type="in" cfsqltype="cf_sql_date"
value="12/09/2006 08:42:00">
<cfprocparam type="in" cfsqltype="cf_sql_date"
value="12/09/2008 08:42:00">
<cfprocresult name="transfers">
I get an error like:
[Macromedia][SQLServer JDBC Driver][SQLServer]Procedure or
function 'GetTransfers' expects parameter '@fromdate', which was
not supplied.
But this procedure only accepts 3 parameters. -
11g DBAdatper returns 1st row multiple times
We have a db adapter that was built using the adapters-db-102-select pdf as a guideline. When we test the query being executed by the adapter in the database it returns ten rows. When we test the BPEL process from the soa-infra console with debugging turned on and view the audit trail we see the following discrepancy. After the invoke operation I view the payload and see that the returned collection does in fact contain ten elements. The issue is that instead of returning the same ten rows as when we execute the query in the database it returns only the first row ten times. Can anyone suggest a possible resolution?
Thank you.Ryan -
I've always had to work to get a row repeated ten times, e.g. iterating through with a while loop and not putting the loop variable as a subscript in the assignment. You may have found a labor-saving new feature! :-( Being suspicious of new releases, I would try interating through the output variable, to see if maybe the person who coded the console display made that "not putting the loop variable as a subscript" error. If you confirm that you really do have the first row ten times, then you have two possibilities: (1) even though you think it's the same, the SQL you defined in the BPEL DB adapter wizard is not exactly the same as what you ran in the database, OR (2) the SQL in BPEL is right but returns repeated rows ("undocumented feature").
If you aren't positive the DB adapter SQL is perfect, you might post the SQL you ran in the DEB and the SQL from the Toplink mappings (assuming 11G still has those). In 10.1.3 it would be in the JDeveloper BPEL project directory {JDevProjectName}/toplink/{DbAdapterPartnerlinkName}/descriptor, in the file named {DbAdapterPartnerlinkName}.{TableName}.ClassDescriptor.xml, in the XML element (tag) called query. It may be in a different place in 11G, but you get the idea. Compare what you think you coded with what the BPEL designer actually coded.
If you're sure the SQL is right, you may want to open an SR. They'll probably ask for the SQL anyway, so posting it first won't hurt unless you're in a hurry.
Good luck, Andy -
Function not returning any rows
If I run this code with a standard SQL statement it will return (1) row - which is correct. But when I try to use a function it is not returning any records. Could someone point what I'm doing wrong?
Also, if a use BindByName if get Oracle error: ORA-06550: line 1, column 50: PLS-00103: Encountered the symbol ">". If I comment out BindByName I will not get this error . Thanks!
C# code:
string domainuser = 'brockj';
string ConnectString = ConfigurationSettings.AppSettings["ConnectString"];
OracleConnection dbconn = new OracleConnection(ConnectString);
OracleCommand cmd = new OracleCommand("access_admin",dbconn);
cmd.CommandType = CommandType.StoredProcedure;
//cmd.BindByName = true;
OracleParameter p_username = new OracleParameter();
OracleParameter p_retval = new OracleParameter();
p_username.OracleDbType = OracleDbType.Varchar2;
p_retval.OracleDbType = OracleDbType.Int16;
p_username.Direction = ParameterDirection.Input;
p_retval.Direction = ParameterDirection.ReturnValue;
p_username.Value = domainuser;
cmd.Parameters.Add(p_username);
cmd.Parameters.Add(p_retval);
dbconn.Open();
cmd.ExecuteScalar();
lblResponse.Text = p_retval.Value.ToString(); -- prints '0', should print '3'
********FUNCTION************
Function access_admin
p_username IN varchar2
RETURN number
IS
l_accesscode users.access_admin%TYPE; -- number(1)
cursor c1 IS
SELECT access_admin
FROM users
WHERE username = p_username
AND active=1
AND rownum=1;
BEGIN
open c1;
fetch c1 into l_accesscode;
if c1%NOTFOUND then
l_accesscode := 0;
end if;
close c1;
RETURN l_accesscode;
END access_admin;Turn the function call into a standard SQL statement:
SELECT access_admin FROM dual;
Here's how you use BindByName:
adapter = new OracleDataAdapter();
adapter.SelectCommand = new OracleCommand("SELECT * FROM emp WHERE sal >= :SAL OR empno = :EMPNO", conn);
adapter.SelectCommand.BindByName = true;
adapter.SelectCommand.Parameters.Add(new OracleParameter("EMPNO", OracleDbType.Int32, 0));
adapter.SelectCommand.Parameters["EMPNO"].Value = 7788;
adapter.SelectCommand.Parameters.Add(new OracleParameter("SAL", OracleDbType.Int32, 0));
adapter.SelectCommand.Parameters["SAL"].Value = 2000;
-- Tom -
Query executed within a plug-in script returns 0 rows, although data exists
I created a plug-in script for algorithm entity: Service Quantity Rule.
The script calls a business service that I created using query zones. The query returns the values of the bill segment (ci.bseg.bseg_id and ci_bseg.closing_bseg_sw) that is created while running a bill manually. The zone receives the bseg_id as a parameter.
The problem is that when I execute the business service within the plug-in script the business services returns 0 rows even though the data is actually being stored in the database.
The script calculates some SQI values and saves it to the bill segment based on a response that is received from MDM (I'm using the usage request object).
Steps:
1.- Create Bill. The bill segment is created in error as it is waiting for the bill determinants to be sent from the MDM. If I test the zone with the bseg_id (as a parameter) of the newly created bill segment it works fine.
2.- We send a message from the MDM to CC&B. The message is received and processed and it gets to a point when the usage updates the bill segment.
3.- After the bill segment has been updated with the values from the usage request object it starts executing the plug-in script.
4.- I obtain the bseg_id from the usage request and use the business service (passing the bseg_id as a parameter) and it returns no result.
5.- The process finishes and if test the zone with the bseg_id (as a paramter) of the billing segment it works fine.
So apparently during the execution of the script after the billing determinants are received from MDM I can't have access to the Bill segment that was created, even if the physically the record exists in the database (CI_BSEG).
I also tried instantiating an object related with the bill segment and got the same result.
Any idea or clue of what is happening?Could you be more explicit.
What CC&B version?
What MDM version?
More details are required for:
2.- We send a message from the MDM to CC&B. The message is received and processed and it gets to a point when the usage updates the bill segment.
3.- After the bill segment has been updated with the values from the usage request object it starts executing the plug-in script.
4.- I obtain the bseg_id from the usage request and use the business service (passing the bseg_id as a parameter) and it returns no result. -
Silly old fogey (me) cannot figure out why this query returns 1 row
Hi all,
In reference to {thread:id=2456973}, why does
select sum(count(decode(job, 'CLERK', 1, null))) CLERKS
, sum(count(decode(job, 'SALESMAN', 1, null))) SALESMANS
from emp group by job;only return 1 row and not 1 for each job? I actually had to test it myself to believe it.
It returns data as if the query were
select sum(CLERKS), sum(SALESMANS)
from (select count(decode(job, 'CLERK', 1, null)) CLERKS, count(decode(job, 'SALESMAN', 1, null)) SALESMANS
from emp group by job)Using only a single aggregate (either count or sum) returns 1 row per job, as expectedJohn Stegeman wrote:
It returns data as if the query were
select sum(CLERKS), sum(SALESMANS)
from (select count(decode(job, 'CLERK', 1, null)) CLERKS, count(decode(job, 'SALESMAN', 1, null)) SALESMANS
from emp group by job)
Exactly the point ;-)
Seems like Oracle actually can do a "double group by" in the same operation.
Witness the explain plans in this example:
SQL> select count(decode(job, 'CLERK', 1, null)) CLERKS
2 , count(decode(job, 'SALESMAN', 1, null)) SALESMANS
3 from scott.emp group by job;
CLERKS SALESMANS
0 0
0 0
0 0
0 4
4 0
Execution Plan
Plan hash value: 1697595674
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 5 | 40 | 4 (25)| 00:00:01 |
| 1 | HASH GROUP BY | | 5 | 40 | 4 (25)| 00:00:01 |
| 2 | TABLE ACCESS FULL| EMP | 14 | 112 | 3 (0)| 00:00:01 |
---------------------------------------------------------------------------And compare it to this one with the double aggregates:
SQL> select sum(count(decode(job, 'CLERK', 1, null))) CLERKS
2 , sum(count(decode(job, 'SALESMAN', 1, null))) SALESMANS
3 from scott.emp group by job;
CLERKS SALESMANS
4 4
Execution Plan
Plan hash value: 417468012
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 8 | 4 (25)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 8 | 4 (25)| 00:00:01 |
| 2 | HASH GROUP BY | | 1 | 8 | 4 (25)| 00:00:01 |
| 3 | TABLE ACCESS FULL| EMP | 14 | 112 | 3 (0)| 00:00:01 |
----------------------------------------------------------------------------There is both HASH GROUP BY and SORT AGGREGATE.
It does not really make sense to do an aggregate on an aggregate - if both aggregates are used "on the same group-by level".
The sum() aggregates are used upon an already aggregated value, so it does look like Oracle actually treats that as "first do the inner aggregate using the specified group by and then do the outer aggregate on the result with no group by."
Look at this example where I combine "double" aggregates with "single" aggregates:
SQL> select sum(count(decode(job, 'CLERK', 1, null))) CLERKS
2 , sum(count(decode(job, 'SALESMAN', 1, null))) SALESMANS
3 , count(decode(job, 'SALESMAN', 1, null)) SALESMANS2
4 , count(*) COUNTS
5 from scott.emp group by job;
CLERKS SALESMANS SALESMANS2 COUNTS
4 4 1 5
Execution Plan
Plan hash value: 417468012
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 8 | 4 (25)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 8 | 4 (25)| 00:00:01 |
| 2 | HASH GROUP BY | | 1 | 8 | 4 (25)| 00:00:01 |
| 3 | TABLE ACCESS FULL| EMP | 14 | 112 | 3 (0)| 00:00:01 |
----------------------------------------------------------------------------When mixing "double" and "single" aggregates, Oracle decides that single aggregates belong in the "outer" aggregation.
SALESMAN2 is doing a count on the aggregated job column that is the result of the "inner" group by - therefore only 1.
The count(*) also counts the result of the "inner" aggregation.
I am not sure if this is documented or if it is a "sideeffect" of either the internal code used for GROUPING SETS or the internal code used for allowing analytic functions like this:
SQL> select count(decode(job, 'CLERK', 1, null)) CLERKS
2 , count(decode(job, 'SALESMAN', 1, null)) SALESMANS
3 , sum(count(decode(job, 'CLERK', 1, null))) over () CLERKS2
4 , sum(count(decode(job, 'SALESMAN', 1, null))) over () SALESMANS2
5 from scott.emp group by job;
CLERKS SALESMANS CLERKS2 SALESMANS2
0 0 4 4
4 0 4 4
0 0 4 4
0 0 4 4
0 4 4 4
Execution Plan
Plan hash value: 4115955660
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 5 | 40 | 4 (25)| 00:00:01 |
| 1 | WINDOW BUFFER | | 5 | 40 | 4 (25)| 00:00:01 |
| 2 | SORT GROUP BY | | 5 | 40 | 4 (25)| 00:00:01 |
| 3 | TABLE ACCESS FULL| EMP | 14 | 112 | 3 (0)| 00:00:01 |
----------------------------------------------------------------------------Personally I think I would have preferred if Oracle raised an error on this "double aggregation" and thus require me to write it this way (if that is the result I desired):
select sum(CLERKS), sum(SALESMANS)
from (select count(decode(job, 'CLERK', 1, null)) CLERKS, count(decode(job, 'SALESMAN', 1, null)) SALESMANS
from emp group by job)I can not really think of good use-cases for the "double aggregation" - but rather that it could give you unnoticed bugs in your code if you happen to do double aggregation without noticing it.
Interesting thing to know ;-) -
Bug Report: ResultSet.isLast() returns false when queries return zero rows
When calling the method isLast() on a resultset that contains zero (0) rows, false is returned. If a resultset contains no rows, isLast() should return true because returning false would indicate that there are more rows to be retrieved.
Try the following Java source:
import java.io.*;
import java.sql.*;
import java.util.*;
import oracle.jdbc.driver.*;
public class Test2 {
public static void main (String [] args) throws Exception {
Connection conn = null;
String jdbcURL = "jdbc:oracle:thin:@" +
"(DESCRIPTION=(ADDRESS=(HOST=<host computer>)"+
"(PROTOCOL=tcp)(PORT=<DB port number>))"+
"(CONNECT_DATA=(SID=<Oracle DB instance>)))";
String userId = "userid";
String password = "password";
try{
// Load the Oracle JDBC Driver and register it.
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
// *** The following statement creates a database connection object
// using the DriverManager.getConnection method. The first parameter is
// the database URL which is constructed based on the connection parameters
// specified in ConnectionParams.java.
// The URL syntax is as follows:
// "jdbc:oracle:<driver>:@<db connection string>"
// <driver>, can be 'thin' or 'oci8'
// <db connect string>, is a Net8 name-value, denoting the TNSNAMES entry
conn = DriverManager.getConnection(jdbcURL, userId, password);
} catch(SQLException ex){ //Trap SQL errors
// catch error
//conn = new OracleDriver().defaultConnection(); // Connect to Oracle 8i (8.1.7), use Oracle thin client.
PreparedStatement ps = conn.prepareStatement("select 'a' from dual where ? = ?", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); // Use any query that will return zero rows.
ps.setInt(1, 1); // Set the params so that the query returns 0 rows.
ps.setInt(2, 2);
ResultSet rs = ps.executeQuery();
System.out.println("1. Last here? " + rs.isLast());
while (rs.next()) {
// do whatever
System.out.println("2. Last here? " + rs.isLast());
ps.close();
rs.close();
EXPECTED RESULT -
1. Last here? true
2. Last here? true
ACTUAL RESULT -
1. Last here? false
2. Last here? false
This happens to me on Oracle 9.2.0.1.0.387561,
For your information, I discovered this problem from
running a query that did access an actual DB table.
Try it and let me know.I did say I was only guessing, and yes, I did try it (after I posted my reply, and before I read yours). And I did check the query plan for the queries I tried -- to verify that they were actually doing some database "gets".
In any case, the usual way that I determine whether a "ResultSet" is empty is when the very first invocation of method "next()" returns 'false'. Is that not sufficient for you?
Good Luck,
Avi. -
Returning Multiple Rows From DBAdapter Calling PL/SQL Procedure
Oracle XE 10g Express Edition
JDeveloper 11.1.1.2.0
WebLogic Server 11g
Guys,
I have a table of orders, which I need to interrogate, and pass back any matching rows which meet certain criteria (e.g. status = 'OPEN').
However, rather than create a DBAdapter using an Operation Type of "Peform an Operation on a Table/Select", I need to use an Operation Type of "Call a Stored Procedure or Function".
I therefore need the procedure to return all the matching rows, rather than a single row.
I have looked at declaring return parameters for the procedure of the following types:
RECORD - is good because it allows me to return the elements of the row with their correct datatypes, but does not meet my needs because it will only support the return of a single row.
VARRAY - good because it can contain many row elements, but not good because it only supports a single row return, and also because all elements of the VARRAY must be of the same data type.
TABLE - good because it can contain many rows, but bad because each row can contain only two elements - the index element and the data element.
I think I could first define a RECORD (to hold a row), and then define a TABLE, with the data element being the RECORD, but I have found JDeveloper very fussy indeed when dealing with 'non-standard' data types in the DBAdapter.
Apologies if I am missing something obvious, but can anyone suggest a way of doing this?
Many thanks in advance.
Edited by: user2541290 on 17-Feb-2010 02:48Hi, I've been able to create process that seems to work. My platform is a but different but I don't think this is important for your question.
Here is the PL/SQL code. Just make Db Adapter for Calling stored procedure and it returns all rows!
Be aware of possible limitations on how manyrows you could return in one select! This can have severe impact on performance.
Succes.
Jos Baan
CREATE OR REPLACE PACKAGE lab2_multiple_rows IS
-- Author : 801455
-- Created : 18-2-2010 8:05:52
-- Purpose :
-- Public type declarations
TYPE rrows IS RECORD(
mutdat DATE,
opmerking VARCHAR2(20));
TYPE trows IS TABLE OF rrows INDEX BY BINARY_INTEGER;
-- Public constant declarations
-- Public variable declarations
-- Public function and procedure declarations
FUNCTION retrows RETURN trows;
END lab2_multiple_rows;
CREATE OR REPLACE PACKAGE BODY lab2_multiple_rows IS
-- Private type declarations
-- Private constant declarations
-- Private variable declarations
-- Function and procedure implementations
FUNCTION retrows RETURN trows IS
lrows trows;
lidx binary_integer := 1;
BEGIN
FOR rsql IN (SELECT t.* FROM jba_transactions t ORDER BY t.mutdat)
LOOP
lrows(lidx).mutdat := rsql.mutdat;
lrows(lidx).opmerking := rsql.opmerking;
lidx := lidx + 1;
END LOOP;
RETURN(lrows);
END;
BEGIN
-- Initialization
NULL;
END lab2_multiple_rows;
Edited by: Baan, Jos on 18-feb-2010 8:53 -
Pl/sql block returning multiple rows
Hi,
I've created a plsql block which obtains an id from a name and then uses this id in another sql statement. The select statement to get the id works fine and the correct id is placed into the variable awardID.
when i try to use this variable in another select statement it returns multiple rows. but when i just use the id in the select statement it works fine.
select AwardID into awardID
from award_objtabA
where Name = awardName;
this returns the correct id '5999'
select Points into award_points
from award_objtabA
where AwardID = awardID;
this returns multiple rows
select Points into award_points
from award_objtabA
where AwardID = 5999;
this works fine
can anybody help with this confusing error?
Cheersselect AwardID
into awardID <= the same column
from award_objtabA
where Name = awardName;
this returns the correct id '5999'
select Points
into award_points
from award_objtabA
where AwardID = awardID; <= the same column
this returns multiple rows
to solve use different name not exactly the same as that of the column name
select AwardID
into vAwardID
from award_objtabA
where Name = awardName;
select Points
into award_points
from award_objtabA
where AwardID = vAwardID;as Alex and Kamal have suggested use different name for your variable. -
DECODE is not working in WHERE clause when subquery returns more rows
Hi Gurus,
I want to write a query on CCENTERS table(Script given below) and expect the following result:
1. When I pass a value of 0 for ID, It returns all the rows given in the table.
2. When I pass a value other than 0, It returns the row for the given value as well as all its child records.
CCENTER has parent-child relationship in ID and BASE column. I am using a query with DECODE function. but DECODE function in WHERE clause is not capable of handling sub-query with multiple rows.
VARIABLE ParaCCenter NUMBER
BEGIN
:paraccenter:=0;
END;
CREATE TABLE ccenters
(id NUMBER,
name VARCHAR2(20),
base number);
INSERT INTO ccenters VALUES(1,'NUST',null);
INSERT INTO ccenters VALUES(2,'SEECS',1);
INSERT INTO ccenters VALUES(3,'NBS',1);
commit;
SELECT * FROM ccenters
WHERE id IN DECODE(:ParaCCenter, 0, id,
(SELECT id FROM ccenters
START WITH base=:ParaCCenter
CONNECT BY PRIOR id = base
UNION
SELECT :ParaCCenter FROM dual
BEGIN
:paraCCenter:=1;
END;
SELECT * FROM ccenters
WHERE id IN DECODE(:ParaCCenter, 0, id,
(SELECT id FROM ccenters
START WITH base=:ParaCCenter
CONNECT BY PRIOR id = base
UNION
SELECT :ParaCCenter FROM dual))
The result is
(SELECT id FROM ccenters
ERROR at line 3:
ORA-01427: single-row subquery returns more than one row
How this query can be rewritten for the given functionality. Any response will be highly appreciated.
ThanksAnd if you want to use DECODE:
SQL> BEGIN
2 :paraccenter:=0;
3 END;
4 /
PL/SQL procedure successfully completed.
SQL> select *
2 from ccenters
3 where :paraccenter = decode(:paraccenter,0,0,id)
4 /
ID NAME BASE
1 NUST
2 SEECS 1
3 NBS 1
SQL> BEGIN
2 :paraccenter:=2;
3 END;
4 /
PL/SQL procedure successfully completed.
SQL> select *
2 from ccenters
3 where :paraccenter = decode(:paraccenter,0,0,id)
4 /
ID NAME BASE
2 SEECS 1
SQL> SY. -
Null Pointer Exception when dynamic vo return no row.
Hi All,
i am using jedev version 11.1.1.5.0.
i have created one dynamic vo using application module method.
public void changeDynamicVoQuery(String sqlStatement) {
ViewObject dynamicVO = this.findViewObject("DynamicVo1");
if(dynamicVO!=null)
dynamicVO.remove();
dynamicVO = this.createViewObjectFromQueryStmt("DynamicVo1", sqlStatement);
try
dynamicVO.executeQuery();
catch(Exception ex)
System.out.println("Exception to execute Dynamic vo===>"+ex);
ex.printStackTrace();
}when i have passed query which return no row Null pointer Exception raised. and if query return row it is running fine.
log detail-
java.lang.NullPointerException
at oracle.adfinternal.view.faces.dynamic.AttributeHelper.getFilteredAttributeDefinitions(AttributeHelper.java:60)
at oracle.adfinternal.view.faces.dynamic.factories.TableFactory.create(TableFactory.java:95)
at oracle.adfinternal.view.faces.dynamic.DynamicTable.doCreateChildren(DynamicTable.java:117)
at oracle.adfinternal.view.faces.dynamic.DynamicForm.createChildren(DynamicForm.java:456)
at oracle.adfinternal.view.faces.dynamic.DynamicForm.encodeBegin(DynamicForm.java:280)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1273)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
<Feb 21, 2013 6:16:51 PM IST> <Error> <HTTP> <BEA-101020> <[ServletContext@14028564[app:DemoApp module:DemoApp-ViewController-context-root path:/DemoApp-ViewController-context-root spec-version:2.5]] Servlet failed with Exception
java.lang.NullPointerException
at oracle.adfinternal.view.faces.dynamic.AttributeHelper.getFilteredAttributeDefinitions(AttributeHelper.java:60)
at oracle.adfinternal.view.faces.dynamic.factories.TableFactory.create(TableFactory.java:95)
at oracle.adfinternal.view.faces.dynamic.DynamicTable.doCreateChildren(DynamicTable.java:117)
at oracle.adfinternal.view.faces.dynamic.DynamicForm.createChildren(DynamicForm.java:456)
at oracle.adfinternal.view.faces.dynamic.DynamicForm.encodeBegin(DynamicForm.java:280)
Truncated. see log file for complete stacktrace
>
<Feb 21, 2013 6:16:51 PM IST> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at Feb 21, 2013 6:16:51 PM IST. Notification details:
WatchRuleType: Log
WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
WatchData: DATE = Feb 21, 2013 6:16:51 PM IST SERVER = DefaultServer MESSAGE = [ServletContext@14028564[app:DemoApp module:DemoApp-ViewController-context-root path:/DemoApp-ViewController-context-root spec-version:2.5]] Servlet failed with Exception
java.lang.NullPointerException
at oracle.adfinternal.view.faces.dynamic.AttributeHelper.getFilteredAttributeDefinitions(AttributeHelper.java:60)
at oracle.adfinternal.view.faces.dynamic.factories.TableFactory.create(TableFactory.java:95)
at oracle.adfinternal.view.faces.dynamic.DynamicTable.doCreateChildren(DynamicTable.java:117)
at oracle.adfinternal.view.faces.dynamic.DynamicForm.createChildren(DynamicForm.java:456)
at oracle.adfinternal.view.faces.dynamic.DynamicForm.encodeBegin(DynamicForm.java:280)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1273)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)It is very strange. what is wrong with my code? please help.
Thanks in Advance.one important thing is that when i drag dynamic vo in jspx page running fine. but when i used it on fragment page(jsff) then Null poiner exception occur.
i am using following tutorial to create dynamic table.
https://blogs.oracle.com/shay/entry/adf_faces_dynamic_tags_-fora
is there any solution?
error is following-
java.lang.NullPointerException
at oracle.adfinternal.view.faces.dynamic.DynamicForm.isRefreshNecessary(DynamicForm.java:503)
at oracle.adfinternal.view.faces.dynamic.DynamicForm.createChildren(DynamicForm.java:370)
at oracle.adfinternal.view.faces.dynamic.DynamicForm.encodeBegin(DynamicForm.java:280)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer._encodeChildren(RegionRenderer.java:278)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.encodeAll(RegionRenderer.java:201)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)And when i have refresh page it is running fine.
Edited by: Manish on २५ दिसंबर, २०१२ ६:२८ अपराह्न -
FTP adapter failing sometimes, msg:Error connecting to the OAI Repository
Hi,
I have imported a dump due to curropt metadata definition. The import was successful without any warning/error.
I have recreated the event , but when I am testing the same, getting following error in the FTP adapter, though the adadpter is started successfully, connecting to hub /repository, still trowing below errror when it translates a file:
Sometimes it works when the adadpter is killed & restarted.
Ususally happening when a new event is created & run for the first time...
++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++
<A N = "do_no">428997</A>
<A N = "mdo_no">
</A>
</AO>
</AO>
</AO>
</B>
</MSG>.
Mon Oct 03 17:18:45 SGT 2005: Transport logs:
Message linked list has 0 elements.
Mon Oct 03 17:18:45 SGT 2005: Transport logs:
FileReceiver.sendResponse() completed.
Mon Oct 03 17:18:45 SGT 2005: Transport logs:
FileReceiver.receive() is invoked.
Mon Oct 03 17:18:45 SGT 2005: Transport logs:
The message queue is empty.
Mon Oct 03 17:18:45 SGT 2005: Initializing connection to the Repository...
Mon Oct 03 17:18:46 SGT 2005: Connected to the Repository.
Mon Oct 03 17:18:46 SGT 2005: Error connecting to the OAI Repository. Please make sure that the hub database and the OAI Repository are started properly. Once everything is started properly, the connection will be automatically re-established. However, if you have provided incorrect parameters concerning your hub database or the OAI Repository during installation of this Adapter, please stop the Adapter, fix the information and restart.
oracle.aob.repository.aobRepositoryCartridge.RepositoryException
++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++
Any pointers on this will be a great help for me.
Regards,
MOhitIn same context, what I observed is that the FTP adapter throws above error if a file is send again for translation...ie; when i try to use the same file for testing putingit in FTO dir , FTP adapter hangs throwing above error.
Even after few runs of other files.
Is it something related to the security feature of the product which prohibits sending the contents of message if the same contents are send previously?
Actullay I had never faced such issue before & use to do the testing with same file itself.
oai_agent_error has following entry in internalid column:
MetadataManager_RepositoryConnectionErrorWithoutOID
When I kill the adapter, the same msg is picked up by the subcribing adadpeter(dbadapter) & puts the data into the table.
Tough I m fixing the above issue as below:
1- kill the FTP adapter
2- remove its entries in componentinfo table.
3-deleting all rows in oai_hub_queue.
4- stop other adapters.
5- Stopping & restarting the repository again.
Still not sure whether error throwing by adapter is expected functionality in iStudio, or something is missing in the setting done in my setup?
Regards.
Mohit -
'select count(*) from x' returns 5460 rows and 'Select * from x' returns 0 rows
As you can see in the next lines something is wrong in my Oracle (8.0.6 on Win NT 4.0 sp 6a) :
Oracle8 Enterprise Edition Release 8.0.6.0.0 - Production
With the Partitioning option
PL/SQL Release 8.0.6.0.0 - Production
SQLWKS> SELECT * FROM V_TERRA_TE;
PERIOD_DATE PERIOD_TIME TERRARCV TERRASND TERCV TESND
0 rows selected.
SQLWKS> SELECT COUNT(*) FROM V_TERRA_TE;
COUNT(*)
5460
1 row selected.
V_TERRA_TE is a complex join of 5 Tables :
CREATE OR REPLACE VIEW "ACTUATE".V_TERRA_TE AS Select to_date(to_char(p1.period_date,'YYYYMMDD'),'YYYYMMDD') "PERIOD_DATE",
to_date(to_char(p1.period_time,'HH24:MI'),'HH24:MI') "PERIOD_TIME",
to_number(p1.caudalrcv + ((p3.caudalrcv + p4.caudalrcv)*(confterrate.conexadslterra/confterrate.conexadsltotal))) "TERRARCV",
to_number(p1.caudalsnd + ((p3.caudalsnd + p4.caudalsnd)*(confterrate.conexadslterra/confterrate.conexadsltotal))) "TERRASND",
to_number((p2.caudalrcv * confterrate.pctinfonegocio) + ((p3.caudalrcv + p4.caudalrcv)*(confterrate.conexadslte/confterrate.conexadsltotal)))"TERCV",
to_number((p2.caudalsnd * confterrate.pctinfonegocio) + ((p3.caudalsnd + p4.caudalsnd)*(confterrate.conexadslte/confterrate.conexadsltotal)))"TESND"
from p1,p2,p3,p4,confterrate
where (p1.period_date=p2.period_date)and
(p1.period_date=p3.period_date)and
(p1.period_date=p4.period_date)and
(p1.period_time=p3.period_time)and
(p1.period_time=p4.period_time)and
(p1.period_time=p2.period_time)and
to_char(p1.period_date,'MMYYYY')=to_char(confterrate.period_datetime,'MMYYYY');
I think that some not reported error happens in the select * with some temporary space or similar but only the message '0 rows selected' is displayed (instead the real error)
Could somebody help me ?
Thanks in advance
FranciscoForcing the Join/sort to be made on Disk (not on memory) the problem not happens. This demostrate that ORACLE has a VERY IMPORTANT BUG : It returns 0 rows wich is false.
To force it to work on disk i use this parameters :
alter session set sort_area_size=0
alter session set hash_join_enabled=false
Note : probably is not the best combination or use of parameters, but using it the query works as espected.
Maybe you are looking for
-
BUG: OC4J recompiled JSPs can not be debugged in JDev 10.1.3.2
We are having problems on JSP which are modified while running on OC4J within JDev 10.1.3.2. The modified JSP are not correctly recompiled. A similar thread discussing this problem is here: Oracle JDeveloper 10.1.3.1's Internal OC4J JSP Recompile We
-
Adobe Premiere has encountered an error... over and over again
Hello I've been a happy Adobe Premiere Pro CC customer for 4 months until recently when I strated experiencing a problem with re-opening saved projects. I can easily start new project save them, work on them and so on but as soon as I close them and
-
Adding Company Logo to a Standard Purchase Order
Hi, I went throigh this forum and tried all the different variations that have been provided. With the following one, src="url({'${OA_MEDIA}/xxx.jpg'})", I am able to see the logo , when I preview it after I uploaded the xsl-fo file. I also updated t
-
I want to add a solar charger for iPhone 5 and iPad to my emergency kit. Are there recommendations for compatible solar products?
-
Is it possible to have a cropped clip fill the frame?
I shot a sequence a sequence of a kid hitting a baseball. He then takes his helmet off and addresses the camera. I would like to "zoom in" on the portion where he addresses the camera. I have cropped this portion, but can I then have it fill the pict