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 PM
Look 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
Similar Messages
-
XSQL: how to invoke stored procedure from XSQL
Any one has example on how to invoke stored procedure within XSQL with associated *.xsl? What the syntax looks like? Thanks.
If you want to simply invoke a stored procedure, use:
<xsql:dml>
begin
proc(args);
end;
</xsql:dml>
If you want to return XML that your stored procedure "prints" to the OWA page buffer, then use:
<xsql:include-owa>
If you want to invoke a stored function that returns a REF CURSOR function, then use <xsql:ref-cursor-function>
null -
Siebel analytics(Invoking Stored Procedure)
Hi all,
I am using Siebel Analytics(7.8.2) and am a new bee to this.
I have invoked stored procedure from Siebel Administration but is it possible to do the same from Siebel web analytics?. I have a report where on clicking on a link/button i want to invoke a stored procedure.
Thanks in advance
Dhrubo...Hi,
create java impl class of application module by going to java tab
and refer following code
public Connection getCurrentConnection() {
Statement st = null;
try {
st = getDBTransaction().createStatement(0);
return st.getConnection();
} catch (SQLException s) {
s.printStackTrace();
return null;
} finally {
if (st != null)
try {
st.close();
} catch (SQLException s2) {
public void callP(){
Connection conn = getCurrentConnection();
CallableStatement cs = null;
String stmt = "xx.xx(?,?,?,?,?,?,?)"; // ? depends on number of parametrers of procedure
try {
cs = conn.prepareCall("begin " + stmt + "; end;");
cs.setObject("parameterName", "some Value");
cs.execute();
} catch (SQLException e) {
throw new JboException(e);
} finally {
if (cs != null) {
try {
cs.close();
} catch (SQLException e) {
calling oracle stored procedure in java
Hope this helps
Edited by: Santosh Vaza on Apr 25, 2012 12:07 PM -
Error while invoking stored procedure from BPEL process
Hi Folks,
I am facing the below mentioned issue while invoking a stored procedure in BPEL process :
I am trying to invoke a stored procedure from a BPEL process. The process runs fine for the first/second time, but gives the below error after that whenever i try to run the process :
file:/oracle/orasoa/bpel/domains/default/tmp/.bpel_ProvisionOrderASAPReqABCSImpl_1.0_50dd1595129e9bbb00560e31e7c18cef.tmp/DB_CALL_GetPendingSubscriptionProc.wsdl [ DB_CALL_GetPendingSubscriptionProc_ptt::DB_CALL_GetPendingSubscriptionProc(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'DB_CALL_GetPendingSubscriptionProc' failed due to: Error while trying to prepare and execute an API.
An error occurred while preparing and executing the PROC_GET_PENDING_SUBSCR API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
; nested exception is:
ORABPEL-11811
Error while trying to prepare and execute an API.
An error occurred while preparing and executing the PROC_GET_PENDING_SUBSCR API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
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.
I am not getting how the BPEL is referring to the DB wsdl from the tmp folder. To resolve this issue, we have to stop the SOA server, delete the tmp files, and restart the server.
Any pointers in this regard will be really helpful.First of all does this scenario occur again.
"Works first/second time. Later gives this error."
After you restart the SOA server are you able to reproduce this scenario?
As already pointed out and from the error message, database connection is reset.
If you find this error again, try this out.
em -> home / oc4j_soa -> Administration -> JDBC Resources
Use the "Test Connection" option for the Connection Pool that you are using for your database JNDI.
It comes back and say "Connection to "XYZCP" established successfully." it is good to use.
Run the BPEL process again and once you find the error, come back and test the connection.
If it comes back with Error, diagnose based on the error message received.
Cheers
Kalidass Mookkaiah
http://oraclebpelindepth.blogspot.com/ -
ESB throwing error when invoking Stored Procedure
Hi there,
I'm using SOA Suite 10.1.3.4. I have an ESB service which stores orders from a IBM Maximo system(Procurement system) into Oracle database using stored procedure. I can insert the orders through the endpoint URL using the test client provided by SOA Suite ESB console. But when Maximo sends the orders i'm getting errors as below. I can also see that the input is null when called the procedure. But in the instance of the ESB Console i can see the Payload sent by the Maximo system. Not sure where and why the payload disappears before calling the stored procedure.
I have been battling on this for couple of days. Any help on this is much appreciated.
<2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> client acquired
<2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> acquire unit of work: 25523441
<2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.TopLinkLogger log> TX beginTransaction, status=STATUS_ACTIVE
<2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.sp.AbstractStoredProcedure execute> BEGIN APSEZ.APS_MAXIMO_INTERFACE.APS_RECIEVE_POV(I_PO_IN_OBJ=>?); END;
<2009-01-09 11:21:12,003> <DEBUG> <default.collaxa.cube.ws> <Database Adapter::Outbound> <oracle.tip.adapter.db.sp.AbstractStoredProcedure execute> Bindings [I_PO_IN_OBJ=>APSEZ.GET_PO_IN_OBJ(null)]
ORABPEL-11811
Error while trying to prepare and execute an API.
An error occurred while preparing and executing the APSEZ.APS_MAXIMO_INTERFACE.APS_RECIEVE_POV API. Cause: java.sql.SQLException: ORA-06531: Reference to uninitialized collection
ORA-06512: at "APSEZ.APS_MAXIMO_INTERFACE", line 52
ORA-06512: at line 1
[Caused by: ORA-06531: Reference to uninitialized collection
ORA-06512: at "APSEZ.APS_MAXIMO_INTERFACE", line 52
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.
at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:469)
at oracle.tip.adapter.db.sp.SPUtil.createResourceException(SPUtil.java:172)
at oracle.tip.adapter.db.sp.AbstractStoredProcedure.execute(AbstractStoredProcedure.java:116)
at oracle.tip.adapter.db.sp.SPInteraction.executeStoredProcedure(SPInteraction.java:134)
at oracle.tip.adapter.db.DBInteraction.executeStoredProcedure(DBInteraction.java:1014)
at oracle.tip.adapter.db.DBInteraction.execute(DBInteraction.java:232)
at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeRequestResponseOperation(WSIFOperation_JCA.java:486)
at oracle.tip.adapter.fw.wsif.jca.WSIFOperation_JCA.executeInputOnlyOperation(WSIFOperation_JCA.java:739)
at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:894)
at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:810)
at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:832)
at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:223)
at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:135)
at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:406)
at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:164)
at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1988)
at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1467)
at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:205)
at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:136)
at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:309)
at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispatcher.java:138)
at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscription(InitialEventDispatcher.java:545)
at oracle.tip.esb.server.dispatch.InitialEventDispatcher.processSubscriptions(InitialEventDispatcher.java:527)
at oracle.tip.esb.server.dispatch.EventDispatcher.dispatchRoutingService(EventDispatcher.java:94)
at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:160)
at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1988)
at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1467)
at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.raiseEvent(EventOracleSoapProvider.java:399)
at oracle.tip.esb.server.service.impl.soap.EventOracleSoapProvider.processMessage(EventOracleSoapProvider.java:225)
at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:956)
at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:349)
at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:466)
at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:114)
at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:96)
at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:194)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Thanks
DhilipI doubt JPublisher has anything to do with this issue as JDeveloper is the tool used for SOA Development. The issue here is with the process that gets invoked by maximo. It is not populating the data correctly, and nulls are being sent to the adapter. When nulls are sent this causes issues in the code because it cannot initilise varrays in the stored procedure.
Therefore the fix is to sort this issue out is to stop it sending nulls, if nulls are valid form the maximo system then the stored procedure needs to manage these. This can be done by setting defaults for the inputs.
cheers
James -
Error while invoking Stored Procedure.
Hi,
I am trying to invoke a stored procedure which has one input parameter and 3 output parameters. In the procedure, I am selecting 3 columns from a table based on the input parameter. I have generated a WSDL from database, along with wsdl an xsd has been created. I have used this WSDL in creating partner link on the target side. For source side partner link, I have created WSDL based on the xsd which is created from database. I have deployed this BPEL process and when I try to debug the flow it is failing while invoking the stored procedure I am getting below soap fault.
{color:#3366ff}<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="{color}{color:#3366ff}" xmlns:xsd="{color}{color:#3366ff}" xmlns:xsi="{color}{color:#3366ff}" xsi:schemaLocation="{color}{color:#3366ff} {color}{color:#3366ff}">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xmlns="">SOAP-ENV:Server</faultcode>
<faultstring xmlns="">BPCOR-6135:A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is <?xml version="1.0&;quot; encoding="UTF-8"?><jbi:message xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" type="sxeh:faultMessage" version="1.0&;quot; xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part>Error occured while executing SQL.call GETRESULTS(?,?,?,?) Reason: Unable to convert normalized message content to Procedure, Error occured during populating Procedure.Reason: Parameter Type Conflict: sqlType=12 SQLState: null ErrorCode:17012</jbi:part></jbi:message>. Sending errors for the pending requests in the process scope before terminating the process instance</faultstring>
<faultactor xmlns="">sun-bpel-engine</faultactor>
<detail xmlns="">
<detailText>BPCOR-6135:A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is <?xml version="1.0&;quot; encoding="UTF-8"?><jbi:message xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" type="sxeh:faultMessage" version="1.0&;quot; xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part>Error occured while executing SQL.call GETRESULTS(?,?,?,?) Reason: Unable to convert normalized message content to Procedure, Error occured during populating Procedure.Reason: Parameter Type Conflict: sqlType=12 SQLState: null ErrorCode:17012</jbi:part></jbi:message>. Sending errors for the pending requests in the process scope before terminating the process instance
Caused by: BPCOR-6131:An Error status was received while doing an invoke (partnerLink=StoreProc, portType={http://j2ee.netbeans.org/wsdl/Storedproc}jdbcPortType, operation=execute)
BPCOR-6129:Line Number is 30
BPCOR-6130:Activity Name is Invoke1
Caused by: Error occured while executing SQL.call GETRESULTS(?,?,?,?) Reason: Unable to convert normalized message content to Procedure, Error occured during populating Procedure.Reason: Parameter Type Conflict: sqlType=12 SQLState: null ErrorCode:17012
Caused by: Unable to convert normalized message content to Procedure, Error occured during populating Procedure.Reason: Parameter Type Conflict: sqlType=12 SQLState: null ErrorCode:17012
Caused by: Parameter Type Conflict: sqlType=12</detailText>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
{color:#000000}Plz help me to fix this issue.
Thanks,
Srinivas{color}{color}First of all does this scenario occur again.
"Works first/second time. Later gives this error."
After you restart the SOA server are you able to reproduce this scenario?
As already pointed out and from the error message, database connection is reset.
If you find this error again, try this out.
em -> home / oc4j_soa -> Administration -> JDBC Resources
Use the "Test Connection" option for the Connection Pool that you are using for your database JNDI.
It comes back and say "Connection to "XYZCP" established successfully." it is good to use.
Run the BPEL process again and once you find the error, come back and test the connection.
If it comes back with Error, diagnose based on the error message received.
Cheers
Kalidass Mookkaiah
http://oraclebpelindepth.blogspot.com/ -
WL 6.0 using MS SQL Server 2000 - Transaction timeout when invoking stored procedure
Hi,
Facing a problem on WL6.0. We are connecting to MS SQL server 2000 using a stateless
session bean
using container managed transaction. The bean method does a few updates to the
database and also
calls a stored procedure that generates primary keys many times. This stored procedure
(SP) is running
in a transaction of its own since it has to increment a counter, update the database
and then return the
primary key.The primary key generator SP is working fine and does not lock the
database in many bean
methods.
In some methods we find that the primary key generator SP has locked the database.
We
then see a lock on the database created due to this SP in the MS SQL client. The
execution goes
into the SP and gets stuck there till the bean's transaction times out. The error
message given is
...... .. Exception Message - The transaction is no longer active
(status = Rolling Back. [Reason = weblogic.transaction.internal.TimedOutExcepti
on: Transaction timed out after 31seconds
tx = transaction=(IdHash=1746718,Name = [EJB StructMgrBeanImpl.addStructure()],X
id=10908:51e67e9d7185816a,Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=
0,seconds since begin=31,seconds left=30,activeThread=Thread[ExecuteThread: '7'
for queue: 'default',5,Thread Group for Queue: 'default'],ServerResourceInfo[web
logic.jdbc.jts.Connection]=(state=started,assigned=none),SCInfo[myserver]=(state
=active),properties=({weblogic.transaction.name=[EJB StructMgrBeanImpl.addStruct
ure()], weblogic.jdbc=t3://10.200.15.136:7001}))]). No further JDBC access is
al
lowed within this transaction.
What could be the potential problems in the method's code/SP that could be causing
the timeout?
Anyone faced similar problems?
Thanks in advance,
SreejaHi,
Facing a problem on WL6.0. We are connecting to MS SQL server 2000 using a stateless
session bean
using container managed transaction. The bean method does a few updates to the
database and also
calls a stored procedure that generates primary keys many times. This stored procedure
(SP) is running
in a transaction of its own since it has to increment a counter, update the database
and then return the
primary key.The primary key generator SP is working fine and does not lock the
database in many bean
methods.
In some methods we find that the primary key generator SP has locked the database.
We
then see a lock on the database created due to this SP in the MS SQL client. The
execution goes
into the SP and gets stuck there till the bean's transaction times out. The error
message given is
...... .. Exception Message - The transaction is no longer active
(status = Rolling Back. [Reason = weblogic.transaction.internal.TimedOutExcepti
on: Transaction timed out after 31seconds
tx = transaction=(IdHash=1746718,Name = [EJB StructMgrBeanImpl.addStructure()],X
id=10908:51e67e9d7185816a,Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=
0,seconds since begin=31,seconds left=30,activeThread=Thread[ExecuteThread: '7'
for queue: 'default',5,Thread Group for Queue: 'default'],ServerResourceInfo[web
logic.jdbc.jts.Connection]=(state=started,assigned=none),SCInfo[myserver]=(state
=active),properties=({weblogic.transaction.name=[EJB StructMgrBeanImpl.addStruct
ure()], weblogic.jdbc=t3://10.200.15.136:7001}))]). No further JDBC access is
al
lowed within this transaction.
What could be the potential problems in the method's code/SP that could be causing
the timeout?
Anyone faced similar problems?
Thanks in advance,
Sreeja -
Invoking stored procedures containing DML statements
Hi, I'm invoking a stored procedure that inserts the form record into the base tables, however I do not want to insert duplicates and if I try to do a count on that record from forms I get 0 records until the session is commited. I assume the insert was done in another session? is there a way around this? Thanks.
thanks, I found that the reason I was getting 0 records is because I'm calling a db package to insert the record using the on-insert trigger.. forms is only populating the table once I try to commit all the records bypassing my when-validate-record trigger.. so I now call my check_unique procedure from the insert procedure and raise an application exception from the db procedure...seems to work.
-
Crystal Report Source is MS SQL Stored Procedure Causes Login Popup
My environment is this: Visual Studio 2010 with CRforVS_13_0_9 installed. MS SQL Server is source for all report data. I use three different databases for all my reports.
I have a number of working CR reports that work fine in IDE and at runtime. However, one report works in IDE report designer Main Report Preview but does not work at runtime. Instead, it pops up the Database Login dialog box. This particular report is the only one that I have that uses a Stored Procedure for report source data. The following code is used for all reports. Can someone please help me to identify what is causing this anomaly?
' _Options contains parameter name and value pairs, if any
Dim oReport As New ReportDocument()
Dim FullReportName = "MA_CustomerUsage"
oReport.Load(FullReportName, OpenReportMethod.OpenReportByDefault)
DoCRLogin(oReport)
If _Options.ParameterList IsNot Nothing Then ImplementCRParameters(oReport)
With CrystalReportViewer
.SelectionFormula = _SelectionFormula
.ReportSource = oReport
.Zoom(zoomPageWidth)
.ShowParameterPanelButton = False
.ToolPanelView = ToolPanelViewType.None
End With
Private Sub DoCRLogin(ByVal oRpt As ReportDocument)
Dim oCRDb As Database = oRpt.Database
Dim oCRTables As Tables = oCRDb.Tables
Dim oCRTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
Dim DatabaseName = oCRTables(0).LogOnInfo.ConnectionInfo.DatabaseName
Dim oCRConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo() _
With {.DatabaseName = ScanInvenConStrSetting("Initial Catalog=", DatabaseName),
.ServerName = ScanInvenConStrSetting("Data Source=", DatabaseName),
.IntegratedSecurity = True}
For Each oCRTable As Table In oCRTables
oCRConnectionInfo.DatabaseName = oCRTable.LogOnInfo.ConnectionInfo.DatabaseName
oCRTableLogonInfo = oCRTable.LogOnInfo
oCRTableLogonInfo.ConnectionInfo = oCRConnectionInfo
oCRTable.ApplyLogOnInfo(oCRTableLogonInfo)
Next
End Sub
Private Sub ImplementCRParameters(ByRef oReport As ReportDocument)
Dim oparamFields = New ParameterValues
Dim oFieldDefs = oReport.DataDefinition.ParameterFields
For Each CRParameter In _Options.ParameterList
Dim oFieldDef = oFieldDefs("@" & CRParameter.Name)
Dim oDiscrete As New ParameterDiscreteValue()
oDiscrete.Value = CRParameter.Value.ToString
oparamFields.Add(oDiscrete)
oFieldDef.ApplyCurrentValues(oparamFields)
Next
End Sub
Private Function ScanInvenConStrSetting(ByVal Src As String, ByVal DBName As String) As String
Dim MyDB As String = String.Empty
Select Case DBName.ToUpper
Case "Database1".ToUpper
MyDB = Global.My.Settings.Database1ConnectionString
Case "Database2".ToUpper
MyDB = Global.My.Settings.DatabaseConnectionString
Case "Database3".ToUpper
MyDB = Global.My.Settings.Database3ConnectionString
End Select
Dim ndx1 As Integer = InStr(MyDB, Src, CompareMethod.Text) + Src.Length
Dim ndx2 As Integer = InStr(ndx1, MyDB, ";", CompareMethod.Text)
If ndx2 = 0 Then ndx2 = MyDB.Length
ScanInvenConStrSetting = Mid(MyDB, ndx1, ndx2 - ndx1)
End FunctionCheck what else is different with the report:
1) Connection type (ODBC vs. OLEDB, vs. Native, etc)
2) Check for subreports
3) Check that the report uses the SQL Native 10 Driver
Enable the report options "Verify on 1st refresh" and "Verify stored procedure on 1st refresh".
Comment out the db logon code as well as the parameter code and let the report prompt. Does that work?
If it does, add the db logon code but leave the param code commented out. Does that work?
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
Invoking Stored Procedure with OUT Parameter
I am calling a stored procedure that has a "out" parameter of PL/SQL type (table of varchar2) through toplink API. My procedure executes, performs the updates successfully, but I can not obtain the value of the out parameter. Is the approach followed below incorrect? I could not figure out by looking into examples provided in the documentation:
http://download.oracle.com/docs/cd/B25221_04/web.1013/b25386/building_and_using_application_services009.htm#BCFEFAHC
Java function is given below:
public List removeFromAutoupdSched( List srNumbers, String userName)
if (srNumbers == null || srNumbers.size() == 0)
return null;
List result = null;
try
//Example Stored procedure call with an output parameter
DatabaseLogin login = m_dbSess.getLogin();
Connection conn = (Connection) (java.sql.Connection)login.connectToDatasource(null);
oracle.sql.ArrayDescriptor arrDesc = new oracle.sql.ArrayDescriptor("AUTOUPD_SRLIST_T", conn);
oracle.sql.ARRAY srARR = new oracle.sql.ARRAY(arrDesc, conn, srNumbers.toArray());
StoredProcedureCall procCall = new StoredProcedureCall();
procCall.setProcedureName("SEW_AUTOUPD.PURGE_AUTOUPD_SCHEDULE");
procCall.addNamedArgumentValue("excludeSRlist", srARR);
procCall.addNamedArgumentValue("exclude_by", userName);
procCall.addNamedOutputArgument(
"excludeSR_srlist_status",
"excludeSR_srlist_status",
OracleTypes.ARRAY,
"AUTOUPD_SRLIST_ERRS_T"
ValueReadQuery vq = new ValueReadQuery();
vq.setCall(procCall);
oracle.sql.ARRAY srResultARR = (oracle.sql.ARRAY)m_dbSess.executeQuery(vq);
if (srResultARR != null)
String[] msgs = (String[])srResultARR.getArray();
if (msgs.length > 0)
result = Arrays.asList(msgs);
Iterator iter = result.iterator();
while (iter.hasNext())
System.out.println("msg = " + iter.next());
return result;
catch (Exception exc)
throw new RuntimeException(exc);
PL/SQL Type
create or replace TYPE autoupd_srlist_errs_t IS TABLE OF VARCHAR2(150);
Sample procedure called by toplink:
PROCEDURE purge_autoupd_schedule(
excludeSRlist autoupd_srlist_t,
exclude_by VARCHAR2,
excludeSR_srlist_status OUT NOCOPY autoupd_srlist_errs_t)
IS
pkg sew_log.pkg_name%TYPE default upper('sew_autoupd');
prc sew_log.prc_name%TYPE default upper('purge_autoupd_schedule(excludeSRlist, exclude_by)');
srno NUMBER;
-- cnt NUMBER := 0;
exclude_status VARCHAR2(150);
err_prefix VARCHAR2(50) := 'Unable to exclude from autoupdate, ';
BEGIN
FOR i IN excludeSRlist.FIRST..excludeSRlist.LAST
LOOP
BEGIN
srno := excludeSRlist(i);
-- Update actn_taken column in autoupd_schedule before doing delete.
UPDATE autoupd_schedule SET actn_taken='Removed by engineer', UPD_TIME=systimestamp
WHERE sr_no = srno and engr_itsid = exclude_by;
-- Add SR to exclusion list.
INSERT INTO autoupd_exclude(sr_no, exclude_by, exclude_time) VALUES (srno, exclude_by, systimestamp);
exclude_status := 'Item ' || i || ' - SR ' || srno || ' - ' || 'Excluded from autoupdate.';
excludeSR_srlist_status(i) := exclude_status;
EXCEPTION
WHEN others THEN
-- Add SR to excludeSR_fail if previous steps occurred okay.
-- cnt := cnt +1;
exclude_status := 'Item ' || i || ' - SR ' || srno || ' - ' || err_prefix || substr(sqlerrm,12);
excludeSR_srlist_status(i) := exclude_status;
END;
END LOOP;
EXCEPTION
WHEN others THEN
sew_logger.log(
code => substr(sqlerrm,1,9),
msg => substr(sqlerrm,12),
pkg => pkg,
prc => prc
END;
Any help is appreciated.What happens if you run the stored procedure through pure jdbc (without TopLink)?
I tried a simple example that worked for me:
//defined type in the db
CREATE TYPE "TEST"."VAR_LIST" AS TABLE OF VARCHAR2(150)
//defined stored procedure in the db
CREATE OR REPLACE PROCEDURE "TEST"."VAR_LIST_IN_OUT" (
VARS_IN VAR_LIST,
VARS_OUT OUT NOCOPY VAR_LIST
as
begin
VARS_OUT := VAR_LIST();
FOR i IN VARS_IN.FIRST..VARS_IN.LAST LOOP
VARS_OUT.EXTEND;
VARS_OUT(i) := CONCAT(VARS_IN(i), '_BLAH');
END LOOP;
end;
// Java code
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName("VAR_LIST_IN_OUT");
Connection conn = (Connection) ((oracle.toplink.internal.sessions.AbstractSession)getSession()).getAccessor().getConnection();
oracle.sql.ArrayDescriptor arrDesc = new oracle.sql.ArrayDescriptor("VAR_LIST", conn);
oracle.sql.ARRAY srARR = new oracle.sql.ARRAY(arrDesc, conn, new String[]{"A1", "A2", "A3"});
call.addNamedArgumentValue("VARS_IN", srARR);
call.addNamedOutputArgument("VARS_OUT", "VARS_OUT", Types.ARRAY, "VAR_LIST");
ValueReadQuery query = new ValueReadQuery();
query.setCall(call);
Object result = getSession().executeQuery(query);
Object[] array = (Object[])((java.sql.Array)result).getArray();
for(int i=0; i<array.length; i++) {
System.out.println(array);
// System.out:
[TopLink Finest]: 2008.04.25 15:37:16.687--DatabaseSessionImpl(3491657)--Thread(Thread[main,5,main])--Execute query ValueReadQuery()
[TopLink Fine]: 2008.04.25 15:37:16.703--DatabaseSessionImpl(3491657)--Connection(29118152)--Thread(Thread[main,5,main])--BEGIN VAR_LIST_IN_OUT(VARS_IN=>?, VARS_OUT=>?); END;
bind => [oracle.sql.ARRAY@323274, => VARS_OUT] (There is no English translation for this message.)
A1_BLAH
A2_BLAH
A3_BLAH
My stored procedure didn't work (on Oracle 9 db) without output collection initialization: VARS_OUT := VAR_LIST(); and extending: VARS_OUT.EXTEND. -
Executing a report with stored procedure causes error
Hello,
I've got a .NET application where a report gets generated from an .rpt template using Crystal Reports. A template has been created using the fields from stored procedure. While creating the template, I've been working with my DEV environment DB server, and with that server the .rpt has been saved. Within the Designer, I can preview the report, all working fine.
Using the template with my application, if I set in the code for crystal connection to use the same DB server as has been saved with the .rpt, the report runs and I do get the result in my application as expected. But if I move my code to other environment, using another DB server (but not changing anything in the .rpt), while running the report in the application I get the following error:
Exception: CrystalDecisions.CrystalReports.Engine.InternalException
Message: Failed to open a rowset.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: Could not find stored procedure 'BreachOfAgg'.
SQL State: 42000
Native Error:
Failed to open a rowset.
Error in File C:\Windows\TEMP\Breach of Aggregate Stop Loss {196B84E5-7DAE-465E-A12D-5C70DDC04CE5}.rpt:
Failed to open a rowset.
Source: CrystalDecisions.ReportAppServer.DataSetConversion
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportOptions options, HttpResponse response, Boolean asAttachment, String attachmentName)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportFormatType formatType, HttpResponse response, Boolean asAttachment, String attachmentName)
at IFG.ReportsModule.Reporter.CrystalReporter.Export(OutputType outputType, HttpResponse response, String reportName, Boolean asAttachment)
at IFG.ReportsModule.Reporter.CrystalReporter.Export(OutputType outputType, HttpResponse response, String reportName)
at IFG.ReportsModule.Proxies.CrystalReporterProxy.ShowResult(OutputType outputType, HttpContext context, CrystalReporter cr)
at IFG.ReportsModule.Proxies.CrystalReporterProxy.ExecuteReport(ParametersValues parameters, OutputType outputType, HttpContext context)
at IFG.Web.GetReport.GenerateReport(Int64 reportID) in d:\Jure\PSL\iFish\IFISHRSF\IFISHRSF0100\Root\5. Development\IFISH Portal\SDRMA New\Portal\web\admin\RSF\GetReport.aspx.cs:line 82
at IFG.Web.GetReport.Page_Load(Object sender, EventArgs e) in d:\Jure\PSL\iFish\IFISHRSF\IFISHRSF0100\Root\5. Development\IFISH Portal\SDRMA New\Portal\web\admin\RSF\GetReport.aspx.cs:line 48
Nested Exception
Exception: System.Runtime.InteropServices.COMException
Message: Failed to open a rowset.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: Could not find stored procedure 'BreachOfAgg'.
SQL State: 42000
Native Error:
Failed to open a rowset.
Error in File C:\Windows\TEMP\Breach of Aggregate Stop Loss {196B84E5-7DAE-465E-A12D-5C70DDC04CE5}.rpt:
Failed to open a rowset.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
If I open in the Crystal Designer the rpt and change the DB to my new server, and then run the report in the application using that same new server, the report runs ok and I do get the results. As well, I don't have this problem using tables or views in the report. Independent of what server has been used while created the .rpt in the Designer, I get the report ran and presented according to the server that I point to within my code.
I hope someone can help me out with thi.
Thank you.
JureHi Jure,
All I can suggest now is you try this [app|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333933323331%7D.do]:
It will get the connection if you need.
If that doesn't work the purchase a support and Rep can connect to your PC to see what is going on...
Thanks
Don -
Invoking Stored procedures without using CallableStatement
I have a piece of code:
import java.sql.*;
public class Somenath{
public static void main(String args[])throws ClassNotFoundException,SQLException{
String abc;
String query="{ call PR_EXAMPLE_I(?,?) }";
String name="TEST FUND 2";
Connection con = null;
Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection("jdbc:oracle:thin:@172.16.31.120:1521:ora9db","gs2","gs2");
Statement statement=con.createStatement();
CallableStatement cs = con.prepareCall(query);
cs.registerOutParameter(2,Types.VARCHAR);
cs.setString(1,name);
cs.execute();
String nameval=cs.getString(2);
System.out.println("Name"+nameval);
try{
finally{
cs.close();
This code works fine.
I would like to know wheather its possible to execute a stored procedure using the
statement.execute()/statement.executeQuery().Please note as per Java's documentation statement.execute() may be used execute any unknown SQL String.So is it possible to execute a stored procedure thats already existing(say PR_EXAMPLE_I in the current example).Thank you Digital Dreamer for ur help.I will explain the problem in detail.
Well I wish to invoke a stored procedure that uses a in paramater but no out parameter.Assume that the stored procedure (say abc) already exists in the system.We execute a Select statement inside the Stored procedure and copy the value in a block-variable(a local one) within the Stored Procedure.
Usually we execute the stored procedure in the SQL Prompt using
SQL> exec Proc_Name(In Paramter)
I would like to know how do I do it in JDBC using Statement.(Please note that we are not using Callable Statement)
Can u help me out with an example? -
Invoking Stored Procedure - Transform Activity
I am attempting to invoke a PL/SQL stored procedure via the database adapter in BPEL (10.1.3.1). The stored procedure is very simple and takes 2 parameters:
PROCEDURE log_admission(p_px_id NUMBER, p_cons_lev NUMBER) IS
BEGIN
UPDATE nhscont_px
SET pat_admitted = 'Y',
pat_admitted_date = sysdate
WHERE pat_match_id = p_px_id;
END;
The BPEL flow has the following activities:
Recieve
Transform
Invoke => DB Adapter, with package / procedure selected
Reply
I have created a variable of type: MessageType: PartnerLink: DbAdapterCall: args_in_msg.
In the Transform activity, I have selected the inputVariable/Payload as the source, and the defined variable/Inputparameters as the destination. I have created a mapping file and mapped the variables between schemas.
I have set the input variable of the process as the variable created above.
When I deply and execute the process, the record does not update, although the PL/SQL is being executed. It looks like the parameters are not being passed in correctly.
Does anyone have any ideas as to what I could be doing wrong here?
Thanks
Message was edited by:
steve_macleodSeeing the parameters being passed in to the procedure on the invoke activity.
Does the Invoke activity in BPEL have the values you are transforming?
Kalidass
http://oraclebpelindepth.blogspot.com/ -
PageContext.forward causes strange exception
Hi,
I've found a strange exception using pageContext.forward.
The code is as follows:
try {
} catch (Exception e) {
out.println (...); //for debugging purposes
pageContext.forward (errorPage);
pageContext.forward throws an "IllegalStateException: Attempt to clear a buffer that's already been flushed". (I think that this is the right translation, the original is in Spanish).
I think that there is a very similar problem described in this forum:
http://forum.java.sun.com/thread.jsp?forum=45&thread=343314
Has anyone found a similar problem (with its solution, if possible ;=)
ThanxHowdy,
You've already written to you JSP output, and in this situation you can't forward 'cause it's automatically flushed.
try changing your forward method position, befor any out.print() or like that.
OR use this trick,
<%@ page autoFlush="false" %>
// Write to JSP and other stuffs...
// Forward to another content...
// Do your stuffs...
response.flushBuffer(); -
Invoke stored procedure from JDBC Adapter
Is there a tool that generates interfaces for stored procedure(ORACLE PL/SQL) like RFC or IDOC adapters?
Hi Denis,
I dont think there is any such tool.]
To generate a Stored Procedure of your Oracle DB, all you will have to do in your <b>JDBC adapter configuration</b> is give the name of the Stored Procedure under <Table> and you will have to give "<b>execute</b>" as the value under action attribute.
Just check this link. Hope it helps,
http://help.sap.com/saphelp_nw04/helpdata/en/b0/676b3c255b1475e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/content.htm
Just check this blog of Sriram wherein a stored procedure of a MaxDB Database is called.
/people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
I have implemented a scenario which requires an Oracle stored procedure to be executed and so, if you do need any further info, let me know.
Hope this info helps,
Regards,
Bhavesh
Maybe you are looking for
-
Can you transfer music from an ipod to a somewhat different iTunes library
I have an iTunes library...what happens if I plug an iPod into the computer that has some songs in the library already (from this same iPod), and some not? Will they all copy? Will it delete the ones that are already there? Just don't want to lose t
-
"ClassNotFoundException" loading custom LookAndFeel class
Hi! I created a custom LaF for my application. It works fine after registering e.g. my new ButtonUI in the myLookAndFeel class: Object[] uiDefaults = { "ButtonUI", myPackageName + "myButtonUI", "CheckBoxUI", metalPackageName + "MetalCheckBoxUI", The
-
Custom Folder Icons won't display in Cover Flow
When I paste a PNG or PICT or JPG file on the highlighted folder image in the Get Info window, the new icon for the folder will appear everywhere - icon view - list view - column view - except Cover Flow - What gives?
-
hello all, table structure: CREATE TABLE COR_DIVI_MST (divi_locn_code varchar2(6) not null, Divi_CODE VARCHAR2(2) NOT NULL, Divi_NAME VARCHAR2(200), CONSTRAINT CORDIVIMST_PK PRIMARY KEY(divi_locn_code,divi_code)); i have a form for enter master data.
-
Is there spce for an SSD in the case? Thanks