Exceptions in stored procedure
Hello,
Consider a situation where a java class is executing a PL/SQL stored procedure. What happens if an error occurs in a stored procedure. Its obvious that the error is converted into SQLException in Java, and this is taken care of JDBC drivers.
Is there a case where any kind of exception is not converted into SQLException or is ignored by the JDBC driver? and..
Is it a good practice to handle Exceptions both in PL/SQL stored procedures and in Java?
or
Is it enough to handle just in Java?
Thanks
-Rao
Thanks damorgan,
I understand how exceptions work, but my question is specifially about how exception has to be defined when there are 2 "begins" in the procedure and the exception is caught in the internal begin. to elaborate of What I am tring to say, consider this
procedure finderror is
BEGIN
no_emp_found EXCEPTION;
begin
(SOME SELECT STATEMENT)
WHEN NO_DATA_FOUND THEN
RAISE no_emp_found
end;
EXCEPTION
WHEN no_emp_found
dbms.putline ('CAUGHT IT')
end finderror;
will the above code work, I mean conceptually (ignore the syntax). Or do I have to define the following part inside the internal (begin...end)
EXCEPTION
WHEN no_emp_found
dbms.putline ('CAUGHT IT')
Thanks
Similar Messages
-
How to retrieve exception in stored procedure via JDBC?
Hi all,
In many cases, my JDBC call to stored procedure returns sucessfully without any SQLException, but the operations failed due to exception within the stored procedure (eg multiple rows returned for SELECT INTO).
I can see these exception when running interactive in SQLPlus, but JDBC doesn't throw them.
So does anyone know how to track these exception in stored procedure?
Many thanks.Is your stored procedure catching these exceptions? If so, it may be failing to re-throw them.
Justin -
Handle user defined exception in stored procedure
Dear all,
I'm using JDev 11.1.1.4.0
In my application I'm calling the stored procedure with only in parameters using the Example 37-9 http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcadvgen.htm#ADFFD1056
In my stored procedure I have user defined exception, like:
create or replace procedure ...
AS
e_otwarty EXCEPTION;
//some code
EXCEPTION
WHEN e_otwarty THEN
dbms_output.put_line('Masz juz otwarty raport');
// or what should I do here ??
END;I want to display the message in the popup window in my ADF application. How can I do that ?
Regards,
Wojtek.raise_application_error(-20001, 'error message');
Scott -
Stored Procedure parameter (@Carrier) used in report and can't be set via code
I have a report that has regular Crystal parameters that I am setting correctly via code. However, one report actually uses one of the database parameters from the stored procedure that the report was created from. It is the only report like this and I'm using the same code in an attempt to set it's value. Although no error is thown, if I look at the parameter value in the IDE it is set correctly, but the field on the report just shows up blank. I have changed the way the report is created. Previously, I used the report.export method to create the actual file via a stored procedure. Now, I'm running the stored procedure first and creating a datatable. This allows me to execute the SP only once to see if it has data, because only then do I want to create the actual report. I'm using the SetDataSource method to pass the datatable into Crystal and then using the report.export method to create the report with data. Everything seems to work, except this stored procedure parameter (@Carrier) is not actually being populated to display on the report.
Not sure what to look at. Any suggestions?
Thanks.crpe32.dll is version 13.0.5.891. This was developed in VS2012 and VB.NET. I'm using ADO.Net to connect to a MS SQL Server database.
MainReport.SetDataSource(DTbl)
bRC = PopulateAllSubReports(MainReport)
If Not bRC Then Throw New Exception("Received an error in PopulateAllSubReports.")
bRC = PopulateCrystalParameters(MainReport, SP)
If Not bRC Then Throw New Exception("Received an error in PopulateCrystalParameters.")
'Actually create the output file.
bRC = ExportData(MainReport)
Private Function PopulateCrystalParameters(myReportDocument As ReportDocument, SP As ReportStoredProcedureCrystal) As Boolean
Dim myParameterFieldDefinitions As ParameterFieldDefinitions = Nothing
Dim myParameterFieldDefinition As ParameterFieldDefinition = Nothing, ParamValue As String = ""
Dim bRC As Boolean, Param As SqlParameter = Nothing
Try
myParameterFieldDefinitions = myReportDocument.DataDefinition.ParameterFields
'*********************Report Parameters***************************
For Each myParameterFieldDefinition In myParameterFieldDefinitions
myParameterFieldDefinition.CurrentValues.Clear()
Select Case myParameterFieldDefinition.ParameterFieldName.Trim.ToUpper
Case "@CARRIER"
If SP.DBParameters.ContainsKey("@CARRIER") Then
Param = SP.DBParameters("@CARRIER")
ParamValue = NullS(Param.Value).Trim
bRC = SetCurrentValueForParameterField(myParameterFieldDefinition, ParamValue)
If Not bRC Then Return False
End If
End Select
Next
Return True
Catch ex As Exception
GmcLog.Error("ReportKey = " & Me.ReportKey.ToString & ", " & ex.Message, ex)
Return False
End Try
End Function
Private Function SetCurrentValueForParameterField(myParameterFieldDefinition As ParameterFieldDefinition, submittedValue As Object) As Boolean
Dim currentParameterValues As ParameterValues = Nothing
Dim myParameterDiscreteValue As ParameterDiscreteValue = Nothing
Try
myParameterDiscreteValue = New ParameterDiscreteValue
myParameterDiscreteValue.Value = NullS(submittedValue).Trim
currentParameterValues = New ParameterValues
currentParameterValues.Add(myParameterDiscreteValue)
myParameterFieldDefinition.ApplyCurrentValues(currentParameterValues)
Return True
Catch ex As Exception
GmcLog.Error("ReportKey = " & Me.ReportKey.ToString & ", " & ex.Message, ex)
Return False
Finally
myParameterDiscreteValue = Nothing
currentParameterValues = Nothing
End Try
End Function
Private Function SetDBSourceForSubReport(mySubReport As ReportDocument) As Boolean
Dim myTables As Tables = Nothing, myTable As Table = Nothing, DTbl As DataTable, SP As StoredProcedure = Nothing
Try
myTables = mySubReport.Database.Tables
For Each myTable In myTables
Dim SPName As String = myTable.Location.Substring(0, myTable.Location.IndexOf(";"c))
SP = New StoredProcedure(ConnectionString, SPName, CommandType.StoredProcedure)
DTbl = SP.FillTable
mySubReport.SetDataSource(DTbl)
SP = Nothing
Next
Return True
Catch ex As Exception
GmcLog.Error("ReportKey = " & Me.ReportKey.ToString & ", " & ex.Message, ex)
Return False
Finally
If Not SP Is Nothing Then SP = Nothing
If Not myTable Is Nothing Then myTable = Nothing
If Not myTables Is Nothing Then myTables = Nothing
End Try
End Function
Private Function PopulateAllSubReports(myReportDocument As ReportDocument) As Boolean
Try
Dim mySections As Sections = myReportDocument.ReportDefinition.Sections
For Each mySection As Section In mySections
Dim myReportObjects As ReportObjects = mySection.ReportObjects
For Each myReportObject As ReportObject In myReportObjects
If myReportObject.Kind = ReportObjectKind.SubreportObject Then
Dim mySubreportObject As SubreportObject = CType(myReportObject, SubreportObject)
Dim subReportDocument As ReportDocument = mySubreportObject.OpenSubreport(mySubreportObject.SubreportName)
Dim bRC = SetDBSourceForSubReport(subReportDocument)
If Not bRC Then Return False
End If
Next
Next
Return True
Catch ex As Exception
GmcLog.Error("ReportKey = " & Me.ReportKey.ToString & ", " & ex.Message, ex)
Return False
End Try
End Function -
File - to - JDBC- to - File Scenario using Stored Procedure
Hi,
I want to do File - to - JDBC - to - File scenario, because I'm getting data in a file format and that data i want to load in a database. Database level i have a stored procedure. if any exceptions. my stored procedure will give the Response. so, now i want to store that resposne in a file..
for this. what are the steps we have to use. is this scenario will comes in Synch ronous or Asynchronous ? and I have searched the web blogs also. al the blogs are related to Http or Soap with JDBC . so, please give me some input help about this...
how many data types we have to create... any body having step step procedure for this...
regards
JainHi,
You will need a BPM in your design as Sender File adapter does not support Synchronous messaging. Refer my answer in this thread (page 2) and have your design accordingly....instead of RFC you will have a file adapter as the ultimate receiver.
Re: BPM FILE--> JDBC--> RFC
Just take care of below things:
1) JDBC message format is as per the guidelines
[Message format for sending req to JDBC|http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm]
2) check for the format of your source and target file format (if it is a Flat-file with a xml structure that XI can parse then no need of FCC but if it is a CSV file then you will need FCC)
Regards,
Abhishek
Edited by: abhishek salvi on Apr 14, 2009 7:32 PM -
Oracle.DataAccess.Client stored procedure ORA-01403
Hello,
Microsoft announced that System.Data.OracleClient is deprecated and will be no more supported so I try to use the driver Oracle.DataAccess.Client after having installed ODP.
It works fine except for stored procedures.
After calling a stored procedure that increases a value in a column I meet this error :
ORA-01403: no data found
ORA-06512: at "XXXXX.MY_FUNCTION", line 15
ORA-06512: at line 1
Oracle Data Provider for .NET
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
The same function worked very well during several years with OracleClient !
Does any body has an idea ?
Best regards
AlanHello,
I had the solution by an other forum.
It's necessary to define the property BindByName at true.
The driver OracleClient did that by default not the driver DataAccess !
Best regards -
How to receive output of Stored Procedure in OSB as Sync Reply
Dear OSB Experts-
I need help for the following scenario as part of our requirements:
1. We have a OSB proxy Service which receives Input Msg from a JMS Queue, does validation and transformation of the message and publishes the transformed msg to a business service.
2. The Business Service uses the DB Adapter framework to call a Stored Proc.
Our requirement is to send the output of the stored procedure back to the OSB Service in a Sync Reply and subsequently the OSB service will do further processing.
Also in case of exceptions in stored procedure we need to catch it and send back the exact SQL Exception Msg to OSB.
However we are not able to figure out how do we capture and send the output of the stored procedure back to OSB.
Can someone please provide pointers on the same.
Thanks in advance for your inputs.
Regards,
DibyaHi Dibya,
Please refer -
Invoking Stored Procedure from OSB 10gR3
Above thread has discussed that how to call stored procedure from OSB. Do a service callout and in response variable you would receive the response from OSB. In stage error handler capture the error and do the required processing.
Regards,
Anuj -
An intermittently terminating stored procedure
If anyone has experience troubleshooting a stored procedure that intermittently terminates after partially progressing, please send things to check for. Essentially, a .NET application invokes the stored procedure and waits for completion -- except
the stored procedure appears to intermittently, abnormally terminate (judging by sp_who2 and intermediate event records inserted into a database table) and does not return an error to the application. I am in the process of ruling out the .NET application
as the cause. I have recreated the issue with SQL Server 2008 R2 Standard and SQL Server 2012 R2 Standard. I've reviewed the SQL Server Logs, doesn't appear to be any obviously related errors. The stored procedure creates temp tables in tempdb,
if that is relevant. I've looked into adjusting SQL Server advanced parameter Query Wait, but this should have undesirable side effects unfortunately. Do you recommend a SQL Server Profiler trace as a next troubleshooting step?I think a trace (Extended Events or Profiler) is a good next step in troubleshooting. If a T-SQL error occurs on the server side, it will bubble up to the .NET application as long as the connection is still there. However, the error could be hidden
behind result sets that are not consumed by the application. Check the app code to ensure results are fully processed.
Dan Guzman, SQL Server MVP, http://www.dbdelta.com -
Calling stored procedure from Java raises ORA-1722 exception
Hi,
As the title says, when I call the stored procedure from java I got the exception ORA-1722 (invalid number) but I've checked and rechecked my procedure on SQL-Developer and It's alright it works nice and clean !
What's happening? is there something I'm missing?
The way I call the stored procedure is:
public void execProcedure(String procedure) {
CallableStatement cs;
try {
cs = conn.prepareCall(procedure);
cs.execute();
} catch (SQLException ex) {
Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);
where
String procedure = "{call validateinfo}"I really need help on this, it's frustraiting me 'cause I need to finish a system but this little big problem is killing me ...
Thanks any advice is very welcome :)Thanks for your help. Haven't tested the SP with a DB access client... which one do you recommend to use?
The SP is the following:
create or replace
PROCEDURE validateInfo IS
var number;
BEGIN
UPDATE temp_desarrollo
SET status = '1';
COMMIT;
// Some string validations ...
//This one just checks if the value of "monto" is a number
//This update goes good
UPDATE temp_desarrollo tmp
SET cve_status = Decode(cve_status, NULL, '15', cve_status||',15')
WHERE IsNumber(tmp.monto) = 'F';
COMMIT;*/
//This one just checks if the value of "monto" is greater than 0
//if not, change de add to cve_status an errorValue
UPDATE temp_desarrollo tmp
SET cve_status = Decode(cve_status, NULL, '14', cve_status||',14')
WHERE (cve_status NOT LIKE '%15%' OR cve_status IS NULL)
AND to_number(tmp.monto) <= 0;
COMMIT;
//More string validations
EXCEPTION
WHEN OTHERS THEN
var := SQLCODE;
insert into excepciones values(to_char(var));
END;I've deleted much code from the SP since I know there's nothing to do with the excepcion, just that UPDATE statement is the one giving me the exception.
If those two UPDATES statements work with the same field (monto) why the first one is succeding and the second one not?
Cheers,
Federico
P.S. the "isNumber" function is as follows, just in case.
create or replace
function IsNumber(val1 varchar2) return varchar2 is
n number := null;
begin
n := to_number(val1,'9999999999999999.99');
return 'T';
exception
when others then
return 'F';
end; -
Exception in calling a stored procedure
Hi ,
i am calling a stored procedure using TopLink up on clicking a button from my jspx.
i got an exception at this statement
Result = (Integer)session.executeQuery(query,parameters);
and the exception is:
[TopLink Warning]: 2007.12.13 02:34:19.158--ClientSession(21746066)--Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 134:
PLS-00103: Encountered the symbol "[" when expecting one of the following:
. ( ) , * @ % & = - + < / > at in is mod not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like
between ||
The symbol ". was inserted before "[" to continue.
ORA-06550: line 1, column 172:
PLS-00103: Encountered the symbol "]" when expecting one of the following:
. ( ) , * @ % & - + / at mod rem <an exponent (**)> and or ||
The symbol "]" was ignored.
Error Code: 6550
Call:BEGIN APPS.XXUL_DAP_PKG.maint_err_inact_codes(i_action=>'U', i_flex_value_set_name=>'XXUL_DAP_ERROR_CODES_VS', i_code=>CoreOutputText[UIXFacesBeanImpl, id=outTextErrorCode], i_description=>'National Deviations', i_prog_comb_code=>'103', i_err_help_text=>NULL, i_enabled_flag=>'Y', i_summary_flag=>'N', i_commit=>'Y', i_user=>35454, o_error_code=>?, o_error_message=>?, io_flex_value_id=>?); END;
bind => [=> o_error_code, => o_error_message, 0 => io_flex_value_id]
Query:DataModifyQuery()
could someone suggest me a solution..
Thanks in anticipationThis looks like a sql syntax error.
Can you show the SQL you are trying to execute via toplink?
Is the stored procedure valid/compiled? Can you call it in SQLPlus or from the sql worksheet in jdeveloper?
Jeroen van Veldhuizen -
Invoke stored procedure cause strange exception
Hi, I'm using JDev 11.1.2, the use case is: add a new row to the VO iterator filtered by some view criteria and call a stored procedure before commit.
The application runs fine without calling the stored procedure, however, following exception will occur if it's called.
The stored procedure will do some update to a remote DB2 via DB link. Though the exception stack trace shows that the SP has error, but if I run it separately in some SQL tool, it is ok.
The "BO_SP" problem seems not to be caused by the 'new row state'.
Does any one have any tips for this problem? Thanks!
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Savepoint": SQL Statement "BO_SP".
at oracle.jbo.server.DBTransactionImpl.setSavepoint(DBTransactionImpl.java:3184)
at oracle.jbo.server.DBTransactionImpl.saveTmpPostState(DBTransactionImpl.java:1791)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2065)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2352)
at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1590)
at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1415)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1428)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2169)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at oracle.adf.controller.internal.util.ELInterfaceImpl.invokeMethod(ELInterfaceImpl.java:173)
at oracle.adfinternal.controller.activity.MethodCallActivityLogic.execute(MethodCallActivityLogic.java:163)
at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1035)
at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:926)
at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:824)
at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:554)
at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:158)
at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:115)
at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:84)
at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:50)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
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:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
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)
Caused by: java.sql.SQLException: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]ILLEGAL SYMBOL <END-OF-STATEMENT>; VALID SYMBOLS ARE ON UNIQUE. {42000,NativeErr = -104}[Oracle][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]EXECUTE STATEMENT DOES NOT IDENTIFY A VALID PREPARED STATEMENT. *N {HY000,NativeErr = -518}
ORA-02063: preceding 2 lines from TGBPSU
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1079)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1466)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
at oracle.jbo.server.OracleSQLBuilderImpl.setSavepoint(OracleSQLBuilderImpl.java:1548)
at oracle.jbo.server.DBTransactionImpl.setSavepoint(DBTransactionImpl.java:3172)
... 83 more
Edited by: codeplay on Oct 17, 2011 5:17 PMLook like the calling of the other DB is the root of your problem:
Caused by: java.sql.SQLException: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:[Oracle][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]ILLEGAL SYMBOL <END-OF-STATEMENT>; VALID SYMBOLS ARE ON UNIQUE. {42000,NativeErr = -104}[Oracle][ODBC DB2 Wire Protocol driver][UDB DB2 for iSeries and AS/400]EXECUTE STATEMENT DOES NOT IDENTIFY A VALID PREPARED STATEMENT. *N {HY000,NativeErr = -518}
ORA-02063: preceding 2 lines from TGBPSU
>
Test your app with -Djbo.debugoutoup=console as a java option, this will generate lots of output but you may see the actual sql passed to the db.
Where and how do you call the SP?
Timo -
Getting exception whil calling an oracle stored procedure from java program
Dear All,
I encounter this error in my application when I call only the stored procedure but the view is executing fine from the application and my environment is as follow:
Java 1.4
oracle 10g
oracle jdbc driver:9.2.0.8.0
websphere portal 6.0.0.1
this error is occur from time to time randomly, when it happens, the only workaround is to restart the server..Does anyone have any idea about this error?
Unable to execute stored Procedure in Method
java.lang.NullPointerException
at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java(Compiled Code))
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1140)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java(Compiled Code))
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java(Compiled Code))
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3606)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:5267)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:632)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:427)
And sometime I am getting this exception
Unable to execute stored Procedure in Method
java.lang.ArrayIndexOutOfBoundsException: 27787320
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java(Compiled Code))
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1134)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java(Compiled Code))
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java(Compiled Code))
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3606)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:5267)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:632)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:427)
Thanks
Jayspacetorrent escribió:
for (int x=0; x <result.size(); x++){
System.out.println(result.get(x));
I can't do this, because result object is a Map, and I need write the Key of the Value to obtain.
So I can do:
result.get("res");And I odtain a *$Proxy3* Object -
Exceptions in a stored procedure
Hi
I am writing a stored procedure and I am running a select statement. On NO_DATA_FOUND exception, I want to raise another exception called NO_EMP_FOUND. Question is where in the stored procedure I have to define this. Remember that the select statement is within a BEGIN and END
begin
no_emp_found exception;
Begin
select a,b INTO d,c
FROM BLABLA
WHERE BLA = BLA;
EXCEPTION
WHEN NO_DATA_FOUND
RAISE NO_EMP_FOUND;
END;
<<is this where I can define the NO_EMP_FOUND, or it has to be within the internal begin and end??>>
END;
ThanksThanks damorgan,
I understand how exceptions work, but my question is specifially about how exception has to be defined when there are 2 "begins" in the procedure and the exception is caught in the internal begin. to elaborate of What I am tring to say, consider this
procedure finderror is
BEGIN
no_emp_found EXCEPTION;
begin
(SOME SELECT STATEMENT)
WHEN NO_DATA_FOUND THEN
RAISE no_emp_found
end;
EXCEPTION
WHEN no_emp_found
dbms.putline ('CAUGHT IT')
end finderror;
will the above code work, I mean conceptually (ignore the syntax). Or do I have to define the following part inside the internal (begin...end)
EXCEPTION
WHEN no_emp_found
dbms.putline ('CAUGHT IT')
Thanks -
"user defined exception" in a stored procedure and APEX
I would like to use user defined exception in a stored procedure or trigger in a APEX application.
Does anybody know how to do it ? or know where can I find a good reference ?
Thanks,raise_application_error(-20001, 'error message');
Scott -
Exception handling in a stored procedure
Hello,
I have a stored procedure with one IN parameter that insert values in a table as a treatment ,and i have to define an exception that raise when the same row is inserted several times (the row should be inserted one time).
do you have any idea of what is the request that should i write to do that (verify the existence of a row)??
PS : I'm just a beginner in PL/SQL
Regards,
ACok i have the following stored procedure calculer(p_duration_modifiee IN NUMBER ) that fill the table entrepot with data after a specific treatment in function of the stored procedure parameter of course.
the problem is the call of calculer(0.64) should be one time,because if we call it again with 0.64 the table entrepot will have two same raws which is not good for my application.
The question is how should raise the exception in order to have the following error message for example (row already exists,please enter a new parameter)
i wish it is more clear
Maybe you are looking for
-
Possible to use the MBP display for use with XBOX 360 through DVI port?
Hi everyone, I know that the topic sounds ludicrous to probably a lot of you. After all, how dare a Mac user use a Microsoft machine right ;)? Well, truth be told, I like the 360 and that's the only MS product I prefer to use. Anyway, I'm going to be
-
[SOLVED] Amarok 2 make fails
Hi, I'm trying to install Amarok 2 via yaourt with this package: http://aur.archlinux.org/packages.php?ID=19633 However, it fails with several errors. I've done some searching, but I can't find any solution that's helpful to me/one I understand (st
-
How to send User Master Data through XI
Dear SAP gurus, We are currently configuring the e-recruiting module on a separate server than HR (following the SAP standard). As our CUA is not connected to the E-REC systems, we are looking for a way to send properly the User Master Data from HR
-
BAPI to post stock movement in QM's Usage Decision
I'm looking for a bapi or standard program to register stock movements in QM as a result of a usage decision. We've tried using BAPI_GOODSMVT_CREATE with no success as it returns error QA 495 "Change the inspection stock of material in QM only" Thank
-
Playcount and Smart Playlist problem
Can someone explain what I consider strange behavior on the part of iTunes syncing? I have noticed it with my old 3rd gen iPod, my iPhone, and now my new new Nano. Here's what happens: 1) I have smart playlists set up for each my podcasts, so that th