Invoke sql

I am a new comer to IDM and I am starting a little RnD in Sun Java Identity Manager for an up and coming project. I am creating a rule using Business Process Editor (BPE). I am trying the invoke �<invoke name='sql' class='com.waveset.util.JdbcUtil'>� method with the Map constructor method. ../javadoc/com/waveset/util/JdbcUtil.html#sql(java.util.Map). All I am trying to do below is insert a row into a mysql DB with 4 bind parameters. I have successfully inserted a row with one bind parameter but when I add 2-4 bind parameters it always bombs on me and gives the output below. I can assure you all my values are set including arg 2. Any help would be appreciated.
Also I have turned logging on in MySQL and honestly it is no help because I can only see the prepare statement in the logs. I assume that the exception occurs before the execution.
--Snippet of Error�
XPRESS <invoke> exception:
com.waveset.util.WavesetException: Can't call method sql on class com.waveset.util.JdbcUtil
==> com.waveset.util.WavesetException:
==> java.sql.SQLException: Statement parameter 2 not set.
at com.waveset.util.Reflection.invoke(Reflection.java:895)
at com.waveset.util.Reflection.invoke(Reflection.java:833)
at com.waveset.expression.ExInvoke.evalInternal(ExInvoke.java:171)
at com.waveset.expression.ExNode.eval(ExNode.java:79)
at com.waveset.expression.ExNode.evalToObject(ExNode.java:498)
at com.waveset.object.Rule.eval(Rule.java:933)
at com.waveset.ui.editor.rule.RuleTester.execute(RuleTester.java:268)
at com.waveset.ui.editor.rule.ExpressionEvaluator$10.invoke(ExpressionEvaluator.java:597)
at com.waveset.ui.editor.util.SwingUtil$InvokableWrapper.run(SwingUtil.java:1555)
at com.waveset.ui.editor.util.ProgressDialog$2.run(ProgressDialog.java:101)
Wrapped exception:
Snippet of Rule
<invoke name='sql' class='com.waveset.util.JdbcUtil'>
<map>
<s>type</s>
<ref>type</ref>
<s>driverClass</s>
<ref>driverClass</ref>
<s>driverPrefix</s>
<ref>driverPrefix</ref>
<s>url</s>
<ref>url</ref>
<s>host</s>
<ref>host</ref>
<s>port</s>
<ref>port</ref>
<s>database</s>
<ref>database</ref>
<s>user</s>
<ref>user</ref>
<s>password</s>
<ref>password</ref>
<s>sql</s>
<s>insert into waveset.form (firstname, lastname, email, phone) value (?,?,?,?)</s>
<s>arg1</s>
<ref>firstname</ref>
<s>arg2</s>
<ref>lastname</ref>
<s>arg3</s>
<ref>email</ref>
<s>arg4</s>
<ref>phone</ref>
</map>
</invoke>

