Intelligent Code Block for Jdbc Connection

I want to construct a block in which connection with database is always up. Suppose if database goes down the connection will go down but it should be up when the db goes up. Does anybody know solution for this or can give me hint or anything?

"MS" <[email protected]> wrote:
>
Hello All,
I am looking for a java program that can create JDBC connection pool
and datasource
using JMX/Mbeans of WLS 7.0.2.
Can somebody help?
Thanks in advance.
rgds
MS

Similar Messages

  • Can we set an Alert  for JDBC Connection Failures ?

    Hi friends ,
                      Can we set an alert for JDBC Connection failure as mail as well as Alert ?
                      I am using JDBC Sender adapter to read the data from sql server table.
                      I am not using BPM .
                      I want to set an alert and mail to respective person when JDBC Connection failure .
                      If XI trying to read a database if  connection failure or connection properties lost it won't come ti Integration engine itself  right ?
                     I assume as we have to set alert at system level .
                    Can you please give me the step by step details  to set this kind of alerts ?    
                      Expecting your reply asap .
    Best Regards.,
    V.Rangarajan

    Renga rajan,
    This is what I tried to explain in yuor previous threads.
    >>>If XI trying to read a database if connection failure or connection properties lost it won't come ti Integration engine itself right ?
    In such cases, you will get <b>an error at adapter level</b> and the msg wont come into IE.
    >>>I assume as we have to set alert at system level .
    If you are above SP 14 in XI3.0, then you can raise alerts for adapter errors also.
    No special config required for this.
    To understand this, give it a try and you will get the concept.
    Regards,
    Jai Shankar

  • Turn Autocommit off for JDBC Connection

    I'd like to control the commit for DBMS_XMLSave operations on my own instead of auto commit. The documentation says to "Turn Autocommit off for JDBC Connection", but I haven't found how to do that yet, any clues?

    My apologies for how complicated this is, it was written to be a
    generic xml processor for multiple tables. I narrowed it to one
    table. It converts a long to clob, parses it, walks the dom to
    find rows and processes each row. One InsertXML per row in the
    XML.
    CREATE OR REPLACE package whl_rtl_xml_pkg as
    --Context definitions by table
    HUDLINE_CTX_IND char(1) := 'N';
    HUDLINE_Ctx DBMS_XMLSave.ctxType := null;
    procedure accept_xml (in_long in long, out_sts out char, out_msg
    out varchar2);
    procedure updt_hudline(in_row_node in xmldom.DOMNode, in_clob
    clob, out_sts out char, out_msg out varchar2);
    procedure set_context(in_table_name in varchar2, out_sts out
    char, out_msg out varchar2);
    end whl_rtl_xml_pkg;
    CREATE OR REPLACE package body whl_rtl_xml_pkg as
    procedure accept_xml (in_long in long, out_sts out char, out_msg
    out varchar2) is
    begin
    declare
    -- Long to CLOB and Parse XML variables
    v_in_clob clob; -- Entire long converted to clob
    v_clob clob; -- One row written to clob from DOM
    doc xmldom.domdocument; -- Parsed XML Document
    v_long_lnth NUMBER;
    v_nbr INTEGER := 500;
    bbuf varchar2(500);
    p xmlparser.parser;
    retval xmldom.domdocument;
    --LOANLOCK information
    lock_list xmldom.DOMNodeList;
    lock_node xmldom.DOMNODE;
    lock_loan_nbr WHL_LOAN_TB.LOAN_NBR%TYPE;
    lock_rcd_updt_ts WHL_LOAN_TB.RCD_UPDT_TS%TYPE;
    lock_rcd_updt_user_id WHL_LOAN_TB.RCD_UPDT_USER_ID%TYPE;
    V_RETURN char(2);
    -- Rowset Info
    rowset_nl xmldom.DOMNodeList;
    rowset_len number;
    rowset_node xmldom.DOMNode;
    rowset_table varchar2(30);
    -- Row Info
    row_nl xmldom.DOMNodeList;
    row_len number;
    row_node xmldom.DOMNode;
    -- General
    v_table_name char(30);
    v_time char(10);
    v_ret_sts char(2);
    v_ret_msg VARCHAR2(200);
    function selected_nodes (in_xpath varchar2)
         return xmldom.domnodelist is
         retval xmldom.domnodelist;
    begin
    retval := xslprocessor.selectnodes (xmldom.makenode
    (doc),in_xpath);
         RETURN retval;
    end selected_nodes;
    begin
    --Connection.setAutoCommit(false);
    v_long_lnth := length(in_long); -- Determine length of XML Input
    -- Create Clob and convert long to CLOB
    dbms_lob.createtemporary(v_in_clob,TRUE);
    dbms_lob.createtemporary(v_clob,TRUE);
    dbms_lob.write(v_in_clob,v_long_lnth,1,in_long);
    -- Parse Clob, create DOM
    p := xmlparser.newParser;
    xmlparser.parseCLOB(p,v_in_clob);
    doc := xmlparser.getDocument(p);
    -- Loop through ROWSETS
    rowset_nl := selected_nodes('/ROOT/ROWSET'); -- Find rowset
    nodes
    rowset_len := xmldom.getLength(rowset_nl);
    for rs in 0..rowset_len-1 loop
    rowset_node := xmldom.item(rowset_nl,rs);
    rowset_table := xslprocessor.valueof
    (rowset_node,'TABLE_NAME'); -- Determine which table the rowset
    is for
    -- set up context for this table
    set_context(rtrim(rowset_table), v_ret_sts, v_ret_msg);
    IF V_RET_STS != '00' THEN -- Update failed for row
         OUT_STS := '01';
         OUT_MSG:= 'WHL_RTL_TEMPLATE_SP ERROR from:'||rtrim
    (v_ret_msg);
         RETURN;
    END IF;
    -- Loop through Row Nodes to process individual rows
    row_nl := xslprocessor.selectnodes (rowset_node,'ROW');
    row_len := xmldom.getLength(row_nl);
    for i in 0..row_len-1 loop
    row_node := xmldom.item(row_nl,i);
    xmldom.writeToClob(row_node, v_clob);
    -- DBMS_LOB.READ (v_clob, v_nbr, 1, Bbuf);
    -- dbms_output.put_line(substr(bbuf,1,200));
    -- Find elements of "ROW" -->Column Names needed for key
    processing
         -- call function to process row for the table
         -- pulls column names needed and update row in database
    as required
    if rowset_table = 'WHL_HUDLINE_TB' then
         updt_hudline(row_node, v_clob, v_ret_sts, v_ret_msg);
              IF V_RET_STS != '00' THEN -- Update failed for
    row
         OUT_STS := '01';
         OUT_MSG:= 'WHL_RTL_TEMPLATE_SP ERROR from:'||rtrim
    (v_ret_msg);
              RETURN;
              END IF;
         end if;
    end loop;
    end loop;
    -- Clean up
    dbms_lob.FREETEMPORARY (v_in_clob);
    dbms_lob.FREETEMPORARY (v_clob);
    out_sts := '00';
    out_msg := 'WHL_RTL_XML_PKG.ACCEPT_XML Finished without errors';
    exception
    when others then
    out_sts := '99';
         out_msg := 'WHL_RTL_XML_PKG uncaught error:'|| SQLERRM;
    end;
    end accept_xml;
    procedure updt_hudline(in_row_node in xmldom.DOMNode, in_clob
    clob, out_sts out char, out_msg out varchar2) is
    begin
    declare
    V_LOAN_NBR WHL_LOAN_TB.LOAN_NBR%TYPE;
    V_HUDLINE_NBR WHL_HUDLINE_TB.HUDLINE_NBR%TYPE;
    V_KEY_EXISTS NUMBER;
    v_rows_updt number;
    v_nbr number;
    v_msg varchar2(200);
    begin
    v_loan_nbr := xslprocessor.valueof(in_row_node,'LOAN_NBR');
    v_hudline_nbr := xslprocessor.valueof
    (in_row_node,'HUDLINE_NBR');
    select count(*) into v_key_exists from whl_hudline_tb
    where loan_nbr = v_loan_nbr
    and hudline_nbr = v_hudline_nbr;
    if v_key_exists > 0 then
    v_rows_updt := DBMS_XMLSave.updateXML
    (hudline_Ctx,in_clob);
    else
         v_rows_updt := DBMS_XMLSave.insertXML
    (hudline_Ctx,in_clob);
         END IF;
         if v_rows_updt = 0 then -- Error no rows were inserted
    or updated
    out_sts := '01';
         out_msg := 'UPDT_HUDLINE - insert/update did not
    update any rows for:'||V_LOAN_NBR||':'||
    V_HUDLINE_NBR||':'||V_KEY_EXISTS;
    else
    out_sts := '00';
    end if;
    exception
    when others then
    -- get the original exception
    DBMS_XMLQuery.getExceptionContent(HUDLINE_Ctx,v_nbr,
    v_msg);
    dbms_output.put_line('updt_hudline Exception caught ' ||
    TO_CHAR(v_nbr)
    || out_msg );
    out_sts := '99';
         out_msg := 'updt_hudline:'||v_msg;
    end;
    end updt_hudline;
    procedure set_context(in_table_name in varchar2, out_sts out
    char, out_msg out varchar2) is
    begin
    declare
    v_nbr number;
    v_msg varchar2(200);
    begin
    if in_table_name = 'WHL_HUDLINE_TB' then
    if HUDLINE_CTX_IND = 'N' THEN -- Context has not been created
    for the table
    HUDLINE_Ctx := DBMS_XMLSave.newContext('WHL_HUDLINE_TB');
         DBMS_XMLSave.clearUpdateColumnList(HUDLINE_Ctx); -- To
    test
         DBMS_XMLSave.clearKeyColumnList(HUDLINE_Ctx);
         DBMS_XMLSave.setKeyColumn(HUDLINE_Ctx,'LOAN_NBR');
         DBMS_XMLSave.setKeyColumn(HUDLINE_Ctx,'HUDLINE_NBR');
         DBMS_XMLSave.setCommitBatch(HUDLINE_Ctx, 0);
         HUDLINE_CTX_IND := 'Y';
    END IF;
    END IF;
    out_sts := '00';
    exception
    when others then
    -- get the original exception
    DBMS_XMLQuery.getExceptionContent(HUDLINE_Ctx,v_nbr,
    v_msg);
    dbms_output.put_line('set_context Exception caught ' ||
    TO_CHAR(v_nbr)
    || out_msg );
    out_sts := '99';
         out_msg := 'set_context error:'||v_msg;
    end;
    end set_context;
    end whl_rtl_xml_pkg;
    procedure kim_test as
    begin
    declare
    in_long long := '<ROOT>
    <ROWSET>
    <TABLE_NAME>WHL_HUDLINE_TB</TABLE_NAME>
         <ROW num="3">
              <LOAN_NBR>6000012</LOAN_NBR>
              <HUDLINE_NBR>104.3</HUDLINE_NBR>
              <HUDLINE_AMT>700</HUDLINE_AMT>
              <HUDLINE_PYMNT_MTHD_CD>A</HUDLINE_PYMNT_MTHD_CD>
              <HUDLINE_COMMENT_TXT>THIS IS A
    COMMENT</HUDLINE_COMMENT_TXT>
         </ROW>
    <ROW num="4">
              <LOAN_NBR>6000012</LOAN_NBR>
              <HUDLINE_NBR>104.4</HUDLINE_NBR>
              <HUDLINE_AMT>700</HUDLINE_AMT>
              <HUDLINE_PYMNT_MTHD_CD>A</HUDLINE_PYMNT_MTHD_CD>
              <HUDLINE_COMMENT_TXT>THIS IS A
    COMMENT</HUDLINE_COMMENT_TXT>
    </ROWSET>
    </ROOT>';
    out_err_sts char(2);
    out_err_msg varchar2(200);
    begin
    WHL_rtl_xml_pkg.accept_xml (in_long, out_err_sts, out_err_msg);
    dbms_output.put_line(out_err_msg);
    end;
    end;
    Output from running it
    SQL> edit
    Wrote file afiedt.buf
    1 delete from whl_hudline_tb
    2* where loan_nbr = '6606665'
    SQL> /
    2 rows deleted.
    SQL> commit;
    Commit complete.
    SQL> set serveroutput on
    SQL> execute kim_test
    WHL_RTL_XML_PKG.ACCEPT_XML Finished without errors
    PL/SQL procedure successfully completed.
    SQL> select loan_nbr, hudline_nbr, hudline_amt
    2 from whl_hudline_tb
    3 where loan_nbr = '6606665';
    LOAN_NB HUDLIN HUDLINE_AMT
    6606665 104.3 700
    6606665 104.4 700
    SQL> rollback;
    Rollback complete.
    SQL> select loan_nbr, hudline_nbr, hudline_amt
    2 from whl_hudline_tb
    3 where loan_nbr = '6606665';
    LOAN_NB HUDLIN HUDLINE_AMT
    6606665 104.3 700
    6606665 104.4 700

  • Error Code Definition for JDBC Thin driver

    Would like to know where I can find the definition of error codes
    for JDBC thin driver to Oracle 7 database. Right now, when I have
    database errors, I get SQL execption with CODE=XXXXXX. Need to
    know the definition of the error codes in order to decide whether
    the application shall retry or quit or do something else. Thank
    you in advance.
    null

    Hi,
    thin client session Language is controlled by java Locale.
    Based on testing code, ORA- messages are localized after the connection is successfully established. ORA- messages returned in the middle of connecting are in instance language.
    So, as far as I can say, you need to catch exceptions from DriverManager.getConnection(url, info); and translate them on your own.
    Once the connection is successfully returned, ORA- message language is defined by java Locale.
    Tests were performed on Oracle 10gR2 (both thin driver and DB).

  • Required Microsoft Sql Server 2005 Server Roles for JDBC Connection

    Hi!
    I have developed a database in MS SQL Server 2005, to which I would require only bulkadmin server role from an external java application, because I only need to update rows, insert values or use select queries in the database.
    The problem is that, using either the Microsoft JDBC Driver 1.1 or the Java JDBC ODBC Driver and the Windows XP Data Base (ODBC) configurations, I need a user with sysadmin server role inside Sql Server, otherwise JDBC won't connect to the database using the selected user. Even if I leave the sql login with setupadmin or any server role lower than sysadmin, the connection is refused.
    Is there no way to connect using JDBC to MS Sql Server 2005 other than granting the connected user sysadmin rights? My code looks as follows:
    String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    String url = "jdbc:sqlserver://FIREBLADE\\SQLEXPRESS";
    String user = "username";
    String password = "password$$";
    Connection conn;
    Class.forName(driver);
    conn = DriverManager.getConnection(url,user,password);
    if (conn != null)
    System.out.println("\nSQL Server Connection established ...\n");
    I have heard that Java JDBC connections to Microsoft require high-level access, and if that's the case I would rather migrate my database to MySql.
    Any informed answer is more than welcome. Thanks for reading my post!

    Well i personally prefer usage of open source MS SQL SERVER 2k jdbc driver called jtds instead of the driver provided by MS themselves(which is proproteriry) as i had similar problem which i personally encountered when i was using it.
    go through the below link for further info.
    http://jtds.sourceforge.net/
    REGARDS,
    RaHuL

  • How to increase the per-process file descriptor limit for JDBC connection 15

    If I need JDBC connection more that 15, the only solution is increase the per-process file descriptor limit. But how to increase this limit? modify the oracle server or JDBC software?
    I'm using JDBC thin driver connect to Oracle 806 server.
    From JDBC faq:
    Is there any limit on number of connections for jdbc?
    No. As such JDBC drivers doesn't have any scalability restrictions by themselves.
    It may be it restricted by the no of 'processes' (in the init.ora file) on the server. However, now-a-days we do get questions that even when the no of processes is 30, we are not able to open more than 16 active JDBC-OCI connections when the JDK is running in the default (green) thread model. This is because the no. of per-process file descriptor limit exceeded. It is important to note that depending on whether you are using OCI or THIN, or Green Vs Native, a JDBC sql connection can consume any where from 1-4 file descriptors. The solution is to increase the per-process file descriptor limit.
    null

    maybe it is OS issue, but the suggestion solution is from Oracle document. However, it is not provide a clear enough solution, just state "The solution is to increase the per-process file descriptor limit"
    Now I know the solution, but not know how to increase it.....
    pls help.

  • ABAP statement for JDBC connection to SQL server

    Hi Gurus,
    i need to connect a WebDynpro abap to a SQL server.
    My OS is Unix so i cannot use a ODBC connection.
    Can anyone help me to know if it's possible to write an abap statement to connect the SQL server by JDBC connection?
    thanks a lot
    Regards
    Claudio.

    Hi,
          ELSEIF SCREEN-GROUP2 = 'PRO'.
          clear: list.
          if screen-name = 'ZAVBAK-ZZPROMO_ID'.
            exec sql.
       commit
              set connection :'CBREPOSITORYPRD'
            endexec.
            exec sql.
              CONNECT TO :'CBREPOSITORYPRD'
            endexec.
            exec sql.
              COMMIT
            endexec
          EXEC SQL.
              OPEN C1 FOR
              SELECT CutterRewardsUserListid,
                     SAPAccountNumber,
                     PromoID,
                     FirstName,
                     LastName
                     FROM CutterRewardsUserList
                     WHERE SAPAccountNumber = :XVBPA-KUNNR ORDER BY PromoID
            ENDEXEC.
            DO.
              EXEC SQL.
                FETCH NEXT C1 INTO :WA5
              ENDEXEC.
              IF SY-SUBRC = 0.
                PERFORM UPDATE_LIST.
              ELSE.
                EXIT.
              ENDIF.
            ENDDO.
            EXEC SQL.
              CLOSE C1
            ENDEXEC.

  • How to store EXCEPTION code in separate code block for ease of maintenance?

    I'm new to pl/sql and oracle, but I've created a lot of procedures that use the same business logic for security checks. I've tried to outline an example stored procedure below.
    If my security checks that I use to raise exceptions are always the same for all of the stored procedures, what's the best way to structure the procedure/environment so that if I ever want to change (such as add or delete) the exceptions, that I don't need to manually edit each individual procedure? Could I call another procedure to do this, and the exceptions will be raised up through it to the calling procedure? Any example would be much appreciated.
    create or replace
    PROCEDURE MY_SPROC(
    AS
    begin
    /***** security check ****/
    SELECT col1, col2 INTO v_col1, v_col2
    FROM my_table1 WHERE user_email = in_user_id;
    -- check 1
    IF v_col1 != in_var1 THEN
    RAISE e_bad_input;
    -- check 2
    ELSIF v_col2 = in_var2 THEN
    RAISE e_bad_form;
    ELSIF ...
    END IF;
    ... /* body of code */
    EXCEPTION
    WHEN e_bad_input THEN out_msg := 'Error 1 …';
    WHEN e_bad_form THEN out_msg := 'Error 2 ...';
    WHEN e_bad_output THEN out_msg := 'Error 3 ...';
    WHEN NO_DATA_FOUND THEN out_msg := 'Error 4 …';
    WHEN OTHERS THEN out_msf := 'Error 5 ...';
    RAISE;
    end MY_SPROC;

    >
    Some other languages like ActionScript or C offer "import" or "include" commands that can be used to insert a code block to a function or procedure as if that block was typed exactly where it was imported or included
    >
    There is no equivalent of 'include'.
    >
    suppose I want to change the text description or error number in the exception
    I wonder what others do in this situation?
    >
    One way is to use the RAISE_APPLICATION_ERROR procedure.
    See Defining Your Own Error Messages (RAISE_APPLICATION_ERROR Procedure) in the PL/SQL Language doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/errors.htm#BABGIIBI
    >
    The RAISE_APPLICATION_ERROR procedure lets you issue user-defined ORA-n error messages from stored subprograms. That way, you can report errors to your application and avoid returning unhandled exceptions.
    To invoke RAISE_APPLICATION_ERROR, use the following syntax:
    raise_application_error(
    error_number, message[, {TRUE | FALSE}]);
    where error_number is a negative integer in the range -20000..-20999 and message is a character string up to 2048 bytes long. If the optional third parameter is TRUE, the error is placed on the stack of previous errors. If the parameter is FALSE (the default), the error replaces all previous errors. RAISE_APPLICATION_ERROR is part of package DBMS_STANDARD, and as with package STANDARD, you need not qualify references to it.
    An application can invoke raise_application_error only from an executing stored subprogram (or method). When invoked, raise_application_error ends the subprogram and returns a user-defined error number and message to the application. The error number and message can be trapped like any Oracle Database error.
    >
    The error_number and message can be variables so for generalization you could define the actual list of each in the package spec and then reference them by variable name in the code.
    So instead of
    RAISE e_bad_input;
    EXCEPTION
    WHEN e_bad_input THEN out_msg := 'Error 1 …';You would code
    -- package spec
    gc_bad_input_number NUMBER := -20001;
    gc_bad_input_message VARCHAR2(30) := 'Bad Input Message';
    -- code in procedure
    raise_application_error(gc_bad_input_number , gc_bad_input_message [, {TRUE | FALSE}]);Then you can change the message numbes and text used by changing the package spec and recompiling.
    NOTE: If you change the package spec it will invalidate related objects and they will need to be recompiled. So this approach is suitable when deploying new code in a window when the system is not available for users.
    An alternative is to create a table that contains the error numbers and messages and then load them into the package in the package body using the package level initialization section (a top-level block BEGIN). For that approach though the values might be loaded into an associative array where the key for each entry is the type of exception; for example 'bad_input'.
    The RAISE_APPLICATION_ERROR would reference the associative array for 'error_number's by using 'bad_input' as the key and the text message array the same way.
    The first approach hard-codes the codes and messages into the package spec so a code review can see them all.
    The second approach is table-driven and indirect so by looking at the code you don't really know what the codes or messages are going to be.
    Either approach could use a separate package spec dedicated to exception handling variables and declarations.
    Is that more like what you had in mind?

  • Sql server 2000 type4 driver for jdbc connection error

    hello,
    I am trying to connect m ms sql server 2000 database server with type 4 driver.But I am getting an connection error like *"Error Establishing Socket"* .Can any one please help me out?

    Well i personally prefer usage of open source MS SQL SERVER 2k jdbc driver called jtds instead of the driver provided by MS themselves(which is proproteriry) as i had similar problem which i personally encountered when i was using it.
    go through the below link for further info.
    http://jtds.sourceforge.net/
    REGARDS,
    RaHuL

  • How to find out the host, client and sid for jdbc connection

    I've just registered at oracle application express and would like to test my java programm from my pc
    I need the connection string in form: "jdbc:oracle:thin:@host:port:sid";
    where can I found out my host, port and sid?
    Thanks!
    Edited by: 1009284 on 01.06.2013 14:42

    Hi "1009284",
    If you registered at http://apex.oracle.com, then you are not able to connect directly to the database.
    Joel

  • How to use custom password encryptor/decryptor class for jdbc connection

    I am in process of migrating application from Jrun server to weblogic . In jrun we use to provide our custom class which used to decrypt the password provided in resource file as below
    <username>webclt</username>
    <password>AAAAAAASSSSSSSCCCCCCCCCCCCCC</password>
    <encrypted>true</encrypted>
    <encryption-class>com.CustomEncryptor</encryption-class>
    How could i use the same class while configuring datasource in weblogic 10 server.

    1- By default, the jre will read the user's cacerts which runs the program.
    2- You can specify another cacerts this way :
    System.setProperty("javax.net.ssl.trustStore", my_trust);
    For the case 1 and 2, you need to put the certificate in the cacerts.. Or,
    3- You implement a custom TrustManager which, for example, accepts all certificates :
    class X509TrustManagerTrustAll implements X509TrustManager {
    public boolean checkClientTrusted(java.security.cert.X509Certificate[] chain){
    return true;
    public boolean isServerTrusted(java.security.cert.X509Certificate[] chain){
    return true;
    public boolean isClientTrusted(java.security.cert.X509Certificate[] chain){
    return true;
    public java.security.cert.X509Certificate[] getAcceptedIssuers() {
    return null;
    public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
    public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {}
    and you call it in the right place in the code you wrote (SSLContext,..)
    Hope it helps and deserves a duke star ;)

  • Help  for jdbc connectivity

    hi
    As i am new to java studio enterprise,i wish to know to do database connectivity and how to use components from palatte like dbquery and qbreport
    i have installed netbeans5.0 and studio enterprise server 8.1
    expecting reply eagarly
    regards,
    Srinivas.

    Please check out the following tutorial and user's guide:
    http://www.netbeans.org/kb/articles/mysql-client.html
    http://www.netbeans.org/kb/50/using-netbeans/dbconn.html
    Regarding dbquery and qbreport, these are external tools and i think NetBeans does not provide direct support for these. In general though any JavaBeans component can be added to the GUI palette as described in:
    http://wiki.netbeans.org/wiki/view/FaqFormUsingCustomComponent

  • Portal Test Connection Failed for JDBC Connector

    Hi,
    We are trying to create a JDBC system in EP to connect SQL Server 2005 database. Our aim is to build a model in VC using data services from SQL Server 2005.
    We deployed the Driver file sqljdbc.jar  and connection was successful when tested by creating a data source  in Visual Administrator-> JDBC Connector
    We have created a system in EP with user mapping type (admin,user) and user mapping also done for system alias with the SQL Server administrator user id and password. UME is maintained in ABAP Stack. When we try for test connection with the system created in EP for JDBC connection, the system throws an error message like “Connection failed. Make sure user mapping is set correctly and all connection properties are correct“
    Test Details:
    The test consists of the following steps:
    1. Retrieve the default alias of the system
    2. Check the connection to the back end application using the connector defined in this system object
    Results
    Retrieval of default alias successful
    Connection failed. Make sure user mapping is set correctly and all connection properties are correct.
    The following are the URL and driver class name:
    URL: jdbc:sqlserver://<host_name>:1433;DatabaseName=”db_ name”
    Driver class name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Is there any other setting to be maintained in the Visual Administrator or in the Portal?
    Kindly let us know any clue to overcome this issue.
    Quick response highly appreciated.
    Regards
    Saravanan.r

    Hi Saravanan and Sathish,
    not sure how far you got with this. I had the same problem or at least a very similar one with access to MS SQL Server 2005 and solved it. I followed essentially very similar steps with a couple of minor twists:
    1) copied the sqljdbc.jar file to the storyboard server and  set the classpath environment variable to point to it.
    2) I did not create a data source, just created a new driver "SQLServer".
    3) Under Connector Container I cloned SDK_JDBC as "SDK_SSQL".
    4) The Visual Composer property vc.bi.sqlEditor Enabled should be set to true for you to be able the SQL Editor in the Data Service in VC.
    In the portal I created a system of type BI_JDBC from a template.
    The connection url and driver class were as in the thread:
    URL: jdbc:sqlserver:ipaddress:1433;DatabaseName=name
    Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    ConnectionFActoryClass as above under 3.
    User rights: admin,user
    The user mapping to the system alias should be as described.
    This should allow you to use the data service in VC to access SQL Server tables. If access to stored procedures (sometimes quite useful) is required, this would need to utilise the p9sqlserver.jar file already on the server.
    Best Regards
    Felix Logemann

  • JDBC Connections not being returned to pool

    Greetings All.
    I really need some help here to find out where my connections are being held.
    I have a transactional connection pool that runs out of connections on average three times a day. I've read all the threads in the newsgroups for connection leaks and how to always release connections in the finally block.
    1.
    I can confirm that it's definitely not a connection leak, I confirmed this by using the jar for tracing connection leaks and none was displayed.
    2.
    I've looked at all our code and all code that uses jdbc connections destroys jdbc resources in the finally clause.
    3.
    I'm new to the department and therefore cannot tell you what new code was put in that caused this problem to occur.
    4.
    We're using WL 8.1.3 AND JDK 1.4.2_06
    5.
    I've tried JMX to view what the connections are doing when this problem occurs, and hence enabled statement cache which revealed nothing of interest to me. I just wish somehow I could get to trace which threads reserved the connections and do a stack trace on them.
    The most frequent error in my jdbc logs is :
    java.sql.SQLException: ORA-01401: inserted value too large for column
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:70)
         at net.cellc.sal.ejb.saldataaccess.TransactionDAO.updateRecordStatus(TransactionDAO.java:76)
         at net.cellc.sol.ejb.sol.SOLBean.updateRecord(SOLBean.java:312)
         at net.cellc.sol.ejb.sol.SOLBean.processMessage(SOLBean.java:170)
         at net.cellc.sol.ejb.sol.SOL_ytyu34_EOImpl.processMessage(SOL_ytyu34_EOImpl.java:46)
         at net.cellc.sal.ejb.sal.SALBean.callSOL(SALBean.java:339)
         at net.cellc.sal.ejb.sal.SALBean.process(SALBean.java:201)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl.process(SAL_ki83rk_EOImpl.java:100)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1401)
    Your help would be really appreciated.
    Regards
    Ze Casperian

    Hi. Show us your pool definition. You should turn off refresh test minutes.
    Set it to 9999999.
    Joe
    Mncedisi Kasper wrote:
    Greetings All.
    I really need some help here to find out where my connections are being held.
    I have a transactional connection pool that runs out of connections on average three times a day. I've read all the threads in the newsgroups for connection leaks and how to always release connections in the finally block.
    1.
    I can confirm that it's definitely not a connection leak, I confirmed this by using the jar for tracing connection leaks and none was displayed.
    2.
    I've looked at all our code and all code that uses jdbc connections destroys jdbc resources in the finally clause.
    3.
    I'm new to the department and therefore cannot tell you what new code was put in that caused this problem to occur.
    4.
    We're using WL 8.1.3 AND JDK 1.4.2_06
    5.
    I've tried JMX to view what the connections are doing when this problem occurs, and hence enabled statement cache which revealed nothing of interest to me. I just wish somehow I could get to trace which threads reserved the connections and do a stack trace on them.
    The most frequent error in my jdbc logs is :
    java.sql.SQLException: ORA-01401: inserted value too large for column
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:70)
         at net.cellc.sal.ejb.saldataaccess.TransactionDAO.updateRecordStatus(TransactionDAO.java:76)
         at net.cellc.sol.ejb.sol.SOLBean.updateRecord(SOLBean.java:312)
         at net.cellc.sol.ejb.sol.SOLBean.processMessage(SOLBean.java:170)
         at net.cellc.sol.ejb.sol.SOL_ytyu34_EOImpl.processMessage(SOL_ytyu34_EOImpl.java:46)
         at net.cellc.sal.ejb.sal.SALBean.callSOL(SALBean.java:339)
         at net.cellc.sal.ejb.sal.SALBean.process(SALBean.java:201)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl.process(SAL_ki83rk_EOImpl.java:100)
         at net.cellc.sal.ejb.sal.SAL_ki83rk_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    SQLException: SQLState(23000) vendor code(1401)
    Your help would be really appreciated.
    Regards
    Ze Casperian

  • How do build URL in jdbc connection?

    I am doing one program in java.
    I created a database in Microsoft sql server 2005.
    In jdbc connection ,They need a URL but i don't know how do build a URL....
    so ,please give the source code for build a URL...
    and also give one example for jdbc connection using MSsql server 2005...

    Arun02006 wrote:
    I am doing one program in java.
    I created a database in Microsoft sql server 2005.
    In jdbc connection ,They need a URL but i don't know how do build a URL....You don't "build" a URL; it's just a String with a required content.
    so ,please give the source code for build a URL...Look in the docs for your JDBC driver.
    and also give one example for jdbc connection using MSsql server 2005...http://www.exampledepot.com/egs/java.sql/ConnectSqlServer.html
    %

Maybe you are looking for

  • Hard Drive / Volume (DroboPro) has suddenly became read only!? I think its due to a permission issue and i cannot correct it

    Bit concerned, my iMac seemed to crash yesterday... when i restarted the iMac .. i got the following message: OS X can’t repair the disk “DroboPro.” You can still open or copy files on the disk, but you can’t save changes to files on the disk. Back u

  • Video clip capture

    How can I capture a video clip from a news station or YouTube when there is no option to download the clip?

  • Error from F.5G

    Hello, I am going to run F.5G. While I am going to run this Tcode, I am getting error- The error is *Transactn KDF:  No valuation acct has been specified for acct 1120300800* Please tell me the Required Correction. Thanks

  • How to use BAPI with Decision Dialogue

    Hi Gurus would you please let me know how to use BAPI with decision dialogue in guided procedure . I have a BAPI checking logon credentials for the user . how to use this BAPI for making decisions that is if the logon is correct then perform one proc

  • Adobe form interactive with web dynpro

    I wanna get the user typed text from the form into web dynpro but get none. After user typed the comment in a input field and press the button in the web dynpro, the program will get the pdf source from the context and parse it. The program get other