Insert With Stored Procs
Hello All!
I want to do an insert into my database using Stored procedures. I already know how to delete and select.. i'm gonna post part of my code in wich i make a select to give u gives an idea of how im doing the statements.. if there's anything wrong please let me know.
private void MostrarActionPerformed(java.awt.event.ActionEvent evt) {
Connection conexion;
Statement sentencia;
ResultSet resultado;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch (Exception e){
System.out.println("No se pudo conectar con el JDBC-ODBC");
return;
try{
conexion = DriverManager.getConnection("jdbc:odbc:con_sql","","" );
sentencia = conexion.createStatement();
String a = ID_E.getText();
int Empleado_ID = Integer.parseInt(a);
resultado = sentencia.executeQuery("exec x "+a);
while(resultado.next() ){
String Name = resultado.getString("Nombre");
String LastName = resultado.getString("Apellido");
Nom.setText(Name);
Ape.setText(LastName);
catch( Exception e ) {
System.out.println( e );
return;
}
you may have better luck at a good answer from the DataBase Forum. See http://forum.java.sun.com/forum.jspa?forumID=48
Similar Messages
-
How to declare a cursor with stored proc?
Hi All,
Can we declare a cursor with stored proc?
For Example -
CREATE PROCEDURE DDL_proc() LANGUAGE SQLSCRIPT AS
CURSOR c_cursor1 (v_isbn VARCHAR(20)) FOR CALL SYS.GET_OBJECT_DEFINITION(<SCHEMA_NAME>, <TABLE_NAME>).;
BEGIN
FOR cur_row as c_cursor1 DO
END FOR;
END;
Could you please have a look on the same?
Thank you,
VijeeshOracle PL/SQL also has a select into statement which is described in the same manual the link takes you to part of.
select column_list
into variable_list
from table(s)
where conditions
The PL/SQL Users Guide is something you are going to want to have gone over cover to cover before you start converting because so that you make the best choices for how to rewrite the code: select into, explicit cursor, implicit cursor, for loop, simple loop, while loop, collections,bulk load, etc ....
HTH -- Mark D Powell -- -
Report with stored proc running multiple stored procedures with insert statement
Hi,
I wonder if this is possible in SSRS ... I use the 2012 version (Data Tools).
I have a report that triggers a stored procedure. See below.
Within this SP there are 2 insert statements getting data from 2 other SP's.
When I make a dataset referring to the main SP below, SSRS does not show me any fields at all.
Is this because it's a SP with insert statements and nested SP's?
At the end of the SP I make a select so it should see all the fields.
The parameters @month and @costcenter are multivalue params. I use a special function to convert the multivalues, selected in the report, into a string to pass it correctly to the query (comma separated).
USE [TestDB]
GO
/****** Object: StoredProcedure [dbo].[_Pink_SP_StandingsRegisterDataset] Script Date: 15-4-2014 13:31:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[_Pink_SP_StandingsRegisterDataset]
@year INT,
@month NVARCHAR(50),
@costcenter NVARCHAR(500),
@GLaccount NVARCHAR(9)
AS
BEGIN
/* Remove existing content*/
DELETE FROM _Pink_TB_StandingsRegister
/* Add records part 1 */
INSERT INTO _Pink_TB_StandingsRegister
EXEC _Pink_SP_StandingsRegister @year, @month, @costcenter, @GLaccount
/* Add records part 2 */
INSERT INTO _Pink_TB_StandingsRegister
Type,
Row,
Year,
Month,
YearDatetable,
MonthDatetable
EXEC _Pink_SP_StandingsRegisterDatetable @year
/* Select all records */
SELECT *
FROM _Pink_TB_StandingsRegister
END
GOHi bijntjede2e,
After testing a similar scenario in my own environment, it works well in Reporting Services. In my test, the stored procedure returns all the fields from _Pink_TB_StandingsRegister table in the dataset. Then I select some values from year, month, costcenter
and Glaccount parameters, it inserts some values in the _Pink_TB_StandingsRegister table. So we can use this stored procedure as the dataset in the report.
In order to solve the problem more efficiently, I need to clarify some information.
Are you pass multiple values parameter to one stored procedure correctly? We can refer to the following thread:
http://social.technet.microsoft.com/Forums/en-US/dbdfa101-cccc-4e9f-aa50-566dc5ebcc27/ssrs-2008-r2-report-dataset-call-a-stored-procedure?forum=sqlrep
What results are you get when executing the stored procedure in SQL Server Management Studio? Is it works well? We should double those stored procedures.
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Help with Stored Procs.
Hello All,
Orcl Version:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE 11.2.0.2.0 Production"
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
I have a scenario, where I've to run the procedures from a package multiple times with different input parameter(key) primary key of one of the tables used inside the proc.
For ex,
pkg1
proc1(Key);
proc2(Key);
proc3(Key);
proc30(Key);
Engine(Main code) runs these procs multiple times with different params. Sometimes a proc runs more than 4000 times with different param value(key). I have 2 questions.
1. A proc when run for the first time, it is compiled and for the next time it will be in compiled form. I'm not sure how it works for the second run. Is the query in the proc cached and helps improve the performance?
2. Are there any ways to improve the performance?
Like, I'm hitting the base tables everytime a proc is run. Is there any advantage of creating MV's or something like that?
Thanks
Shank.Hi, Shank,
SamFisher wrote:
Orcl Version:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production ...
Thanks for including that!
I have a scenario, where I've to run the procedures from a package multiple times with different input parameter(key) primary key of one of the tables used inside the proc.
For ex,
pkg1
proc1(Key);
proc2(Key);
proc3(Key);
proc30(Key);
Engine(Main code) runs these procs multiple times with different params. Sometimes a proc runs more than 4000 times with different param value(key). I have 2 questions.
1. A proc when run for the first time, it is compiled and for the next time it will be in compiled form. Not usually. A stored procedure is compiled when it is created, that is, when you run the CREATE OR REPLACE PROCEDURE (or CREATE OR REPLACE PACKAGE) command.
It may be automatically re-compiled when you call it the first time. For example, if procedure A calls some other procedure B, and B has been re-compiled since A was created, then A will be re-compiled when you run it the first time.
I'm not sure how it works for the second run. Is the query in the proc cached and helps improve the performance? Performance may be a little faster after the first call, because the procedure, and the objects it references (such as table blocks) may already be cached in memory.
2. Are there any ways to improve the performance?
Like, I'm hitting the base tables everytime a proc is run. Is there any advantage of creating MV's or something like that? If the package body contains a BEGIN section, then that section is run the first time the package is used , but not again in the same session. You can use that section to initialize package variables (or SYS_CONTEXT variables, or global temporary tables) so you don't have to re-compute them every time you call the package.
For example, I have a package called pk_mail. The package body looks like this:
CREATE OR REPLACE PACKAGE BODY pk_mail
AS
mail_host_name VARCHAR2 (30);
PROCEDURE add_recipient -- First procedure
END send_to_all; -- Last procedure
-- The following is run the first time the package is used in a given session:
BEGIN
SELECT txt
INTO mail_host_name
FROM constant_tbl
WHERE ent_name = 'MAIL_HOST_NAME'
AND status_txt = 'ACTIVE'
AND ROWNUM = 1;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
mail_host_name := 'itd-smtp-out.foo.bar.com; -- Default value
END pk_mail;
/The package variable mail_host_name, which is used in various procedures in the package, is set the first time the package is used. After the first call, the code that gives it a value is not run again.
Edited by: Frank Kulash on Jul 6, 2012 1:21 PM
Added pk_mail example. -
Should I do this with Java Code or Stored Procs ? (for best performance)
Hi All,
I need to decide where should I implement my business logic, in Java code or Stored procs.
Here is the requirement :
- One Order has 70 products (Order_Table )
- Can be duplicate products, so I have to do summarize / grouping by product
- For every product, I have to check, if it is entitled for a Bonus product, then I have to Insert one to Bonus_Table.
- This is done when/after the transaction is SAVED (COMMIT)
The question is, which one has better PERFORMANCE :
(1) Create a rowsetIterator on the Order details (70 products) and call a stored procedure to do the logic for every single product (so that the Insert to Bonus_Table done in stored proc). means the stored proc will be called 70 times.
OR
(2) After the transaction is COMMITted, call the stored procs ONCE to do the logic for all the products at once.
OR
(3) I do all the logic with Java Code within ADF
Given the requirement above, which approach is most efficient / best performance ?
Thank you very much,
xtantoProblem with this is that you ask 100 people and you probably get 100 different answers. ;o)
Many would say that you push as much business logic into the database with your data; others might say you only put data in your database and your business logic is kept on the application server.
In reality your would probably have a mix of both and your decision would probably be influenced by your own background ...
Can't be more precise than that.
Grant -
Stored Proc with SSRS multi value parameter gives " Must Declare scalar Varaiable @StateID
Hi All,
I have one stored proc with @fromDate , @Todate and multivalue input
parameter@StateID of type integer.
When I run below stored proc via SSRS by selecting multiple values thru multiValue parameter into @StateID...it gives error saying "Must Declare scalar variable @StateID"
Not sure what is wrong with the input parameters.
ID is Integer type in all the 3 tables - dbo.EastCities, dbo.WestCities , dbo.Country
I need help fixing this "Must Declare scalar variable @StateID" error
This is the UDF split() I am using..
Function:
CREATE FUNCTION dbo.SplitStateID
( @List VARCHAR(MAX))
RETURNS TABLE
AS
RETURN
( SELECT DISTINCT [Value] = CONVERT(INT, LTRIM(RTRIM(CONVERT( VARCHAR(12),SUBSTRING(@List, Number, CHARINDEX(',', @List + ',', Number) - Number))))
FROM dbo.Numbers
WHERE Number <= CONVERT(INT, LEN(@List))AND SUBSTRING(',' + @List, Number, 1) = ',' );
GO
SELECT [Value] FROM dbo.SplitStateID('10,30,50');
Also, I have created dbo.Numbers table which is used in udf..
reference url -- >
http://sqlblog.com/blogs/aaron_bertrand/archive/2009/08/01/processing-a-list-of-integers-my-approach.aspx
SET NOCOUNT ON;
DECLARE @UpperLimit INT;
SET @UpperLimit = 10000;
WITH n AS(
SELECT rn = ROW_NUMBER() OVER (ORDER BY s1.[object_id])
FROM sys.objects AS s1
CROSS JOIN sys.objects AS s2
CROSS JOIN sys.objects AS s3)
SELECT [Number] = rn - 1
INTO dbo.Numbers FROM n
WHERE rn <= @UpperLimit + 1;
CREATE UNIQUE CLUSTERED INDEX n ON dbo.Numbers([Number]);
Stored procedure:
Create Procedure dbo.CountrySelection
( @FromDate Date, @ToDate Date, @StateID Int)
AS
BEGIN
set nocount on;
SELECT * INTO #EastCities
FROM (
SELECT ID,Description from dbo.EastCities
Where ID IN (SELECT Value from dbo.SplitStateID(@StateID))
) AS A
SELECT * INTO #WestCities
FROM (
SELECT ID,Description from dbo.WestCities
Where ID IN (SELECT Value from dbo.SplitStateID(@StateID))
) AS B
SELECT * INTO #Country
FROM (
SELECT ID , Description, State,Country From dbo.Country
) AS C
SELECT EC.ID AS East, WC.ID AS West , EC.Description AS EastDesc, WC.Description AS WestDesc, CT.State, CT.Country
FROM #Country CT
LEFT JOIN #EastCities EC ON CT.ID=EC.ID
LEFT JOIN #WestCities WC ON CT.ID=WC.ID
DROP TABLE #EastCities
DROP TABLE #WestCities
DROP TABLE #Country
END
Above 3 temp tables are joined by #Country.ID key
It works fine when single value is passed in @StateID
Exec dbo.CountrySelection '01/01/2010','02/01/2010',10
It fails when multi value passed into @StateID
Exec dbo.CountrySelection '01/01/2010','02/01/2010','10,30,40'
SSRS error log shows "Must declare scalar variable @StateID"
Need help in fixing this issue.
Thanks,
RH
sqlVisakh,
I changed @StateID date type to varchar(max) and still I get this error.
System.Data.SqlClient.SqlException: Must declare the scalar variable "@StateID".
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
I am running this SO in SSRS quert Type =Text
Actually sp created on db2 database and due to some limitations I am running(via SSRS) this from different db1 database data source within the same db server. When I run this sp from SSRS query designer(edit query designer button) and pass
multivalue parameters to @StateID as 10 , 20 it works and gives expected resultset.
Thanks,
RH
sql -
JDBC receiver adapter with multiple stored procs error
Hi all,
I am doing a scenario IDOC-XI-JDBC. The destination system in MS SQL server 2000. I am passing variant config information to update the destination tables by triggering the same stored procedure multiple times with different parameters.
Everything is correct, but JDBC adapter is giving me the following error
Unable to execute statement for table or stored procedure. 'mk_EditAllowedLowerSpineImprintingOptions_proc' (Structure 'CallProc') due to java.lang.IllegalArgumentException
My payload looks like this. This is just a partial payload, the blocks of CallProc continue till the CallsRemaining number reaches zero(0).
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_UPDATEPERSONAVARIANTS xmlns:ns0="urn:sd:sales:sapvarianttablestopersona">
- <CallProc>
- <Update_Persona_Variants action="EXECUTE">
<table>mk_EditAllowedLowerSpineImprintingOptions_proc</table>
<AlbumType type="CHAR">7SPEC</AlbumType>
<UpperSpineImprintingOption type="CHAR">UST</UpperSpineImprintingOption>
<LowerSpineImprintingOption type="CHAR">NOL</LowerSpineImprintingOption>
<EffectiveDate type="DATE">20040503</EffectiveDate>
<CallsRemaining type="INTEGER">27</CallsRemaining>
</Update_Persona_Variants>
</CallProc>
- <CallProc>
- <Update_Persona_Variants action="EXECUTE">
<table>mk_EditAllowedLowerSpineImprintingOptions_proc</table>
<AlbumType type="CHAR">7SENT</AlbumType>
<UpperSpineImprintingOption type="CHAR">UST</UpperSpineImprintingOption>
<LowerSpineImprintingOption type="CHAR">LSP</LowerSpineImprintingOption>
<EffectiveDate type="DATE">20040503</EffectiveDate>
<CallsRemaining type="INTEGER">26</CallsRemaining>
</Update_Persona_Variants>
</CallProc>
- <CallProc>
- <Update_Persona_Variants action="EXECUTE">
<table>mk_EditAllowedLowerSpineImprintingOptions_proc</table>
<AlbumType type="CHAR">7SPEC</AlbumType>
<UpperSpineImprintingOption type="CHAR">UST</UpperSpineImprintingOption>
<LowerSpineImprintingOption type="CHAR">LSP</LowerSpineImprintingOption>
<EffectiveDate type="DATE">20040503</EffectiveDate>
<CallsRemaining type="INTEGER">25</CallsRemaining>
</Update_Persona_Variants>
</CallProc>
......CallProc blocks continue till CallRemaining reaches zero.
I also tried making CallProc element appear just once in XML and repeating <Update_Persona_Variants> blocks like below
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_UPDATEPERSONAVARIANTS xmlns:ns0="urn:sd:sales:sapvarianttablestopersona">
- <CallProc>
- <Update_Persona_Variants action="EXECUTE">
</Update_Persona_Variants>
<Update_Persona_Variants action="EXECUTE">
</Update_Persona_Variants>
</CallProc>
</ns0:MT_UPDATEPERSONAVARIANTS >
but still i get the same error.
Can anyone guide me what is wrong.Well,
The problem was with the way date was passed to the stored procedure, i just needed to format the date to yyyy-mm-dd and the error was solved. The error given by the JDBC adapter was not correct. I tried using logSQLStatement additional parameter, but for stored procedures it does not give out the actual SQL statement being fired. I was able to find the error in log files found on WAS server in transaction AL11.
So i suggest to everyone having issues with JDBC adapter, please do not trust the error given in runtime workbench, always crosscheck in the logs in AL11 at the following location in your XI box
DIR_INSTANCE\J2EE\CLUSTER\SERVER0\log. Here find date and time when you triggered your scenario and search for your table name or stored proc name, the java dump will give you a good information.
I am giving points to everyone anyways.
Thanks
Pulin -
Problem with java stored procs.
Is there a restriction on accessing XML documents from Java stored procs?
I have a Java program to parse XML document and return a string. If I run this program as a stand alone, the program runs fine.
I loaded the oracle xmlparser.jar into ORACLE8i db sucessfully (used -resolve option). Then I loaded my .class file with -verbose and -resolve option and I did not get any erros. I created function which return string. When I ran the function, I did not get any value bacmk.
Can I use System.out.println in java programs in ORACLE8i. If I can where can I see the output when the program runs? I not waht other mehtods I can use to debug the program running in ORACLE8i JVM.
Thank YouHello again,
I read the documentation of 9i and found some hints about different TCP/IP socket handling of 9i and a standard JVM.
There are some parts that give hints but I couldn't find a sample code to show how to handle the differences.
Could anyone tell me how to handle the differences or give some links to sample code?
Thanks
Detlev -
BPEL process to Insert XML into DB using pl/sql stored proc
Hi,
We have created a BPEL process in which we are taking input request and store it into Oracle Database using PL/SQL proc.
We have been unsuccessful in doing so because the data stored in table has root element missing.
Has any body done this (insert xml into DB using pl/sql stored proc) successfully ?
We can so this successfully if we do not use stored procedure and store data directly in table.
RegardsI have done this, stored it as a CLOB.
Also I received the payload as an opaque schema, so I had to convert the message from binary into string.
This way the root element doesn't get removed.
cheers
James -
BPC5.1 - Data manager package to Stored proc with custom return codes
Hi all,
Does anyone have experience passing the return codes from a stored procedure back into the eData "view status" package progress or event log details?
When my stored procedure throws errors, the offending SQL code shows up in the pacakge details, which is helpful. But what I'd really like is to structure my stored proc with return codes
0 = everything's wonderful
1 = invalid category / time combination
2 = unauthorized
3 = no data to process
And then handle these codes as either "completed" "warning" or "error" in the package progress.
And ideally, I'd like to put some meaningful message about the warnings & errors, directly into the log details, so the user can fix the problem themselves rather than ask the IT guy to trouble-shoot.
Any tips? I've started playing with using the on-complete, on-success, on-failure routing of different tasks within the DTSX package (SQL 2005), but I'm just working on a trial-and-error basis right now. (With # of errors = # of trials.)
Thanks,
TimIn case anyone's interested, I've solved this by tracking my return codes as a package variable.
Within the package, I have conditional logic moving from task to task, evaluating the return code to check for various conditions, and selecting which tasks to perform accordingly.
In the last task, I run a final stored procedure which posts some data (completion time & status) to a custom transaction log table, and then if the return code is not zero, I script and execute some SQL which I know will throw a "fake" error. The SQL statement itself includes the key information I want the end user to see. For example
Select InvalidEntitySelection [USEast1],TransactionID [12340] from ThisTableDoesntExist
Select UnauthorizedUser [Tim], TransactionID [12345] from ThisTableDoesntExist
Select WorkStatusIsLocked [USEast1 Actual 2008], TransactionID [12345] from ThisTableDoesntExist
It's not exactly elegant, but it gets the message across, which is all that I need. In this way, the end user sees that the package failed with an error, and when they look at the package details, they can see the problem. They can pass on the transaction ID to an administrator to look into the details, if they can't figure it out on their own.
Sorin, I never managed to figure out how to use a VB task to send the information back to the user, plus force the package to end in an error. I'm sure there's a way to do so, but this seems to work for my requirement.
I'm not entirely happy with the "fake error" approach, but I don't know if BPC has any support for "intentional" programming of errors in the DTS scripting toolset.
Thanks,
Tim -
Stored Proc output being truncated with latest ojdbc14 and classes12.jar
Hello,
I downloaded the latest ojdbc14.jar from Oracle website and used it with my Java program. I noticed a peculiar behavior. If my stored proc is returning a VARCHAR with large number of characters, the output is being truncated. This worked fine with the older ojdbc14.jar (and the older classes12.jar). It does not work properly with the new ojdbc14 and classes12.jar. Is there something that I am missing here?
My Oracle Server version is - Oracle Database 10g Enterprise Edition Release 10.2.0.1.0.
Below is the sample stored proc and the Java file to execute the same.
Am I missing something here?
CREATE OR REPLACE PROCEDURE TestOracleDriver (returnVal OUT VARCHAR2) IS
BEGIN
returnVal := '';
FOR tmpVar in 1..2000
Loop
returnVal := returnVal || to_char(tmpVar) || ',';
END LOOP;
END;
import java.sql.*;
import java.util.*;
import java.util.Hashtable;
import oracle.jdbc.driver.OracleTypes;
public class OracleDriverTest
public static void main(String argv[]) throws Exception
Connection c = null;
try
Driver dr = new oracle.jdbc.OracleDriver();
Properties props = new Properties();
props.put("user", "scott");
props.put("password", "tiger");
c = dr.connect("jdbc:oracle:thin:@SERVER_NAME:PORT:SID", props);
System.out.println("GOT A PLAIN CON" );
System.out.println("The driver is " + c.getMetaData().getDriverVersion() );
System.out.println("The DBMS is " + c.getMetaData().getDatabaseProductVersion() );
execute(c);
catch (Exception e)
e.printStackTrace();
finally { try {c.close();} catch (Exception ign){} }
private static String execute(Connection connection )
String procName = "TestOracleDriver";
CallableStatement cstmt=null;
ResultSet rs = null;
String returnedData = null;
try
cstmt = connection.prepareCall("{call " + procName+" (?)}");
cstmt.registerOutParameter(1,OracleTypes.VARCHAR);
cstmt.execute();
returnedData = cstmt.getString(1);
System.out.println("ProcTest ::execute --> Returned data is \n"+ returnedData);
return returnedData;
catch (Exception e) {
System.out.println("ProcTest ::execute -->Error while executing "+procName);
e.printStackTrace();
return null;
finally
try
connection.close();
catch (Exception e1)
System.out.println("ProcTest ::execute -->Error while closing connection ");
e1.printStackTrace();
}//end of catch
}//end of finally
}//End of execute method
Regards,
Hari
Message was edited by:
user553601
Message was edited by:
user553601Hari,
If you think it is a bug, you can report it to Oracle Support via the MetaLink Web site.
Good Luck,
Avi. -
ORA-03113 with pool and stored proc
We are experiencing a strange error when calling a stored procedure using a
connection pool (WLS 5.1 SP10, Oracle 8). Everything works fine until the
stored procedure raises a user-defined exception. When the connection is
used again, we get the 03113 error. It appears that the connection is OK
due to the testConnsOnReserve not returning an error, but on the next stored
procedure call, the error happens. The database guys have no answers. Does
anyone have a clue?
Here is an ouput log showing what happens (this was done with a pool with
only one connection):
Got the exception for no BPI Record
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
:7, :8); end;
SQLException: SQLState() vendor code(20003)
java.sql.SQLException: ORA-20003: Error at step- Select..,procedure
p_getBPITrckIdForDataTblPk No BPI Record Found...
ORA-01403: no data found
ORA-06512: at "CIFPROC.PKG_UTIL", line 381
ORA-06512: at "CIFPROC.PKG_BPI", line 901
ORA-06512: at line 1
at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
Compiled Code)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
Code)
at
weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
Compiled Code)
at com.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
Release test worked!
Parsing: select count(*) from dual
Executing: select count(*) from dual
Obtain the connection again
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Reserve test worked!
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Calling stored proc and get comm error
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
:7, :8); end;
SQLException: SQLState() vendor code(3113)
java.sql.SQLException: ORA-03113: end-of-file on communication channel
at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
Compiled Code)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
Code)
at
weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
Compiled Code)
at com.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
Release test fails!
Parsing: select count(*) from dual
SQLException: SQLState() vendor code(3114)
java.sql.SQLException: ORA-03114: not connected to ORACLE
at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java, Compiled
Code)
at
weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java,
Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
at
weblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
Compiled Code)
at weblogic.jdbcbase.pool.Connection.close(Connection.java, Compiled
Code)
at
com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.ja
va, Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
Regenerating connection
DriverManager.getDriver("jdbc20:weblogic:oracle:DCIF")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
trying
driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d1
fcf]
getDriver returning
driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d1
fcf]
weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
Connecting to database using: bmgr/********@DCIF at 0
SQLException: SQLState() vendor code(1012)
java.sql.SQLException: ORA-01012: not logged on - (bmgr/********@DCIF)
at
weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
at
weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connection
EnvFactory.java:153)
at
weblogic.jdbc.common.internal.ConnectionEnvFactory.refreshResource(Connectio
nEnvFactory.java:207)
at
weblogic.jdbc.common.internal.ConnectionEnv.refresh(ConnectionEnv.java:677)
at
weblogic.common.internal.ResourceAllocator.resetThisOne(ResourceAllocator.ja
va, Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
at
weblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
Compiled Code)
at weblogic.jdbcbase.pool.Connection.close(Connection.java, Compiled
Code)
at
com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.ja
va, Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProcess
.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
Code)
weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
Connecting to database using: bmgr/********@DCIF at 0
Connected to database at: 160
Parsing: select length(SYSDATE) from dual
Executing: select length(SYSDATE) from dual
Parsing: select VALUE from V$NLS_PARAMETERS where
PARAMETER='NLS_NUMERIC_CHARACTERS'
Executing: select VALUE from V$NLS_PARAMETERS where
PARAMETER='NLS_NUMERIC_CHARACTERS'
Done logging in at: 170
Connection: using OCI API: OCI8
Done with connection regen
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
:7, :8); end;
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4, :5, :6,
:7, :8); end;
Parsing: select count(*) from dual
Executing: select count(*) from dual
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
Executing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
Parsing: select count(*) from dual
Executing: select count(*) from dual
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11fc
7]
Parsing: select count(*) from dualWell, this seems to do the trick. We'll keep testing, but the errors have
now disappeared for all instances of this problem.
Thanks for the help!
JDB
"John Bauer" <[email protected]> wrote in message
news:[email protected]...
We'll try this, but it seems to be connection-oriented. If we have a pool
of 5 connections, and an exception happens, only that connection seems tobe
affected. The other connections in the pool work fine, and the proc works
for those connections.
"Joseph Weinstein" <[email protected]> wrote in message
news:[email protected]...
Hi.
The issue is likely related to our caching of PreparedStatements
for performance. If some DBMS failure occurs which could invalidate
a PreparedStatement/cursor such that it could never be re-used,
even after clearParameters) are called etc, then this case might
occur. Please take the attached jar file, and add it to the
weblogic.classpath ahead of the standard weblogic stuff, by
editing your startWebLogic script. This will turn off caching, and
should make the problem go away. Let me know...
Joe
John Bauer wrote:
Here is our configuration.
weblogic.jdbc.connectionPool.CifPool=\
url=jdbc20:weblogic:oracle:QCIF,\
driver=weblogic.jdbc20.oci.Driver,\
loginDelaySecs=1,\
initialCapacity=5,\
maxCapacity=20,\
capacityIncrement=2,\
allowShrinking=true,\
shrinkPeriodMins=30,\
testTable=dual,\
testConnsOnRelease=true,\
props=user=BMGR;password=djr0t$
We are using OCI 8.1.6
"Maria Salzberger" <[email protected]> wrote in message
news:[email protected]...
Hi John,
I have researched about this - but could not find a known issue
which
may
be
related to this.
Which JDBC driver are you using?
Kind Regards
Maria Salzberger
Developer Relations Engineer
BEA Customer Support
John Bauer schrieb in Nachricht <[email protected]>...
We are experiencing a strange error when calling a stored procedure
using
a
connection pool (WLS 5.1 SP10, Oracle 8). Everything works fine
until
the
stored procedure raises a user-defined exception. When the
connection is
used again, we get the 03113 error. It appears that the connectionis OK
due to the testConnsOnReserve not returning an error, but on the
next
stored
procedure call, the error happens. The database guys have no
answers.
Does
anyone have a clue?
Here is an ouput log showing what happens (this was done with a
pool
with
only one connection):
Got the exception for no BPI Record
getConnection returningdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
:5,
:6,
:7, :8); end;
SQLException: SQLState() vendor code(20003)
java.sql.SQLException: ORA-20003: Error at step- Select..,procedure
p_getBPITrckIdForDataTblPk No BPI Record Found...
ORA-01403: no data found
ORA-06512: at "CIFPROC.PKG_UTIL", line 381
ORA-06512: at "CIFPROC.PKG_BPI", line 901
ORA-06512: at line 1
at
weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
atweblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
Compiled Code)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
Code)
at
weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
Compiled Code)
atcom.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
s
.java, Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
t
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
Code)
Release test worked!
Parsing: select count(*) from dual
Executing: select count(*) from dual
Obtain the connection again
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Reserve test worked!
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Calling stored proc and get comm error
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
:5,
:6,
:7, :8); end;
SQLException: SQLState() vendor code(3113)
java.sql.SQLException: ORA-03113: end-of-file on communication
channel
atweblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
atweblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java,
Compiled Code)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
Code)
at
weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java,
Compiled Code)
atcom.juniper.core.comm.JDBCProcHelper.execute(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
s
.java, Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
t
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
Code)
Release test fails!
Parsing: select count(*) from dual
SQLException: SQLState() vendor code(3114)
java.sql.SQLException: ORA-03114: not connected to ORACLE
atweblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.execute(Statement.java,Compiled
Code)
at
weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java,
Compiled Code)
atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
atweblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
Compiled Code)
at weblogic.jdbcbase.pool.Connection.close(Connection.java,Compiled
Code)
at
com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.j
a
va, Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
s
.java, Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
t
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
Code)
Regenerating connection
DriverManager.getDriver("jdbc20:weblogic:oracle:DCIF")
tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
trying
driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d
1
fcf]
getDriver returning
driver[className=weblogic.jdbc20.oci.Driver,weblogic.jdbc20.oci.Driver@d63d
1
fcf]
weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
Connecting to database using: bmgr/********@DCIF at 0
SQLException: SQLState() vendor code(1012)
java.sql.SQLException: ORA-01012: not logged on -
(bmgr/********@DCIF)
atweblogic.db.oci.OciConnection.getLDAException(OciConnection.java:143)
at weblogic.jdbcbase.oci.Driver.connect(Driver.java:157)
atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connectio
n
EnvFactory.java:153)
at
weblogic.jdbc.common.internal.ConnectionEnvFactory.refreshResource(Connecti
o
nEnvFactory.java:207)
at
weblogic.jdbc.common.internal.ConnectionEnv.refresh(ConnectionEnv.java:677)
atweblogic.common.internal.ResourceAllocator.resetThisOne(ResourceAllocator.j
a
va, Compiled Code)
at
weblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
atweblogic.common.internal.ResourceAllocator.release(ResourceAllocator.java,
Compiled Code)
atweblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java,
Compiled Code)
at weblogic.jdbcbase.pool.Connection.close(Connection.java,Compiled
Code)
at
com.juniper.core.comm.JDBCProcHelper.closeConnection(JDBCProcHelper.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.closeConnection(BusinessProcess.j
a
va, Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.loadByKey(BusinessProcess.java,
Compiled Code)
at
com.juniper.core.tracking.BusinessProcess.findProcessByKey(BusinessProcess.
j
ava, Compiled Code)
at
com.juniper.core.tracking.test.TestBusinessProcess.doGet(TestBusinessProces
s
.java, Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:865)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextIm
p
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContex
t
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:380)
atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:268)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
Code)
weblogic.jdbcbase.oci.Driver checking: jdbc20:weblogic:oracle:DCIF
Connecting to database using: bmgr/********@DCIF at 0
Connected to database at: 160
Parsing: select length(SYSDATE) from dual
Executing: select length(SYSDATE) from dual
Parsing: select VALUE from V$NLS_PARAMETERS where
PARAMETER='NLS_NUMERIC_CHARACTERS'
Executing: select VALUE from V$NLS_PARAMETERS where
PARAMETER='NLS_NUMERIC_CHARACTERS'
Done logging in at: 170
Connection: using OCI API: OCI8
Done with connection regen
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
tryingdriver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,
:5,
:6,
:7, :8); end;
Executing: begin pkg_BPI.p_getBPITrckIdForDataTblPk(:1, :2, :3, :4,:5,
:6,
:7, :8); end;
Parsing: select count(*) from dual
Executing: select count(*) from dual
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: select count(*) from dual
Executing: select count(*) from dual
getConnection returning
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
Executing: begin pkg_BPI.p_getBPIStates(:1, :2); end;
Parsing: select count(*) from dual
Executing: select count(*) from dual
DriverManager.getConnection("jdbc:weblogic:pool:CifPool")
trying
driver[className=weblogic.jdbc.pool.Driver,weblogic.jdbc.pool.Driver@d6b11f
c
7]
Parsing: select count(*) from dual
B.E.A. is now hiring! (12/14/01) If interested send a resume to
[email protected]
DIRECTOR OF PRODUCT PLANS AND STRATEGY San Francisco,
CA
E-SALES BUSINESS DEVELOPMENT REPRESENTATIVE Dallas, TX
SOFTWARE ENGINEER (DBA) Liberty Corner,NJ
SENIOR WEB DEVELOPER San Jose, CA
SOFTWARE ENGINEER (ALL LEVELS), CARY, NORTHCAROLINA San Jose, CA
SR. PRODUCT MANAGER Bellevue, WA
SR. WEB DESIGNER San Jose, CA
Channel Marketing Manager - EMEA Region London, GBR
DIRECTOR OF MARKETING STRATEGY, APPLICATION SERVERS San Jose, CA
SENIOR SOFTWARE ENGINEER (PLATFORM) San Jose, CA
E-COMMERCE INTEGRATION ARCHITECT San Jose, CA
QUALITY ASSURANCE ENGINEER Redmond, WA
Services Development Manager (Business Development Manager - Services)Paris, FRA; Munich, DEU
SENIOR SOFTWARE ENGINEER (PLATFORM) Redmond, WA
E-Marketing Programs Specialist EMEA London, GBR
BUSINESS DEVELOPMENT DIRECTOR - E COMMERCE INTEGRATION San Jose, CA
MANAGER, E-SALES Plano, TX -
Calling stored proc (with 2 IN and 3 OUT) - from SQL Plus
This is the signature of my stored proc:
CREATE OR REPLACE PROCEDURE myschema.myproc
p_usr_name IN VARCHAR2,
p_send_tmstmp IN DATE,
p_ret_value OUT NUMBER,
p_err_code OUT VARCHAR2
)If I need to call it from sql plus, how do I need to pass the arg?
This is what I am doing
execute myschema.myproc('abc123','02-MAY-2008');
What is wrong here? If someone could help. Thx!Try something like this
var usr_name varchar2(30)
var send_tmstmp varchar2(11)
var ret_value number
var err_code varchar2(10)
begin
:usr_name := 'abc123';
:usr_name := '02-MAY-2008';
myschema.myproc ( p_usr_name => :usr_name,
p_send_tmstmp => TO_DATE( :usr_name, 'DD-MON-YYYY' ),
p_ret_value => :ret_value,
p_err_code => :err_code);
end;
print ret_value;
print err_code; -
Using Stored Proc with CMP - Possible?
Is it possible for me to use a stored proc for my CMP bean instead of the usual inline SQL?
sorry, I mean for the ID field.
-
** How to use TO_DATE function in Stored Proc. for JDBC in ABAP-XSL mapping
Hi friends,
I use ABAP-XSL mapping to insert records in Oracle table. My Sender is File and receiver is JDBC. We use Oracle 10g database. All fields in table are VARCHAR2 except one field; this is having type 'DATE'.
I use Stored procedure to update the records in table. I have converted my string into date using the Oracle TO_DATE function. But, when I use this format, it throws an error in the Receiver CC. (But, the message is processed successfully in SXMB_MONI).
The input format I formed like below:
<X_EMP_START_DT hasQuot="No" isInput="1" type="DATE">
Value in Payload is like below.
<X_EMP_START_DT hasQuot="No" isInput="1" type="DATE">TO_DATE('18-11-1991','DD-MM-YYYY')</X_EMP_START_DT>
Error in CC comes as below:
Error processing request in sax parser: Error when executing statement for table/stored proc. 'SP_EMP_DETAILS' (structure 'STATEMENT'): java.lang.NumberFormatException: For input string: "TO_DATE('18"
Friends, I have tried, but unable to find the correct solution to insert.
Kindly help me to solve this issue.
Kind Regards,
Jegathees P.
(But, the same is working fine if we use direct method in ABAP-XSL ie. not thru Stored Procedure)Hi Sinha,
Thanks for your reply.
I used the syntax
<xsl:call-template name="date:format-date">
<xsl:with-param name="date-time" select="string" />
<xsl:with-param name="pattern" select="string" />
</xsl:call-template>
in my Abap XSL. But, its not working correctly. The problem is 'href' function to import "date.xsl" in my XSLT is not able to do that. The system throws an error. Moreover, it is not able to write the command 'extension-element-prefixes' in my <xsl:stylesheet namespace>
May be I am not able to understand how to use this.
Anyway, I solved this problem by handling date conversion inside Oracle Stored Procedure. Now, its working fine.
Thank you.
Maybe you are looking for
-
IPhoto 11 window won't open, only have full screen view
After I upgraded, the iphoto window would not come up. The menu bar at the top is active, and I am able to access my photos from Full Screen View. But when I toggle back, and close full screen, everything closes... Any suggestions? Thank you!
-
Acrobat 9 hangs with multiple documents open
HP pro 6200 4 G RAM, Win7Pro, Acrobat 9(fully updated), single computer affected, multiple users, documents are from C drive, network, and USB I've run a repair install, removed the popups/lines and other markup notifications, held shift down when st
-
I save a document into my iPhone 6's pdf reader, such as a pages, word, excel doc Sometimes the phone numbers are highlighted, so that I can call the number just by touching that number. Other times the phone numbers are not "live." How do I make
-
I have the same issue in SharePoint 2013. The following link is for SharePoint 2010. Site Master Page is ignored on team site with publishing feature enabled http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d84dfe2d-4ae2-4aa7-a1be-541280d8b46
-
Serial interfaces, ip vrf forwarding, and PBR with set vrf
I am doing some work with VRF-lite but I am having some trouble with serial interfaces. I have a PE router with a serial interface where I want to take incoming traffic and using policy-based routing send the traffic to the appropriate VRF. I want to