Tip 1 : turn on tracing for the class com.waveset.util.JdbcUtil (I'm assuming you know how to do this)
Tip 2 : instead of arg1, arg2, etc. try :
<s>parameters</s>
<list>
  <s>john</s>
  <s>smith</s
  <s>[email protected]</s>
  <s>1234</s
</list>

Similar Messages

  • Invoke SQL script in TCL

    Hi
    Is there a way to invoke SQL script to execute some DB commands inside a TCL script without using oraTCL functionality.
    Any hints will be appreciated. I could not find a lot about this on the web other than reference to using oraTCL which is an added functionality to be installed.
    Regards
    Birdy

    Hi
    Preferably execute SQL plus from TCL.
    We tried something like the following
    # test.tcl
    set ORACLE_SQLPLUS_HOME /u01/app/oracle/product/owbtst/bin
    if {[catch {set executeResult [exec  $ORACLE_SQLPLUS_HOME/sqlplus -L -S scott/tiger@orcl]} errmsg]} {
    puts "$errmsg"
    } else {
    puts "$executeResult"
    and executed the tcl script
    But it does not seem to work. Executing the below lines i.e.
    set ORACLE_SQLPLUS_HOME /u01/app/oracle/product/owbtst/bin
    exec $ORACLE_SQLPLUS_HOME/sqlplus
    hangs.

  • Invoking .SQL file from JAVA

    Hi All,
    Anyway of calling .SQL files from JAVA ??
    thanks in advance..

    What do you mean by calling?
    Are you talking about a stored procedure? Then yes.typo !!
    i meant invoking .SQL script only...
    No not stored procedure..i mean running or invoking a sql file containing sql statements(inserts etc)

  • Error while invoking SQL Server Database

    hello all,
    please help me with this error...I have given the datasource name in the XA datasource tab of connection factory..
    <bpelFault><faultType>0</faultType><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [InsertData.ScsApTransactions]. Caused by weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'dbo.SCS_AP_Transactions'.. Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-208" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary></part><part name="detail"><detail>[FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'dbo.SCS_AP_Transactions'.</detail></part><part name="code"><code>208</code></part></bindingFault></bpelFault>
    Thanks,

    I figured out the solution for my problem today....
    I have not selected the option "support global transactions " for my Non-XA SQL Server datasource...now i can get the data from SQL Server Database...

  • Invoking SQL Server function from Oracle

    Hi all,
    My question involves Oracle and SQL Server. I have a function in SQL Server that returns the count of rows in a table in SQL Server itself. I
    wish to invoke this function (in SQL Server) from Oracle. I have Transparent Gateway through which I usually connect to SQL Server to get the count. Is there a way in which I can execute the function (in SQL Server) from Oracle, something like below:
         select function_in_sql_server@transparent_gateway from dual;Thanks,
    ...

    I found below two links:
    how to call a sql server stored procedure from oracle
    http://en.allexperts.com/q/Oracle-1451/2008/6/Calling-SQL-Stored-procedure-1.htm
    Regards
    Girish Sharma

  • Invoke SQL Loader

    Hi,
    I have an application where I use a SQL Loader to load data onto the table. When i log in as a regular user i try to invoke the SQL Loader on the server. For the credentials to connect to the server like username/Password@database to invoke the sqlldr it looks into a table. We had hard coded the admin username and password while passing these credentials to the server. So irrespective of which user logged in it would load data into the admin.tablename. But right now we want to change that and we want to load data into each users individual table.
    For example if its user1 logged in .. when he does the data load it should load data into user1.tablename. So I assume i have to pass his credentials which connecting to the SQL loader instead of the admin. But we dont store any information of the user and their passwords in the application and there is no way we could retrieve password for each user. So if I dont have the password information of the user how would i connect to the server to run the SQL Loader. Could I pass the table name explicitly to the sqlldr instead of the .ctl file? Is there any work around to this as to how I could load data onto individual users tables.
    Thanks and Regards

    user635059 wrote:
    Hi,
    I have an application where I use a SQL Loader to load data onto the table. When i log in as a regular user i try to invoke the SQL Loader on the server. For the credentials to connect to the server like username/Password@database to invoke the sqlldr it looks into a table. We had hard coded the admin username and password while passing these credentials to the server. So irrespective of which user logged in it would load data into the admin.tablename. But right now we want to change that and we want to load data into each users individual table.
    Well, since you hard coded the admin username, that admin username has INSERT ANY TABLE, yes? So all you need to do is create SQL*Loader control file specifying OWNER.TABLENAME as load table. For example, control file is:
    load data
    into table u1.example
    fields terminated by ',' optionally enclosed by '"'
    (col1 char(5),
    col2 char(7))
    {code}
    Data file is:
    {code}
    hello,world,|
    james,bond,|
    {code}
    Now:
    {code}
    SQL> show user
    USER is "SCOTT"
    SQL> create table u1.example(col1 varchar2(10),col2 varchar2(10))
      2  /
    Table created.
    SQL> host sqlldr scott/tiger data=c:\temp\example.txt control=c:\temp\example.ctl
    SQL> select * from u1.example
      2  /
    COL1       COL2
    hello      world
    james      bond
    SQL>
    {code}
    SY.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Invoking SQL Loader from linux - Help Needed

    Hi All,
    When i tried to invoke the sql loader from linux by using following command
    sqlldr username@server/password control=loader.ctl
    But its always throws this message
    Message 2100 not found; No message file for product=RDBMS, facility=ULMessage 2100 not found; No message file for product=RDBMS, facility=UL
    Can somebody help me to fix this issue?

    You may need to set your Oracle environment, try this ($ is the command prompt):
    $ export ORACLE_SID=orcl
    $ . /usr/local/bin/oraenv
    $ sqlldr username@server/password control=loader.ctl:p

  • Invoking SQL*Plus from tool or contextmenu bug

    If connection was created using the Basic-Tab everything is fine.
    If used TNS-Tab and network alias sql*plus menu point is greyed out .
    If used TNS-Tab and connect identifier or Advanced-Tab sql*plus is invoke with the wrong
    connect string.
    Example:
    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=host1.abc.com)(PORT=51001))(ADDRESS=(PROTOCOL=tcp)(HOST=host2.abc.com)(PORT=51001)))(CONNECT_DATA=(SERVICE_NAME=DEV)))
    Result: sqlplus starts but with wrong connect string
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 14 10:24:17 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    Enter user-name:
    konsole -e /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus apps@jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=host1.abc.com)(PORT=51001))(ADDRESS=(PROTOCOL=tcp)(HOST=host2.abc.com)(PORT=51001)))(CONNECT_DATA=(SERVICE_NAME=DEV)))

    It does seem to be fairly arbitrary whether SQL*Plus is available or not. I have many connection definitions covering 9i to 11g and SQL*Plus is not available for a random selection of them. They are all defined using the Basic connection tab and I can't see any differences between the one which work and the one which don't.
    It also doesn't make much sense to disable it if the focus is in the sql worksheet and not on a node of the connection navigator.
    Why should it be necessary to define sqlplus as an external tool to get round arbitrary limitations when it should be supported directly.
    I hope these problems are being addressed for the next release.

  • Invoke sql 2005 native web services

    Dear all,
    I am trying to  invoke from sap ecc 6.0 a native web services written in sql 2005.
    For instance the web service path is something like http://10.1.0.197:8080/EmployeeXml?wsdl .
    The web method is GetEmployeesXml
    If I try to consume via custom .net application, it works but when I try to do the same in sap
    following this guide
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/802edea6-274e-2e10-fd95-e5e1a8bc0892?QuickLink=index&overridelayout=true
    I get the error http not supported.
    The differnce between an asp.net web services (where everythings works) and this one is regarding the autentication.
    For the first one it is possible to specify anonymous login for second it is necessary to specify the username and password.
    I kindly ask you to give any help to solve this issue, or is there a manual for sm59?
    Thank you very much

    Try with the following:
    <xsd:complexType name="SqlResultStream">
       <xsd:sequence>
          <xsd:element name="SqlRowSet" type="sqlsoaptypes:SqlRowSet" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element name="SqlXml" type="sqlsoaptypes:SqlXml" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element name="SqlMessage" type="sqlmessage:SqlMessage" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element name="SqlRowCount" type="sqlrowcount:SqlRowCount" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element name="SqlResultCode" type="sqlsoaptypes:SqlResultCode" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element name="SqlTransaction" type="sqltransaction:SqlTransaction" minOccurs="0" maxOccurs="unbounded"/>
       </xsd:sequence>
    </xsd:complexType>
    You also have to know that this is not a perfect equivalent, as no tag can replace the xsd:choice. The xsd:choice means that only one of the elements can occur, while in xsd:sequence any of the elements can occur. But you should be able to achieve the same with a properly built mapping: create only one of the fields, and leave the rest empty - this is possible thanks to minOccurs="0".
    Hope this helps,
    Greg

  • Invoke SQL Loader from PL/SQL Procedure

    hi
    Is there any way to invoke sqlloader from a PL/SQL Procedure ?
    Thanks
    Ashish

    'HOST' is not a PL/SQL command, it's a SQL*Plus command.
    If you think about it for a moment, being able to run an O.S. command, such as SQL*Loader, from within the database is pretty dangerous. I suspect this is why Oracle has no way of doing it. Otherwise, a you'd be able to execute an O.S. command as the user 'oracle' (on UNIX - probably 'SYSTEM' on NT, which is even worse!!!).
    All it takes is to change this :
    execute '/usr/oracle/bin/sqlldr user/password@DB file=input.txt' ;
    to this :
    execute 'rm -rf /usr/oracle' ;
    and you can start checking the job adverts...

  • How to Hide password when invoking sql plus from command promt?

    When i try to open sql plus in command prompt window and enter the sqlplus command follwed by username/password@connection string, the password is not hidden.
    How do I get it to show **** instead of displaying password characters out?
    Also, what is the command to clear screen : when I try cls or clear screen, I get a windows memory exception of somekind and the only option there is to kill the command window.
    Any tips on getting around this?
    Thanks a lot for your time and help.

    user8848256 wrote:
    Can you please give more details on how to not enter password when calling sqlplus from command window like you are saying?
    I tried this :
    sqlplus username/ @connection string -->Hit Enter : it asks for password but does not recognise the connectionstring to connect to.
    sqlplus username/ -->Hit Enter: It does same thing again.asks for password but gives tns adapter error after the password is entered.Leave out the slash:
    sqlplus username@connect_string

  • Can we invoke sqlloader from sql * plus

    Hi,
    I need to invoke sql * loader from sql plus.
    is it possible?

    SQL*Loader is an OS prompt command, why want to use it under sql*plus ?
    Anyway, you can find threads searching to see how run a shell scripts into the database.
    Nicolas.

  • How to invoke multiple sessions of sql*plus thru pl/sql program

    Hi
    How to invoke multiple sessions of sql*plus thru pl/sql program.
    Thanks

    How to invoke sql*plus in a procedure?????
    I have to invoke more pl/sql sessions?????No you don't "have to".
    Look at what you are trying to do.
    You have a program running inside the PL/SQL engine. This is running nicely inside the Oracle database and is perfectly capable of issuing other SQL statements, PL/SQL programs etc. inside it's nice cosy Oracle environment.
    You are asking for this PL/SQL to shell out to the operating system, run an external application, for which it will have to supply a username and password (are you planning on hard coding those into your PL/SQL?), and then that external application is supposed to run more SQL or PL/SQL against the database.
    a) Why hold all this code external to the database when it can quite happily reside on the database itself and be executed through jobs or whatever.
    b) Consider what would happen if someone were to replace the external application with their own program of the same file name... they'd be able to capture the username and password for connecting to the database, therefore a major security flaw.
    The whole idea of doing what you want through external calls to SQL*Plus is ridiculous.

  • Invoke shell script thru pl/sql

    Hi,
    Is it possible to invoke a shell script thru a stored procedure? If possible how do we go about?
    For example,
    We have an application which has the following architecture:
    Front End : Java (web enabled)
    Middle Tier : Java web server 2.0
    Back End : Oracle 8.1.6 on Solaris 2.7.
    Our application needs sql loader to be invoked thru the web. For that there are two approaches.
    1. Call the SQL Loader from front end itself. For this we need to have signed servlets etc., This seems quite complex because our back end and web server resides in two different solaris servers.
    2. Call a stored procedure from front end which in turn calls the shell scripts which can in turn invoke sql loader etc.,
    Do you have better solutions? Any suggestion will be deeply appreciated.
    Thanks,
    Raghu.

    Dear Raghu,
    As per my experience calling external procedures from oracle may cause some moderate-to-severe problems. I suggest an alternative solution which is the following:
    1. Your PL/SQL program calls a C cartridge using ICX. The way it works is you call utl_http.request() or utl_http.request_pieces() if the amount of data to be passed back exceeds 2000 characters.
    2. The C cartridge is basically "Hello WORLD" from Oracle examples. The only change is that you substitute the WRB_printf("Hello World") with popen("script.ksh",...)
    3. This way the C cartridge calls your shell script.
    --PL/SQL
    BEGIN
    utl_http.request(...); --> calls C
    END;
    /* C cartridge
    popen("script.ksh",...) /* --> Calls shell */
    #Shell script1.ksh --> calls sqlldr
    sqlldr ...
    P.S. You gotta have at least Oracle 7.3.4 with the OAS at least 3.02

  • How can I invoke a sql loader from oracle form?

    I'm got a problem on invoking sql loader command from oracle form where the sql loader product has been installed in Window NT.
    Thanks for your help!

    U can use HOST procedure with NO_SCREEN option.
    this will go like
    Host('d:\orant\bin\SQLLDR80 USERID=username/password@connect CONTROL=contril_file.CTL LOG=log_file.LOG discard=discard_file.dis bad=bad_file.bad', NO_SCREEN);
    Hope this will Work
    Good Luck :-)
    Naren

Maybe you are looking for

  • How to create a group list in the directoty of contacts?

    How do I make a group to text or email from some of my contacts?

  • A/R Invoice should be open while partial payment

    I am having a problem in incoming payment. 1. Firstly i made one A/R Invoice of Rs. 10000. 2. Then in incoming payment by using payment means i had made the partial payment of Rs 4000. According to logic A/R Invoice should remain Open, but its not ha

  • Problem with Net Service name

    while installing oracle data warehouse builder 10g i am getting prob such tat INS0009:Unable to connect to the database with user SYS java.sql.SQLException:Io exception : could not resolve the connect identifier OraHome_1\network\ADMIN\SAMPLE\TNSNAME

  • Additional field to be added in sap standard report

    hi when we run fbl1n for vendors or fbl5n for customer we are getting only vendor or customer code, how to get vendor name and customer name in same sap standard report please suggest regards yuvraj singh

  • Personal Data ESS WDA

    Dear experts. I am configuring ESS for Colombia. We are using WDA. ERP 6.0 ehp 6. The structure of conversion used is: HCMT_BSP_PA_XX_R0002 For this country the system use a Infotype SECONDARY 0837 that is showed in the screen of the Infotype 0002. V