Orcl:query-database in transform
Hi,
Suppose I am assigning the result of following to a field EmpId on the right had side of the transformation.
orcl:query-database(concat("select empno from emp where empno=",/tns:Root-Element/tns:Data/:tns:Empno),false(),false(),"jdbc/DbConnection")
Couple questions.
1) Can I use the above result in any subsequent queries in transformation, say get salary for this EmpID?
2) I am also worried about performance with this, as it doesn't look like the Empno is passed as a bind variable.
3) Is it possible to get the above query into a variable to be able to reuse later?
Appreciate your help.
Thanks
1) You cannot use for subsequent queries in transformation. Every time you need to define this function....
2) Performance may be an issue if transaction load is higher. You can see the time it takes for transform activity on BPEL Console.
3) You should be able to. Just go to Expression Builder in Assign activity and write orcl and ctrl+space. You should be able to view the options. This may help you http://blogs.oracle.com/rammenon/2007/05/passing_bpel_variable_contents.html
Similar Messages
-
Orcl:query-database gives error when using to_char function in select stmt
hi
Use Case : We get a csv file ("bank_import_<MMDDYYYYY>.csv") from the bank containing the transactions occured for the month. The date in the filename is retrieved into string and i need to convert this string to the format "MON-DD-YYYY". This is the required format for an header table which takes this string as primary key.
Code:
statement_name = '11302206'.........
<copy>
<from expression="concat("'select to_char(to_date('",bpws:getVariableData('statement_name') ,"','MMDDYYYY'),'MON-DD-YYYY') from dual'")"/>
<to variable="xpath"/>
</copy>
<copy>
<from expression="orcl:query-database(bpws:getVariableData('xpath'),false(),false(),'jdbc:oracle:thin:apps/apps@croaker:1529:RSICMI')"/>
<to variable="statement_name"/>
</copy>
Error:
[2006/12/06 19:13:04] Updated variable "xpath" less
<xpath>'select to_char(to_date('10302006','MMDDYYYY'),'MON-DD-YYYY') from dual'</xpath>
[2006/12/06 19:13:04] "XPathException" has been thrown. less
XPath expression failed to execute.
Error while processing xpath expression, the expression is "orcl:query-database(bpws:getVariableData("xpath"), false(), false(), "jdbc:oracle:thin:apps/apps@croaker:1529:RSICMI")", the reason is .
Please verify the xpath query.
Log Message:
<2006-12-06 19:13:04,595> <DEBUG> <UAT.collaxa.cube.xml> <XPathUtil::evaluate> XPathQuery[concat("'select to_char(to_date('", bpws:getVariableData("statement_name"), "','MMDDYYYY'),'MON-DD-YYYY') from dual'")], XPath Result: class=java.lang.String value='select to_char(to_date('10302006','MMDDYYYY'),'MON-DD-YYYY') from dual'
<2006-12-06 19:13:04,595> <DEBUG> <UAT.collaxa.cube.xml> <XPathUtil::initXPath> namespaceMapping is: rootMap: {bpws=http://schemas.xmlsoap.org/ws/2003/03/business-process/, xp20=http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20, ns4=http://xmlns.oracle.com/pcbpel/adapter/db/top/BAIBankUpload, ldap=http://schemas.oracle.com/xpath/extension/ldap, xsd=http://www.w3.org/2001/XMLSchema, ns5=http://xmlns.oracle.com/pcbpel/adapter/file/, client=http://xmlns.oracle.com/BAI_BankUpload, ora=http://schemas.oracle.com/xpath/extension, ns1=http://xmlns.oracle.com/pcbpel/adapter/file/readBAIBankImportCSV/, ns3=http://TargetNamespace.com/readBAIBankImportCSV, ns2=http://xmlns.oracle.com/pcbpel/adapter/db/Insert_SI_CE_STATEMENT_LINES_INT/, bpelx=http://schemas.oracle.com/bpel/extension, orcl=http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc, =http://schemas.xmlsoap.org/ws/2003/03/business-process/}
scopedMap: {}
<2006-12-06 19:13:04,751> <DEBUG> <UAT.collaxa.cube.xml> <XPathUtil::evaluate> XPathQuery :orcl:query-database(bpws:getVariableData("xpath"), false(), false(), "jdbc:oracle:thin:apps/apps@croakercom:1529:RSICMI")
org.collaxa.thirdparty.jaxen.FunctionCallException
at org.collaxa.thirdparty.jaxen.FunctionCallException.fillInStackTrace(FunctionCallException.java:124)
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at org.collaxa.thirdparty.jaxen.saxpath.SAXPathException.<init>(SAXPathException.java:83)
at org.collaxa.thirdparty.jaxen.JaxenException.<init>(JaxenException.java:82)
at org.collaxa.thirdparty.jaxen.FunctionCallException.<init>(FunctionCallException.java:86)
at oracle.tip.pc.services.functions.ExtFuncFunction$QueryDatabaseFunction.call(ExtFuncFunction.java:190)
at org.collaxa.thirdparty.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:184)
at org.collaxa.thirdparty.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:107)
at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:724)
at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodes(BaseXPath.java:253)
at org.collaxa.thirdparty.jaxen.BaseXPath.evaluate(BaseXPath.java:210)
at com.collaxa.cube.xml.xpath.XPathUtil.evaluate(XPathUtil.java:93)
at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.evalFromValue(BPELAssignWMP.java:501)
at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:122)
at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
Root cause:
java.lang.ClassCastException
at oracle.tip.pc.services.functions.ExtFuncFunction$QueryDatabaseFunction.call(ExtFuncFunction.java:158)
at org.collaxa.thirdparty.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:184)
at org.collaxa.thirdparty.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:107)
at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:724)
at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodes(BaseXPath.java:253)
at org.collaxa.thirdparty.jaxen.BaseXPath.evaluate(BaseXPath.java:210)
at com.collaxa.cube.xml.xpath.XPathUtil.evaluate(XPathUtil.java:93)
at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.evalFromValue(BPELAssignWMP.java:501)
at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:122)
at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
<2006-12-06 19:13:04,751> <ERROR> <UAT.collaxa.cube.xml> ORABPEL-09500
XPath expression failed to execute.
Error while processing xpath expression, the expression is "orcl:query-database(bpws:getVariableData("xpath"), false(), false(), "jdbc:oracle:thin:apps/apps@croaker:1529:RSICMI")", the reason is .
Please verify the xpath query.Hi,
QAbdul wrote:
when I tried to execute the followingin XMLQuery by calling TO_CHAR() whithin this query I am getting this error"ORA-19237: XP0017 - unable to resolve call to function - fn:TO_CHARTO_CHAR is a SQL function, XQuery is unaware of it.
XPath 2.0 specifications define a fn:format-date function but Oracle has not included yet in its XQuery implementation.
Easiest way to go is A_Non's solution, but if you need to format at multiple places in the query, you can declare a local XQuery function.
For example, to format to "DD/MM/YYYY" from the canonical xs:date format "YYYY-MM-DD" :
{code}
declare function local:format-date($d as xs:date) as xs:string
let $s := xs:string($d)
return concat(
substring($s, 10, 2), "/",
substring($s, 7, 2), "/",
substring($s, 2, 4)
{code}
and an example of use :
{code}
SQL> CREATE TABLE test_xqdate AS SELECT sysdate dt FROM dual;
Table created
SQL> SELECT *
2 FROM XMLTable(
3 'declare function local:format-date($d as xs:date) as xs:string
4 {
5 let $s := xs:string($d)
6 return concat(
7 substring($s, 10, 2), "/",
8 substring($s, 7, 2), "/",
9 substring($s, 2, 4)
10 )
11 }; (: :)
12 for $i in ora:view("TEST_XQDATE")/ROW/DT
13 return element e {
14 attribute xs_date_format { $i/text() },
15 attribute local_format { local:format-date($i) }
16 }'
17 COLUMNS
18 xs_date_format VARCHAR2(10) PATH '@xs_date_format',
19 local_format VARCHAR2(10) PATH '@local_format'
20 )
21 ;
XS_DATE_FORMAT LOCAL_FORMAT
2010-10-28 28/10/2010
{code} -
Query Syntax Bug in orcl:query-database function
Hi,
I have a 'Transform' process activity, I have a Description and I intend to get the corresponding Id on the basis of the "text Description".
e.g.
Input: "Jack"
table: EMP [i.e. Employee Table]
Expected Query: SELECT EMP_ID FROM EMP WHERE EMP_NAME = "Jack"
<SNIP>
<ns0:empId>
<xsl:value-of select="orcl:query-database('SELECT EMP_ID FROM EMP WHERE EMP_NAME="Jack"', false(), false(), 'jdbc:oracle:thin:soaadmin/soaadmin@localhost:1521:XE')"/>
</ns0:empId>
</SNIP>
Presently Resulting as:
oracle.xml.sql.OracleXMLSQLException: ORA-00904: "Jack": invalid identifier
Details:
It seems that it is not accepting quotes in the query.
- I tried escaping quote however it did not work.
- I tried giving " or amp;quot; or " - nothing worked.
Please Suggest me something on this.
regards
JoyHow about:
<ns0:empId>
<xsl:value-of select="orcl:query-database('SELECT EMP_ID FROM EMP WHERE EMP_NAME=&apos;Jack&apos;', false(), false(), 'jdbc:oracle:thin:soaadmin/soaadmin@localhost:1521:XE')"/>
</ns0:empId>
? -
Orcl:query-database ERROR
I am getting following error when I use orcl:query-database() function. JNDI name is correct and working for DB adapters. I dont knwo whats wrong with this..
<subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>XPathExecutionError</code>
</part><part name="summary"><summary>XPath expression failed to execute.
Error while processing xpath expression, the expression is "orcl:query-database('select testan_s.nextval from dual',false(),false(),'eis/DB/TEST)", the reason is message can't be null.
Please verify the xpath query.
</summary>
</part></subLanguageExecutionFault>Using JNDI name gives this freak error. If you use jdbc url string then it works in the last parameter.
It is really sad that these kind of simple functions are not working even in 10.1.3.3 which makes it very difficult to design the process in a simple way.
When will these will be fixed? is there any workaround? I need to use this in XSL transformations. any one has a clue? -
Use of sql group function in orcl:query-database - urgent
All,
Version: 10.1.3.4
Two requirements for me:
1. I want to use sum function in orcl:query-database. How to use it?
For ex: I tried the following
<xsl:value-of select='orcl:query-database("select sum(salary) from emp",false(),false(),"jdbc/DB1")'/>
I got the following error
oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XML tag name.
When I tried without sum function, it works fine
2. I used the same table, but without the sum function as below
<xsl:value-of select='orcl:query-database("select salary from emp",false(),false(),"jdbc/DB1")'/>
This time, it returns the first employees salary!! I dont understand this logic. I expected either the query returns all the rows else it throws error, but none of them were true!
Can anyone pls explain what is the behavior? I want your reply for both the queries!
Currently I'm in a project where I'm working in the similar scenario, so please guru's let me know ASAP.
Thanks,
SenHi Sen,
Create a normal variable variable in XSLT.
Then use that variable.
I mean variable name='Var_1' select='Your Query'
Now use Var_1/yourcollection/...
I am giving some example
<xsl:variable name="Stopdetails" select="/ns0:MyEBM/ns0:DataArea/ns0:MyEBO/ns0:Stops/ns0:Stop[ns0:StopID=$TempStopId]"/>
<xsl:variable name="AccStopTypeVar">
<xsl:value-of select="$Stopdetails/ns0:StopType"/>
</xsl:variable>If you want you can loop on the created variable.
You can do these in XSL.
But DB calls those things ...it would be better , if u take them out. Spme debugging problems are there with XSL.
Regards
PavanKumar.M -
XPath function orcl:query-database usage
According to the limited documentation I can find for this XPath function, I should be able to return a nodeset enclosed in xml elements -
"Returns a node-set by executing the sql-query against the specified database. The second parameter rowset indicates if the rows should be enclosed in a element. The third parameter row indicates if each row should be enclosed in a element."
However, whatever second and third parameters I pass in to this function, it always returns a single string consisting of the selected fields and rows concatenated together.
Does anyone know how (or if) I can use this function to return a resultset as an XML nodeset? (All the examples I've been able to find for this function set the second & third parameters = false())Try this example (it uses internal orabpel table):
orcl:get-content-as-string(orcl:query-database('select id, process_instance from bpel_variable_sensor_values where id < 30',true(),true(),'jdbc/BPELServerDataSourceWorkflow'))
it generates something like this (string):
<ROWSET> <ROW num="1"> <ID>23.0</ID> <PROCESS_INSTANCE>21.0</PROCESS_INSTANCE> </ROW> <ROW num="2"> <ID>25.0</ID> <PROCESS_INSTANCE>21.0</PROCESS_INSTANCE> </ROW> <ROW num="3"> <ID>27.0</ID> <PROCESS_INSTANCE>21.0</PROCESS_INSTANCE> </ROW> <ROW num="4"> <ID>29.0</ID> <PROCESS_INSTANCE>21.0</PROCESS_INSTANCE> </ROW> </ROWSET>
or define this element type in your wsdl file (or your xsd):
<element name="ROWSET">
<complexType>
<sequence>
<element name="ROW">
<complexType>
<sequence>
<element name="ID" type="string"/>
<element name="PROCESS_INSTANCE" type="string"/>
</sequence>
<attribute name="num"/>
</complexType>
</element>
</sequence>
</complexType>
</element>
and try to assign the output to variable of that type(without orcl:get-content-as-string). It should work. -
Using orcl:query-database to return a number of Columns
I have a BPEL process that is pulling data from some Database tables everything is working fine.
I now need to perform a lookup on the database to pull in some additional information (3 additional attributes) within the stylesheet, where each attribute comes from a separate table.
i.e.
select a.col1, b.col1, c.col1
from tab1 a
,tab2 b
, tab3 c
where a.col2 = b.col2
and .......blah blah blah....
I have used the orcl:database-query successfully to retrieve a single column and a single row and it works great.
However i'd like to run the above query as one statement, rather than 3 separate queries.
I've googled the fucntion for examples where it returns a nodelist or XML snippet, but to no avail.
I've tried it before and couldn't get it to work.
Does anyone have any examples.
Thanks in advance.
StuartI have a BPEL process that is pulling data from some Database tables everything is working fine.
I now need to perform a lookup on the database to pull in some additional information (3 additional attributes) within the stylesheet, where each attribute comes from a separate table.
i.e.
select a.col1, b.col1, c.col1
from tab1 a
,tab2 b
, tab3 c
where a.col2 = b.col2
and .......blah blah blah....
I have used the orcl:database-query successfully to retrieve a single column and a single row and it works great.
However i'd like to run the above query as one statement, rather than 3 separate queries.
I've googled the fucntion for examples where it returns a nodelist or XML snippet, but to no avail.
I've tried it before and couldn't get it to work.
Does anyone have any examples.
Thanks in advance.
Stuart -
Problem in using query-database() function in Transformation
Hi All,
I am using JDev and SOA 10.1.3.4.
I have an async process.
In that I am doing a transformation in which source is InputVariable and target is result.
In Transformation I am using query-database function to fetch a record from DB and am assigning that to result.
*<xsl:value-of select='orcl:query-database(concat("select ename from emp where empid=",/ns1:DBXSLProcessRequest/ns1:input),false(),false(),"jdbc:oracle:thin:scott/tiger@localhost:1521:abcd")'/>*
I am not getting any error but query-database is not returning any thing I maen it is returning null.
If i run that query in SQL prompt it is returning the empname.
Please help me out.
Regards
PavanKumar.MHi Pavan
I tried following in BPEL transform actvity's XSL file, and it works fine and returns the sysdate for me.
<xsl:value-of select='orcl:query-database("select sysdate from dual",false,false,"jdbc/myDS")'/>
Can you try above in new XSL file of Transform activity and let me know its gives you the result? if it works you can start making changes according to your requirement.
steps to follow:
1.create connection pool in EM, and make sure its working fine by using test on connection pool.
2.create Datasource and point to above created connection pool. and restart the oc4j_soa
3.rename the xsl file name of transform activity in BPEL and use above query-database function.some times xsl files are cached even if you make changes it will not take effect so for testing if you rename it will be good.
Thanks
Seshagiri.Rayala
http://soabpel.wordpress.com/ -
How to pass parameters to query-database function [Solved]
Dear All,
I'm working on a BPEL process which reads a file and the data is passes on
to a web service. In the transform activity to transform data from the source to the
web serivice parameters, I want to use the query-database function to check if
the value given in the file exists in the database. I have added a 'If' XSL construct
for this. Now when the query is static (given with hardcoded where clause), the
query-database function works fine. But I want to use one of the column in the
source variable in the SQL query I'm using in the query-database function.
i.e. If I give the query as below it is working:
<xsl:if test="orcl:query-database("select empno from emp
where empno='10'",.....) > 0">
I want to replace the hardcoded value 10 with the value from the source variable.
I'm not sure how this should be done. If I refer to the element directly in the XSL
it is not working. I've shown this below.
<xsl:if test="orcl:query-database("select empno from emp
where empno='/tns:Root-Element/tns:Data/:tns:Empno'",.....) > 0">
Something like above does not work. I'm not sure also if the syntax is correct. It
does not give any error, but the transformation does not happen.
Is there any way you can pass any input value as a parameter to the
query-database function?
Thanks in advance
-RubanHi Dipal,
The concat works! Thank you very much for the help. I didn't try concat before.
I was using a alphanumeric field, so it was required to add one more concat
for enclosing the value with single quotes. For numerical fields, one concat would
be enough as you had shown.
My xsl looks like this now:
<xsl:if test="orcl:query-database(concat(concat("select empno from emp
where empno='",/tns:Root-Element/tns:Data/:tns:Empno),"'"),
false(),false(),"jdbc/DbConnection") > 0">
This works properly.
Regards,
-Ruban -
How to use query-database() function in transformation?
Hi All,
How to use query-database() function in transformation?
It is giving four fields but if i write select query in sqlquery field it is saying select node is not found....
plz help me out
Regards
Pavankumar
Edited by: [email protected] on Jul 29, 2009 2:49 AMHi,
To answer your query:-
http://abhishek-soablog.blogspot.com/2008/08/orclquery-database.html
Cheers,
Abhi... -
Transformation not working on result from oraext:query-database() functio
Step 1: Create a project in Jdeveloper (File->New->Project->SOA Project)
Step 2: Select synchronous process
Step 3: Take the default schema for input and output
Step 4: create a schema to hold multiple simple type string values.
Step 5: Import that xsd file in the project wsdl file.
Step6: Create a another variable (var1) referring the above element type (result)
Step7: Drop an assign activity from component palette to the process between Receive and Replay activity
Step 8: In the from section use the function oraext:query-database("select ename from emp",true(),true(),'jdbc/EBS_database').in the to section select the var1 variable.
Step9: Drop another assign activity from component palette to the process before Replay activity and after the first assign activity
Step 10: In from section select the first ename using xpath from var variable and assign to the output variable.
Error: The value is not coming to the output from source(var) variable using xpath or transformation.See the audit trail on EM and verify why it is not working.
Regards,
Anuj -
Problem in using oraext:query-database() command in xslt
Hi,
I am querying a function through the query-database() command in a certain xslt within a BPEL Process as below:
<xsl:variable name="Corporation">
<xsl:value-of select="string('CORPORATION')"/>
</xsl:variable>
<xsl:variable name="CustAccIdFrmDB">
<xsl:value-of select='orext:query-database(concat("select xx_egytrans_integration.get_xid(",$getCustAccID,",",$Corporation,") from dual"),false(),false(),string("jdbc/otmdatasource"))'/>
</xsl:variable>
But, after deploying the BPEL Process and while running it, I am getting error at run-time.
Below is the error,
<bpelFault><faultType>0</faultType><subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc('xsl/Transformation__CustomerUpdate.xsl', $Invoke_getProfileOptions_getProfileOptions_OutputVariable.getProfileOptionsOutputCollection, 'Invoke_CustomerUpdateProc_Customer_UpdateProc_OutputVariable.OutputParameters', $Invoke_CustomerUpdateProc_Customer_UpdateProc_OutputVariable.OutputParameters, 'Invoke_CustAccProc_getCustAccID_OutputVariable_1.OutputParameters', $Invoke_CustAccProc_getCustAccID_OutputVariable_1.OutputParameters, 'Invoke_GetCustTaxExempt_getCustTaxExempStatus__Update_OutputVariable.OutputParameters', $Invoke_GetCustTaxExempt_getCustTaxExempStatus__Update_OutputVariable.OutputParameters, 'Invoke_getCustContactUpd_get_cust_acc_site_contactUpd_OutputVariable.OutputParameters', $Invoke_getCustContactUpd_get_cust_acc_site_contactUpd_OutputVariable.OutputParameters). The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: XML-22900: (Fatal Error) An internal error condition occurred.. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. </summary></part><part name="code"><code>XPathExecutionError</code></part></subLanguageExecutionFault></bpelFault>
Could you please let me know the probable reason for the error? Please help at the earliest.
Thanks,
PromitHi Anshul,
Thanks for replying.
The query upon executing in SQL Plus returns proper value. The result is either a concatenated string or 'NO_DATA'.
Please note that: $getCustAccID --> x-path expression and $Corporation --> hardcoded value - 'CORPORATION'.
I have tried formatting the string of the query in various ways, but no luck.. In all cases the error is same.
Waiting for your reply.
Thanks in advance..
Regards,
Promit -
Issue with oraext:query-database
While executing oraext:query-database('select no,name,mark from vivek_test',false(),false(),'jdbc:eis/DB/EBS') function
i am getting following error
<bpelFault><faultType>0</faultType><subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc('xsl/Transformation_2.xsl', $inputVariable.payload). The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: oramds:/deployed-composites/bi/SortTest_rev1.0/xsl/Transformation_2.xsl;lt;Line 18, Column 129>: XML-22044: (Error) Extension function error: Error invoking 'lookupTable':'java.lang.ClassCastException: oracle.tip.adapter.db.DBConnectionFactory'. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. </summary></part><part name="code"><code>XPathExecutionError</code></part></subLanguageExecutionFault></bpelFault>
kindly someone help me to resolve this issueHi ervan,
Use the jdbc/datasource instead of eis/DB/EBS.
oraext:query-database('select no,name,mark from vivek_test',false(),false(),' jdbc/datasourceName ')
See if this helps
http://neeraj-soa-tips.blogspot.com/2011/04/getting-xml-output-from-oraextquery.html
Regards,
Neeraj Sehgal -
Lookup-table and query-database do not use global transaction
Hi,
following problem:
DbAdapter inserts data into DB (i.e. an invoice).
Process takes part in global transaction.
After the insert there is a transformation which uses query-database and / or lookup-table.
It seems these XPath / XSLT functions are NOT taking part in the transaction and so we can not access information from the current db transaction.
I know workarounds like using DbAdapter for every query needed, etc. but this will cost a lot of time to change.
Is there any way to share transaction in both DbAdapter insert AND lookup-table and query-database?
Thanks, Best Regards,
MartinOne dba contacted me and made this statement:
Import & export utilities are not independent from characterset. All
user data in text related datatypes is exported using the character set
of the source database. If the character sets of the source and target
databases do not match a single conversion is performed.So far, that does not appear to be correct.
nls_characterset = AL32UTF8
nls_nchar_characterset = UTF8
Running on Windows.
EXP produces a backup in WE8MSWIN1252.
I found that if I change the setting of the NLS_LANG registry setting for my oracle home, the exp utility exports to that character set.
I changed the nls_lang
from AMERICAN_AMERICA.WE8MSWIN1252
to AMERICAN_AMERICA.UTF8
Unfortunately , the export isn't working right, although it did change character sets.
I get a warning on a possible character set conversion issue from AL32UTF8 to UTF8.
Plus, I get an EXP_00056 Oracle error 932 encountered
ORA-00932: inconsistent datatypes: expected BLOB, CLOB, get CHAR.
EXP-00000: export terminated unsuccessfully.
The schema I'm exporting with has exactly one procedure in it. Nothing else.
I guess getting a new error message is progress. :)
Still can't store multi-lingual characters in data tables. -
Application Error while using database deign transformer
Using the database deign transformer in Designer 6i I experienced the following dialog:
"An application error has occured and an application error log is being generated. smi61.exe Exception: access violation (0x0000005), Address 0x01f6c325"
This is a repeatable error. All the table have been created but I don't know if they have been left in a clean state.
A would like to stop this happening in the future, I have done this generation successfully in the past will the same settings that are now failing (but different entities)
Thank in advance for all help
HannahThe last two days have been frustrating. The error above also appeared when I was trying to view one of the relationships in one of my entities.
What seems to have been happening is Designer showed a relationship existing after it had been deleted. This seems to be a bug in Designer. These rouge links can be deleted in the RON (although if you try to look at their details the RON will crash with the error in original query). After this cleanup everything worked like clockwork.
Hannah Fraser
Maybe you are looking for
-
I have tried to get help 2 weeks using Adobe customer service. I have chatted with supervisors and normal staff “million times” and only one time I have talked with normal phone support. Phone support promised follow up the case and call me back next
-
Dear All,. I have a problem in SBO Service Manager. When I'm opening the Service Manager, the service seem not installed (blank) but when I'm looking in the Windows Server --> Administrative Tools --> Service, all the item in service manager is alrea
-
Upgrade SharePoint Content Types / Site Columns declaratively in SharePoint hosted apps
Hi! I have a question where I was unable to find any official guidance for. I have created a SharePoint hosted APP where I have multiple site columns and content types (declared in XML). The APP installs and functions just fine. Now I have a require
-
CS6 Master Collection install CS6 Master Collection install issues
On Mac running 10.7.4. Got the checksum error from the installer. Turned off checksum checking. Manually ran the install from the dmg file. InDesign, Fireworks, and Illustrator didn't install. What can I do? Thanks, Hal Work UGM - Eureka Photosh
-
Embed video player or flash payer on Jsp page
HI all, I am new to java, and i want store videos in database(Mysql) and also want to retrieve and play videos on my jsp page,like youtube,how can i embed video player or flash payer on my jsp page so that i can play videos of almost all formats. iam