Using DB Adapter to execute a custom SQL sequence

Hello everyone, First of all happy 2013
I've done with Jdeveloper using DB Adapter to execute a custom SQL statement, has been very simple, then the code JCA integrate it into OSB OESP PS3, and have successfully deployed, then did a testing from the console of OSB
"Before Configure a DataSource and a Connection Factory for Db Adapter"
I have seen that I have a casting error, but do not understand why, is a single number which I hope to run the following code sequence:
SELECT
MYSEQUENCE.NEXTVAL@DBLINK_EXAMPLE
FROM dual
thanks in advance
>>>>>THIS IS MY LOG:
Request Document      
     <soapenv:Envelope      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
     <soap:Header      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
     </soap:Header>
     <soapenv:Body>
     <sec:DB_ADAPTER_EXAMPLEInput      xmlns:sec="http://xmlns.oracle.com/pcbpel/adapter/db/DB_ADAPTER_EXAMPLE"/>
     </soapenv:Body>
     </soapenv:Envelope>
Response Document      
The call resulted in an error: Failed outgoing call JCA service with application error, excepción: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/PR_SISII/JCA/DB_ADAPTER_EXAMPLE [ DB_ADAPTER_EXAMPLE_ptt::DB_ADAPTER_EXAMPLE(DB_ADAPTER_EXAMPLEInput_msg,DB_ADAPTER_EXAMPLEOutputCollection) ] - WSIF JCA Execute of operation 'DB_ADAPTER_EXAMPLE' failed due to: Could not create / access the TopLink session.
This session is used to connect to the data store.
caused by: java.lang.ClassCastException: oracle.tip.adapter.db.DBConnectionFactory cannot be cast to javax.sql.DataSource.
; nested exception is:
BINDING.JCA-11622
Could not create / access the TopLink session.
This session is used to connect to the data store.
caused by: java.lang.ClassCastException: oracle.tip.adapter.db.DBConnectionFactory cannot be cast to javax.sql.DataSource.
You may need to configure the connection settings in the deployment descriptor (DbAdapter.rar # META-INF/weblogic-ra.xml) and restart the server. This exception is considered not recoverable, probably due to a modeling error.
com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/PR_SISII/JCA/DB_ADAPTER_EXAMPLE [ DB_ADAPTER_EXAMPLE_ptt::DB_ADAPTER_EXAMPLE(DB_ADAPTER_EXAMPLEInput_msg,DB_ADAPTER_EXAMPLEOutputCollection) ] - WSIF JCA Execute of operation 'DB_ADAPTER_EXAMPLE' failed due to: No se ha podido crear/acceder a la sesión de TopLink.
This session is used to connect to the data store.
caused by: java.lang.ClassCastException: oracle.tip.adapter.db.DBConnectionFactory cannot be cast to javax.sql.DataSource.
; nested exception is:
BINDING.JCA-11622
Could not create / access the TopLink session. This session is used to connect to the data store.
caused by: java.lang.ClassCastException: oracle.tip.adapter.db.DBConnectionFactory cannot be cast to javax.sql.DataSource.
You may need to configure the connection settings in the deployment descriptor (DbAdapter.rar # META-INF/weblogic-ra.xml) and restart the server. This exception is considered not recoverable, probably due to a modeling error.
at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:155)
at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:598)
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.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
at $Proxy140.sendMessageAsync(Unknown Source)
at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:558)
at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:426)
at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:380)
at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:79)
at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:137)
at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:135)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:140)
at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(Unknown Source)
at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_1034_WLStub.invoke(Unknown Source)
at com.bea.alsb.console.test.TestServiceClient.invoke(TestServiceClient.java:174)
at com.bea.alsb.console.test.actions.DefaultRequestAction.invoke(DefaultRequestAction.java:117)
at com.bea.alsb.console.test.actions.DefaultRequestAction.execute(DefaultRequestAction.java:70)
at com.bea.alsb.console.test.actions.ServiceRequestAction.execute(ServiceRequestAction.java:143)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:91)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
at com.bea.alsb.console.common.base.SBConsoleRequestProcessor.processActionPerform(SBConsoleRequestProcessor.java:91)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
at com.bea.alsb.console.common.base.SBConsoleRequestProcessor.process(SBConsoleRequestProcessor.java:191)
at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:262)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:134)
at com.bea.alsb.console.common.base.SBConsoleActionServlet.doGet(SBConsoleActionServlet.java:49)
at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199)
at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1129)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:687)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:142)
at com.bea.portlet.adapter.scopedcontent.StrutsStubImpl.processAction(StrutsStubImpl.java:76)
at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)
at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181)
at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167)
at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225)
at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
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.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:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/PR_SISII/JCA/DB_ADAPTER_EXAMPLE [ DB_ADAPTER_EXAMPLE_ptt::DB_ADAPTER_EXAMPLE(DB_ADAPTER_EXAMPLEInput_msg,DB_ADAPTER_EXAMPLEOutputCollection) ] - WSIF JCA Execute of operation 'DB_ADAPTER_EXAMPLE' failed due to: Could not create / access the TopLink session.
This session is used to connect to the data store.
Caused by: java.lang.ClassCastException: can not be cast to oracle.tip.adapter.db.DBConnectionFactory javax.sql.DataSource.; nested exception is:
BINDING.JCA-11622
Could not create / access the TopLink session.
This session is used to connect to the data store.
Caused by: java.lang.ClassCastException: can not be cast to oracle.tip.adapter.db.DBConnectionFactory javax.sql.DataSource.
You may need to configure the connection settings in the deployment descriptor (DbAdapter.rar # META-INF/weblogic-ra.xml) and restart the server. This exception is considered not recoverable, probably due to a modeling error.

Caused by: java.lang.ClassCastException: can not be cast to oracle.tip.adapter.db.DBConnectionFactory javax.sql.DataSource.While creating the outbound connection pool in DBAdapter, make sure that you are providing the JNDI name of data-source (for example jdbc/aaaaa) in field XADataSourceName (if data-source is XA) or in field dataSourceName (if data-source is non-xa). It seems you are providing the JNDI of outbound connection pool (for example eis/DB/aaaaa) itself in the above settings.
Regards,
Anuj

Similar Messages

  • How to operate multiple querys using DB Adapter and 'Execute Custom SQL'

    I have a requirment that I need to create database adapter in your BPEL process with 'Execute Custom SQL' to operate multiple query in DB in one atomic
    here are the details:
    inbound request:
    <ns1:Query_bpelProcessRequest>
    <ns1:input>
    <ns1:ItemDetail>
    <ns1:ItemID>1123DDDS</ns1:ItemID>
    </ns1:ItemDetail>
    <ns1:ItemDetail>
    <ns1:ItemID>1126EWWA</ns1:ItemID>
    </ns1:ItemDetail>
    <ns1:ItemDetail>
    <ns1:ItemID>11208FSAA</ns1:ItemID>
    </ns1:ItemDetail>
    </ns1:input>
    </ns1:Query_bpelProcessRequest>
    I use for-each fuction in XSLT to mapping the all ItemID value:
    <xsl:template match="/">
    <xsl:for-each select="/tns:Query_bpelProcessRequest/tns:input/tns:ItemDetail">
    <ns1:QueryFromDB_Input>
    <ns1:ItemID>
    <xsl:value-of select="tns:ItemID"/>
    </ns1:ItemID>
    </ns1:QueryFromDB_Input>
    </xsl:for-each>
    </xsl:template>
    and in DB Adapter I use the 'Execute Custom SQL' to query the CONTENT value according the ItemID value:
    select distinct CONTENT from agile.item where ITEM_NUMBER=’<ItemID>’
    However, in the result, It only query the first item value for <ns1:ItemID>1123DDDS</ns1:ItemID>
    <<QueryFromDB_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_Input_msg">
    <QueryFromDB_Input xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
    <ns1:ItemID>1123DDDS</ns1:ItemID>
    </QueryFromDB_Input>
    </part></QueryFromDB_InputVariable>
    <QueryFromDB_OutputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="QueryFromDB_OutputCollection">
    <QueryFromDB_OutputCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryFromDB">
    <QueryFromDB_Output>
    <ITEM_NUMBER>1123DDDS</ITEM_NUMBER>
    <CONTENT >SJIFESSFFJ</CONTENT >
    </QueryFromDB_Output>
    </QueryFromDB_OutputCollection>
    </part></QueryFromDB_OutputVariable>
    the other two querys are not operated.
    what can I do to operate multiple querys??
    Thanks

    Hi Rod,
    I are using while loop and assign array inputvalue to the inputvarable of DBadapter now, but actually it doesn't work.
    Throw expection
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>XPath query string returns multiple nodes.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"] should not return multipe nodes.
    Please check the BPEL source at line number "89" and verify the part and xpath query /client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID["ItemIndex"].
    Possible reasons behind this problems are: some xml elements has maxOccurs > 1 or the xml data is invalid according to XML Schema.
    To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain administration page.
    </summary>
    </part></selectionFailure>
    my inbound XSD:
    <element name="ItemsQuery_bpelProcessRequest">
    <complexType>
    <sequence>
    <element name="input" type="tns:inputType"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="inputType">
    <sequence>
    <element name="inputDetail" minOccurs="0" maxOccurs="unbounded">
    <complexType>
    <sequence>
    <element name="ProductID" type="string" minOccurs="0"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <element name="ItemsQuery_bpelProcessResponse">
    <complexType>
    <sequence>
    <element name="result" type="tns:outputType"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="outputType">
    <sequence>
    <element name="ItemOutput" minOccurs="0" maxOccurs="unbounded">
    <complexType>
    <sequence>
    <element name="item_id" type="string" minOccurs="0"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    DB Adapter XSD:
    <xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/QueryItem" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="QueryItem_Input" type="QueryItem_Input"/>
    <xs:complexType name="QueryFrom_Input">
    <xs:sequence>
    <xs:element name="ProductID" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="QueryItem_OutputCollection" type="QueryItem_OutputCollection"/>
    <xs:complexType name="QueryItem_OutputCollection">
    <xs:sequence>
    <xs:element name="QueryItem_Output" type="QueryItem_Output" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="QueryItem_Output">
    <xs:sequence>
    <xs:element name="item_id" type="xs:string" nillable="true"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    the bpel assign:
    <assign name="Initial_Index">
    <copy>
    <from expression="0"/>
    <to variable="ItemIndex"/>
    </copy>
    </assign>
    <while name="While_1"
    condition="bpws:getVariableData('ItemIndex')&lt;ora:countNodes('inputVariable','payload','/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID)">
    <sequence name="Sequence_1">
    <assign name="Assign_QueryInput">
    <copy>
    <from variable="inputVariable" part="payload"
    query='/client:ItemsQuery_bpelProcessRequest/client:input/client:inputDetail/client:ProductID{bpws:getVariableData('ItemIndex')}'/>
    <to variable="QueryItem_InputVariable"
    part="QueryItem_nput_msg"
    query="/ns2:QueryItem_Input/ns2:ProductID"/>
    </copy>
    </assign>
    <invoke name="Invoke_QueryDB" partnerLink="QueryItem"
    portType="ns1:QueryItem_ptt"
    operation="QueryItem_PSFT"
    inputVariable="QueryItem_InputVariable"
    outputVariable="QueryItem_OutputVariable"/>
    <assign name="Assign_Output">
    <copy>
    <from variable="QueryItem_OutputVariable"
    part="QueryItem_OutputCollection"
    query="/ns2:QueryItem_OutputCollection/ns2:QueryItem_Output/ns2:item_id"/>
    <to variable="outputVariable" part="payload"
    query='/client:ItemsQuery_bpelProcessResponse/client:result/client:ItemOutput/client:item_id{bpws:getVariableData('ItemIndex')}'/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('ItemIndex')+1"/>
    <to variable="ItemIndex"/>
    </copy>
    </assign>
    </sequence>
    </while>
    I use {} instead of  []  for array,  because [] seams not reveal in this message board
    seems I can't assign array values to the DB inputvalue, Are there any solutions for this ?
    I still haven't found any way for operating multiple querys using DB Adapter.
    Thanks
    Edited by: user1065212 on 07-Jan-2010 19:39
    Edited by: user1065212 on 07-Jan-2010 19:41
    Edited by: user1065212 on 07-Jan-2010 19:44
    Edited by: user1065212 on 07-Jan-2010 19:45

  • Using information from ItResource for executing custom sql in OIM 11g

    I need executing a custom sql query using a connection of a ItResource. How can I get the instance of connection for to execute the sql query ? Someone have a idea of how i make this ? Help me ...
    Tks

    HashMap itAttribute = new HashMap();
    itAttribute.put("IT Resources.Name","IT-DB01");
    tcITResourceInstanceOperationsIntf itResource=null;
    tcResultSet resItResKey;
    resItResKey = itResource.findITResourceInstances(itAttribute);
    long iTesourceKey = resItResKey.getLongValue("IT Resource.Key");
    tcResultSet resItRes = itResource.getITResourceInstanceParameters(iTesourceKey);
    Append following lines:-
              HashMap<String, String> hashMap = new HashMap<String, String>();
              int countResultGetITResourceInstanceParameters = resItRes .getRowCount();
              for(int i = 0; i < countResultGetITResourceInstanceParameters; i++) {
                   resultGetITResourceInstanceParameters.goToRow(i);
                   hashMap.put(
                             resItRes .getStringValue(ZAPConstants.IT_RESOURCES_TYPE_PARAMETER_NAME),
                             resItRes .getStringValue(ZAPConstants.IT_RESOURCES_TYPE_PARAMETER_VALUE)
              return hashMap;

  • Execute custom SQL query in OIM11g

    Hi,
    Can you please provide me some java code snippet to execute a custom sql query and also to get db connection to execute this query in OIM 11g. I am going to run this query in an adapter.
    Thanks a lot for ur help.
    Mike

    Hey Mike,
    Use the below sample code to get db connection and then to execute a query in OIM11g.
    String query = "SELECT UD_ADUSER_EMAIL FROM UD_ADUSER WHERE upper(UD_ADUSER_UID) like '%TESTU%'";
    Connection con = Platform.getOperationalDS().getConnection();
    PreparedStatement preparedStatement = con.prepareStatement(query);
    ResultSet resultSet = preparedStatement.executeQuery();
    while(resultSet.next())
    System.out.println("Output:"+resultSet.getString(1));
    }

  • Possible to execute custom SQL query?

    Is it possible to execute a custom SQL query and get back a collection of
    objects with Kodo JDO? Query expression languages like JDOQL are all very
    well (I actually think JDOQL is pretty messy), but sometimes when you've
    got a complex query (and you know you're using a RDBMS) it is best
    accomplished in a SQL statement. I see Kodo has extended JDOQL, which is
    good, but developing custom extensions seems to be limited to implementing
    kodo.jdbc.query.JDBCFilterListener where you can customise the where
    clause. What I want to be able to do is to specify the entire SQL string.
    I am looking into using Kodo JDO for my organisation, and being able to
    use custom SQL is something i would expect (and something we can do with
    our current O/R mapping product (TopLink)).
    Regards,
    Alex

    Patrick Linskey wrote:
    On Tue, 30 Sep 2003 10:57:13 +0000, Alex wrote:
    being able to use custom SQL is something i would expect
    We absolutely agree. Take a look at the samples/customSQL example in the
    Kodo distribution.
    -Patrick
    Patrick Linskey
    SolarMetric Inc.Hi Patrick,
    I have downloaded kodo-jdo-3.0.0RC1 for windows for evaluation, but there
    is no samples/customSQL directory.
    Alex.

  • How to update flag in multiple tables using custom sql DB adapter

    hi all,
    I have a scenario: I want to update flags in multiple tables in DB2. I have used toplink update only to update all tabless after creating relationships between them. But that approach is not working as it couldnot detect emmisions with DB2 and update the complete record with blank values in other columns.
    So, i want to use custom sql now. Can anybody help in resolving the issue or in writing the custom sql.
    Regards
    Richa

    Dear SeánMacGC thanks for reply,
    But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    *changed dbms_sql.varchar2_table*
    i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
    to run this procedure:
    execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
    Thanks...

  • Error  While Polling Database changes using Custom SQL

    Hi,
    I am using Oralce SOA Suite 11g DbAdapter for polling Database changes.
    My source database is DB2,I am using custom query for polling the changes in source database.
    I am using "Update an External Sequencing Table on a Different Database" polling Strategy
    Query section of the Mapping file is as follows.
    <querying xsi:type="query-policy">
    <queries>
    <query name="ReceiveF554102TXEDataSelect" xsi:type="read-all-query">
    <call xsi:type="sql-call">
    <sql><![CDATA[SELECT FILE_NAME, LIBRARY_NAME,
                   USER_NAME, SEQUENCE_NUM,
                   JOURNAL_CODE, ENTRY_TYPE, TIME_STAMP, JOB_NAME, JOB_USER,
                   JOB_NUMBER, PROGRAM_NAME, ARM_NUMBER, ADDRESS_FAMILY, RMT_ADDRESS,
                   REMOTE_PORT, SYSTEM_NAME, REL_RECORD, OTRCLN, IBMCU, IBITM, IBLITM,
                   IBAITM, IBY55ETAFR, IBY55ETATH, IBY55NUM01, IBY55NUM02, IBY55NUM03,
                   IBY55NUM04, IBY55NUM05, IBY55NUM06, IBY55NUM07, IBY55NUM08,
                   IBY55NUM09, IBY55NUM10, IBELM01, IBELM02, IBELM03, IBELM04, IBELM05, IBY55STR01,
                   IBY55STR02, IBY55STR03, IBY55STR04, IBY55STR05, IBY55CHA01,
                   IBY55CHA02, IBY55CHA03, IBY55CHA04, IBY55CHA05, IBY55DAT01, IBY55DAT02,
                   IBY55DAT03, IBY55DAT04, IBY55DAT05, IBUSER, IBPID, IBJOBN, IBUPMT,
                   IBUPMJ FROM PY_JRNMON.F554102T WHERE ((TIME_STAMP > (SELECT LAST_READ_DATE FROM SOALIB.SOASEQHDR WHERE (TABLE_NAME = 'F554102T'))) AND (TIME_STAMP < SYSDATE)) ORDER BY TIME_STAMP ASC]]> </sql>
    </call>
    <reference-class>ReceiveF554102TXEData.F554102T</reference-class>
    <lock-mode>none</lock-mode>
    <container xsi:type="list-container-policy">
    <collection-type>java.util.Vector</collection-type>
    </container>
    </query>
    </queries>
    <delete-query xsi:type="delete-object-query">
    <call xsi:type="sql-call">
    <sql>UPDATE SOALIB.SOASEQHDR SET LAST_READ_DATE = #LAST_READ_DATE WHERE (TABLE_NAME = 'F554102T')</sql>
    </call>
    </delete-query>
    </querying>
    I am getting following Error after defining the custom SQL in my mapping.xml file. (After executing the Created Process)
    Caused by: BINDING.JCA-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by BINDING.JCA-11626
    Query Not Found Exception.
    Could not find Named Query [ReceiveSampleCustomPollSelect] with ? arguments, belonging to Descriptor [ReceiveSampleCustomPoll.F554102T] for [oracle.tip.adapter.db.DBActivationSpec@2ec733b0] inside of mappings xml file: [ReceiveSampleCustomPoll-or-mappings.xml].
    You may have changed the queryName info in either the _db.jca or toplink-mappings.xml files so that they no longer match.
    Make sure that the queryName in the activation/interactionSpec and in the Mappings.xml file match. If an old version of the descriptor has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this named query.
    You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling mistake. This polling process will shut down, unless the fault is related to processing a particular row, in which case polling will continue but the row will be rejected (faulted).
         at oracle.tip.adapter.db.exceptions.DBResourceException.createNonRetriableException(DBResourceException.java:653)
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:619)
         at oracle.tip.adapter.db.exceptions.DBResourceException.couldNotCreateTopLinkSessionException(DBResourceException.java:291)
         at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:883)
         at oracle.tip.adapter.db.transaction.DBTransaction.getSession(DBTransaction.java:375)
         at oracle.tip.adapter.db.DBConnection.getSession(DBConnection.java:266)
         at oracle.tip.adapter.db.InboundWork.init(InboundWork.java:322)
         at oracle.tip.adapter.db.InboundWork.run(InboundWork.java:526)
         ... 4 more
    Caused by: BINDING.JCA-11626
    Query Not Found Exception.
    Could not find Named Query [ReceiveSampleCustomPollSelect] with ? arguments, belonging to Descriptor [ReceiveSampleCustomPoll.F554102T] for [oracle.tip.adapter.db.DBActivationSpec@2ec733b0] inside of mappings xml file: [ReceiveSampleCustomPoll-or-mappings.xml].
    You may have changed the queryName info in either the _db.jca or toplink-mappings.xml files so that they no longer match.
    Make sure that the queryName in the activation/interactionSpec and in the Mappings.xml file match. If an old version of the descriptor has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this named query.
         at oracle.tip.adapter.db.exceptions.DBResourceException.queryNotFoundException(DBResourceException.java:694)
         at oracle.tip.adapter.db.ox.TopLinkXMLProjectInitializer.initializeQuery(TopLinkXMLProjectInitializer.java:1238)
         at oracle.tip.adapter.db.DBManagedConnectionFactory.acquireSession(DBManagedConnectionFactory.java:728)
         ... 8 more
    Help required to fit custom SQL in mapping.xml file for complex queries.
    Thanks,
    Arun Jadhav.

    "Execuite Custom SQL" in DB adapter and you'l get it.
    But in this case you'll have to implement your own polling strategy (if you need one).
    If you want to use one of the predefined polling strategy you should use "Poll for New or Changed records" and import all the tables you use and connect them in wizard.

  • Error while invoking custom API using Database Adapter

    Hi,
    I've a requirement where in I need to fetch the data returned by a recordtype of a custom API. I've implemented this by invoking the custom API using Database Adapter. I'm facing a problem while performing this.
    The custom API holds the signature as:
    PROCEDURE EMP_DET
    Argument Name Type      In/Out Default?
    P_DEPTNO NUMBER IN
    L_LINE_TBL TABLE OF RECORD OUT
    I've a schema with which it needs to be validated. It looks like:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:po="http://www.mycompany.com/ns/sales" targetNamespace="http://www.mycompany.com/ns/sales" elementFormDefault="qualified">          
    <element name="EmployeeDetails">          
    <complexType>               
    <sequence>                    
    <element name="EmpNo" type="integer"/>                    <element name="EName" type="string"/>                    <element name="Job" type="string"/>                    <element name="Mgr" type="integer"/>                    <element name="HireDate" type="date"/>                    <element name="Sal" type="decimal"/>                    <element name="Comm" type="decimal"/>               </sequence>          
    </complexType>     
    </element>
    </schema>
    I did a transformation to the above stated Emp.xsd with the xsd created for my custom API by the BPEL process. I could create the process and deploy successfully, but while invoking I get the following error. (I'm using BPM 10.1.3.1 with JDev 10.1.3.1)
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>6502</code>
    </part><part name="summary"><summary>file:/D:/OraBPEL/bpel/domains/default/tmp/.bpel_my_poc_1.0_16c5d0f7b937c780d27d8975726a15cb.tmp/emp_details.wsdl [ emp_details_ptt::emp_details(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'emp_details' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the SCOTT.BPEL_EMP_DETAILS.EMP_PKG$EMP_DET API. Cause: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    [Caused by: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the SCOTT.BPEL_EMP_DETAILS.EMP_PKG$EMP_DET API. Cause: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    [Caused by: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
    </summary>
    </part><part name="detail"><detail>
    Internal Exception: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at "SCOTT.BPEL_EMP_DETAILS", line 1
    ORA-06512: at line 1
    Error Code: 6502</detail>
    </part></remoteFault>
    Can someone let me know as to why I'm getting this error? Also lemme know if such an approach is valid to do, if not please suggest me alternate methods to do this.
    Thanks in advance,
    Gayathri

    The 'numeric or value error' is one we have seen many times. The problem has been identified and fixed. Refer to this thread for more information.
    Issue with DB Adapter - ORABPEL-11811

  • Execute custom SQL in DB Adpater errors out in Production - urgent please.

    Hi,
    I get this error when running the process in PROD at invoking delete operation that I'm doing by selecting the execute custom SQL option while defining the DB adapter. It worked fine in TEST environment but errors out in PROD env.
    Any suggestions on why? Its urgent.
    Thanks
    -Prapoorna
    The state of this instance is Faulted
    <messages><input><InvokeDelete_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="DeleteDataInput_msg"><DeleteDataInput xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/DeleteData"/>
    </part></InvokeDelete_InputVariable></input><fault><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>17410</code>
    </part><part name="summary"><summary>file:/prod/app/bpel/as/bpel/domains/verint/tmp/.bpel_SynchOTLLoad_1.0_0259c5f142631959ec0fb067d23fe98e.tmp/DeleteData.wsdl [ DeleteData_ptt::DeleteData(DeleteDataInput_msg) ] - WSIF JCA Execute of operation 'DeleteData' failed due to: Pure SQL Exception.
    Pure SQL Execute of delete from xxhxc_timeattend_to_otl where report_date >= TRUNC(ADD_MONTHS(sysdate, -1),'MM') failed. Caused by java.sql.SQLException: No more data to read from socket.
    ; nested exception is:
    ORABPEL-11633
    Pure SQL Exception.
    Pure SQL Execute of delete from xxhxc_timeattend_to_otl where report_date >= TRUNC(ADD_MONTHS(sysdate, -1),'MM') failed. Caused by java.sql.SQLException: No more data to read from socket.
    The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
    </summary>
    </part><part name="detail"><detail>No more data to read from socket</detail>
    </part></remoteFault></fault></messages>

    Looks like in production you have much more data than you do in your test environments.
    It could be something wrong with your rollback segments. Is there any other activity happening when this is running?
    What happens when you run this command inside SQLPlus?
    cheers
    James

  • Custom Sql fails when using Date Parameter

    I need to do following using DB adapter
    select count(*) from some_table where creation_date >= #from_date and creation_date <= #to_date
    I used Custom sql options, but It did not asked for add params. so I added manually above params in the query. I am getting following query. I don't know how to get this working. i am on 10.1.3.
    Here I am getting from and to dates from a AQ message. AQ has from and to_date as date type elements. I am doing copy assign of these to SQL input params
    below is the error.
    <messages><input>
    <RecordCount_service_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    name="XI_RecordCount_serviceInput_msg"><XI_RecordCount_serviceInput xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">
    <ns0:v_fromdate1 xmlns="" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">2008-01-01T00:00:00.000-06:00</ns0:v_fromdate1>
    <ns0:v_todate1 xmlns="" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">2008-01-31T00:00:00.000-06:00</ns0:v_todate1>
    <ns0:v_fromdate2 xmlns="" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">2008-01-01T00:00:00.000-06:00</ns0:v_fromdate2>
    <ns0:v_todate2 xmlns="" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/XI_RecordCount_service">2008-01-31T00:00:00.000-06:00</ns0:v_todate2>
    </XI_RecordCount_serviceInput>
    </part></RecordCount_service_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>1861</code>
    </part><part name="summary"><summary>file:/u01/app/oracle/product/10.1.3/bpm/bpel/domains/arun/tmp/.bpel_XI_P2EU_Allegro_Service_1.0_79d8666bc8efe5a375691e0a5f06e2e4.tmp/XI_RecordCount_service.wsdl [ XI_RecordCount_service_ptt::XI_RecordCount_service(XI_RecordCount_serviceInput_msg,XI_RecordCount_serviceOutput) ] - WSIF JCA Execute of operation 'XI_RecordCount_service' failed due to: Pure SQL Exception.
    Pure SQL Execute of select count(*) record_count FROM XI_TABLE WHERE ( (trunc(CREATION_DATE) >= ? AND TRUNC(CREATION_DATE) &lt;= ?) OR (trunc(last_update_date) >= ? AND TRUNC(last_update_date) &lt;= ?) ) failed. Caused by java.sql.SQLException: ORA-01861: literal does not match format string
    ; nested exception is:
         ORABPEL-11633
    Pure SQL Exception.
    Pure SQL Execute of select count(*) record_count FROM XI_TABLE WHERE ( (trunc(CREATION_DATE) >= ? AND TRUNC(CREATION_DATE) &lt;= ?) OR (trunc(last_update_date) >= ? AND TRUNC(last_update_date) &lt;= ?) ) failed. Caused by java.sql.SQLException: ORA-01861: literal does not match format string
    The Pure SQL option is for border use cases only and provides simple yet minimal functionality. Possibly try the "Perform an operation on a table" option instead.
    </summary>
    </part><part name="detail"><detail>ORA-01861: literal does not match format string
    </detail>
    </part></bindingFault></fault></messages>

    I think the database accepts only your database format' dd-mm-yyyy'.
    Try to define #from_date & #to_date as string and use to_date() in your custim sql statement.
    Marc

  • DB polling using custom SQL in SOA Suite 11g

    Hi,
    We are trying to poll records from a database using custom sql. But all the records in the table are being picked up at the same time and not as per the polling frequency set in the adapter.
    Below is the configuration from the .jca file:
    <endpoint-activation portType="II_ptt" operation="receive">
    <activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
    <property name="DescriptorName" value="II.OrderRequest"/>
    <property name="QueryName" value="IISelect"/>
    <property name="MappingsMetaDataURL" value="II-or-mappings.xml"/>
    <property name="PollingStrategy" value="DeletePollingStrategy"/>
    <property name="PollingInterval" value="60"/>
    <property name="MaxRaiseSize" value="10"/>
    <property name="MaxTransactionSize" value="10"/>
    <property name="SequencingColumn" value="REQUEST_SAK"/>
    <property name="NumberOfThreads" value="1"/>
    <property name="ReturnSingleResultSet" value="false"/>
    <property name="DeleteDetailRows" value="false"/>
    </activation-spec>
    </endpoint-activation>
    Please let us know if anything else needs to be set to enable the polling as per the frequency in the adapter.
    Thanks.

    As the link from Anuj said, you need to also configure 'Distributed Polling' in the wizard. This speed limit trick will no longer work out of the box in 11.1.1.3 on, you will also have to set usesSkipLocking="false" in your DbAdapter connection pool definition. Skip locking eliminates the locking contention issue, so this primitive kind of load balancing is no longer needed in that case.
    Thanks
    Steve

  • How to specify custom SQL in polling db adapter with logical delete option

    Hi all,
    I am writing a SOA composite app using JDeveloper SOA Suite 11.1.1.4 connecting to a SQL Server db using a polling DB Adapter with the logical delete option to send data to a BPEL process.
    I have requirements which go beyond what is supported in the JDeveloper UI for DB Adapter polling options, namely:
    * update more than one column to mark each row read, and
    * specify different SQL for the logical delete operation based on whether bpel processing of the data polled was successful or not.
    A complicating factor is that the polling involves two tables. Here is my full use-case:
    1) Polling will select data derived from two tables: e.g. 'headers' and 'details' simplified for this example:
    table: headers
    hid - primary key
    name - data label
    status - 'unprocessed', 'processed', or 'error'
    processedDate - null when data is loaded, set to current datetime when row is processed
    table: details
    hid - foreign key pointed at header.hid
    attr - data attribute name
    value - value of data attribute
    2) There is a many:1 relationship between detail and header rows through the hid columns. The db adapter polling SELECT shall return results from an outer join consisting of one header row and the associated detail rows where header.status = 'unprocessed' and header.hid = details.hid. (This is supported by the Jdeveloper UI)
    3) The polled data will be sent to be processed by a bpel process:
    3.1) If the bpel processing succeeds, the logical delete (UPDATE) operation shall set header.status = 'processed', and header.processedDate = 'getdate()'.
    3.2) If bpel processing fails (e.g. hits a data error while processing the selected data) the logical delete (UPDATE) operation shall set header.status = 'failed', header.processedDate = 'getdate()', and header.errorMsg = '{some text returned from bpel}'.
    Several parts of #3 are not supported by the JDeveloper UI: updating multiple columns to mark the row processed, using getdate() to populate a value of one of those column updates, doing different update operations based on the results of the BPEL processing of the data (success or error), and using data obtained from BPEL processing as a value of those column updates (error message).
    I have found examples which describe specifying custom SQL using the polling delete option to create a template then modifying the toplink file(s) to specify custom select and update SQL to implement a logical delete. (e.g. http://dlimiter.wordpress.com/2009/11/05/advanced-logic-in-oracle-bpel-polling-database-adapter/ and http://myexperienceswithsoa.blogspot.com/2010/06/db-adapter-polling-tricks.html). But none of them match what I've got in my project, in the first case because maybe because I'm using a higher version of JDeveloper, and in the second I think because in my case two tables are involved.
    Any suggestions would be appreciated. Thanks, John

    Hi John,
    You've raised a good scenario.
    First of all let me say that the purpose of the DB polling transaction, is to have an option to initiate a process from a DB table/view and not to update multiple fields in a table (or have other complex manipulation on the table).
    So, when choose to update a field in a record, after reading it, you are "telling" the engine not to poll this record again. Sure, i guess you can find a solution/workaround for it, but I don't think this is the way....
    The question now is what to do?
    You can have another DB adapter where you can update the data after finishing the process. In that case, after reading the data (on polling transaction) - update the header.status = 'processed' for example, and after processing the selected data update the rest of the fields.
    Hope it make some sense to you.
    Arik

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • Unable to execute the following sql statement in Jdev10g -- custom sql quer

    Hi All,
    I have requirement where I need to execute the below Query String through Jdev10g to Sql Server 2005.
    Query string -- select * from table where #InputString
    << Input String -- col3 like 'col%' and col1 like 'col2%' ...... >>
    Here the Input string will be generated by the client and the results will be transferred back to the client. Can any one help how to do this? Input string would like
    col1 like 'col%' and col2 like 'col2%' and so on.. and this is dynamic which can be changed in runtime like col3 like 'col3%' and col1 like 'col1%' and so on..
    I have tokenized the string and assinged the values and executed the custom string through Input parameters for all the fileds instead of only search string .. since table having so many null fields not receiving the exact row counts and records.. hence I have to pass only the Input string as I mentioned like Query String.. If some body got the same concern please let me know..
    Your help would be greatly appreciated..
    Thanks & Regards,
    Khasim

    Hi All,
    Even though the answer is a bit tedious by formulating the where clause with all fields and dynamic parameters, I achieved the goal. But we do have another option to use orcl:query-database in the transformation. But this one give tedious results when you are trying to achieve multiple rows from this. If some one have a better idea to utilize this query-database function, you are most welcome.
    Thanks & Regards,
    Khasim

  • Working with Custom SQL Using Descriptor Query Manager Queries

    Hi All,
    I am Working on Descriptor Query Manager Queries
    Configuring Custom SQL Using Java and Workbench
    Using Java I wrote a static method as in the code given below.
    public static void insertEmployee(ClassDescriptor descriptor){
    descriptor.getQueryManager().setInsertSQLString(
    "insert into EMPLOYEE (EMP_ID, EMP_NAME, EMP_JOB, SAL, DEPTNO) values (#EMP_ID, #EMP_NAME, #EMP_JOB, #SAL, #DEPTNO)"
    I wrote a insert SQL Query in the custom SQL tab of the Toplink workbench .
    Using java and Using Toplink Workbench I had a problem how to call this insert query in the sessionEJBBean .
    Can any one suggest me in this regard.
    Thanks in advance
    regards,
    Satish

    What is the problem you are experiencing?
    Normally you can just execute the query by calling
    'executeQuery(queryName, domainclass) on the session.
    See also
    http://www.oracle.com/technology/products/ias/toplink/
    doc/10131/main/_html/qrybas003.htm#BCFIBGGJ
    Just out of curiosity: why do you need a custom SQL
    to insert something? Can't you use persist()?
    regards,
    LonnekeOr even UnitOfWork ? Why go down the route of using custom inserts to insert objects unless you have some business logic that Toplink's UnitOfWork API cannot provide ?

Maybe you are looking for

  • Photoshop CC Error: "Could not complete your request because of a program error"

    The Error message "Could not complete your request because of a program error" popup every time when I open the Photoshop. Befroe I installed the Blow Up 3 plug-in, everything is fine but now it just bored me so much. Anyone can help? Thanks

  • Convert Word Docs to Pages - Newbie Needs Help

    New Mac user, I have a CD with several hundred Word files that I am trying to convert to pages files. I am not sure what version of word was used but pages will not open them. I am in the free 30 day trial of both iWork and MS Office so I have been o

  • Can we enable "Select record Set Message choice" of Table in left side

    Hi , I have requirement to set the "Select Record Set " Message choice of a table region on left side. Ex:If there are more records in a table region and message choice available to select next set of records. You can chk in Workflow Status Monitor f

  • Profit centre in Document Splitting

    Hi! I am facing problem with profit centre in document splitting. My client is posting document with two Balanse sheet accounts like Accrued Expenses Dr to Bank A/C, where both are Balance sheet accounts and there is no profit centre in those line it

  • Regarding Print Problem in ALV

    hi all,           I am getting o/p in ALV Report. When i am taking Print Print is not coming. I am using Function Module Reuse_alv_grid_display. Here i need to mention anything for printing. Please suggest. Thanx & Regards Rami