JDBC Adaptor problem

Hi
I am doing JDBC-RFC-JDBC Scenario without BPM with quality of service  BE.
In this, JDBC sender adaptor is updating the table1 with sent flag = 'X'. Now the prob is the receiver adaptor is also upadting  table1 with some data and  here it is hanging . Is JDBC  sender adaptor locks the table1 till the whole cycle is completed or there is another reason?????? If it likes that how to solve this
Thanks in advance
Regards
Vijay

What is the error that you are getting.?
Just for test purposes, in the Sender JDBC adapter, select Advanced Mode --> Database Transaction Level and select option --> None.
Regards
Bhavesh
PS : The setting described above should never be tried on a production environment.

Similar Messages

  • Complete knowledge on jdbc adaptor in PI7.1

    Hi all,
    I would like to have the complete knowledge on JDBC adaptor.
    Please provide me with links (of previous forumns if any) or blogs...
    what are the capabilities of using JDBC adaptor and also limitations....
    Cheers,
    karthick

    Hi,
    The only way to become expert in JDBC adapter is first reading help documentation clearly,try to understand the usage and how to deploy the drivers and how execute the queries.do some diferent scenarios and execute some stored procedure scenarios too.
    refer below link for sap pi7.1 jdbc adapter doc
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    there is no specific limitations as per my experiece,some times when we updating huge amount of data in to data base,i faces some problems,we resolved following some best development standards like using good sql queries.
    Regards,
    raj

  • JDBC adaptor error

    Hi,
    I got some error in JDBC adaptor CC "no Adaptor registered for this channel "
    in adaptor monitoring it shows JDBC in all adaptor list, but after selecting
    only installed and started it is disappearing.
    we installed ojdbc14,downloded from database provider site, and it's deployment shows successfully deployed.
    regards,

    Hi, Senthil:
    I suggest that you search SAP notes based on your database vendor. When deloy driver on Java stack, deploy successfully does not guarentee that it works. I came cross the situation and found the notes solve the problem.
    Good luck
    Liang

  • SELECT,UPDATE, DELETE With JDBC Adaptor

    Dear All,
    I need to execute few Select, update and Delete statement by using JDBC Adaptor.
    Suppose While select statement no records selected.
    During Update no records exsist with specified key so no update possible.
    During delete if no record found with specified key so no deletion possible.
    In above cases do I get any error, any where in XI . Either in SXMB_MONI or in RWB.
    Regards,
    Raghvendra

    Hi
    You will be getting SQL error in RWB and not processed flag in SXMB_MONI
    Along with this you can use OS level command STDOUT and STDERR to write out the trace.
    using JDBC you can even use following Isolated setting.
    ·        Default (default setting of the respective database)
    ·        None
    ·        read_uncommitted (weakest setting)
    ·        read_committed
    ·        repeatable_read
    ·        serializable (strongest setting)
    You must only lower the isolation level where necessary and as far as necessary. To avoid data inconsistencies in the database when the isolation level is lowered, ensure that multiple database transactions cannot access the database simultaneously.
    With this Do not set Auto Commit enabled indicator if the JDBC driver supports transactions.
    Thanks
    Gaurav Bhargava

  • MSSQLServer jdbc connect problem on ODI 11G R2

    I have a MS SQL Server jdbc connect problem on ODI 11G R2 / Windows server 2008 64 bits.
    Tried, one by one, all versions of Microsoft drivers.
    Sqljdbc4.jar copied to : %appdata%\odi\oracledi\userlib\
    The Topology connect syntax is :
    driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
    URL : jdbc:sqlserver://<host>:1433
    => All the topology tests end with time-outs.
    Installed 10G ODI.
    Works with 1.4 java and sqljdbc.jar version 2 jdbc driver.
    Times out with version 3 and/or Sqljdbc4.jar + JAVA_HOME & ODI_JAVA_HOME set to 1.6 path.
    also tried, with no success (time-outs) on either 10g or 11g :
    com.inet.tds.TdsDriver
    jdbc:inetdae7://<host>:1433?database=<DB>
    same results for :
    net.sourceforge.jtds.jdbc.Driver
    jdbc:jtds:sqlserver://<host>:1433
    Any suggestions for a fix?
    Many thanks in advance.

    Hello,
    ODI (11g) Studio is certified on Windows 32 bit only, not on 64bit.
    However you may still install it and configure ODI Studio to run with a 32 bit java.
    Details pls see Master Note For ODI 11g Install Issues And Questions (Doc ID 1214428.1).
    To connect to SQL Server:
    # Check and make sure the authentication mode of your Microsoft SQL Server Server is set to "SQL Server and Windows" or "Mixed", otherwise Oracle Data Integrator (ODI) is unable to connect to the database.
    # Before you create the Oracle Data Integrator (ODI) Dataserver in Topology Manager > Physical Architecture, stop all ODI processes, and place the JDBC Driver file in the ODI's userlib and "/drivers" folder.
    For ODI Studio (Local No Agent)
    %APPDATA%\odi\oracledi\userlib
    %APPDATA% is the Windows Application Data directory for the user (usually C:\Documents and Settings\<user>\Application Data).
    Standalone Agent
    ODI_HOME\oracledi\agent\drivers
    Note: If you decide to use the DataDirect driver that comes with ODI 11g install/ embedded in ODI 11g
    weblogic.jdbc.sqlserver.SQLServerDriver
    Then you don't need to worry about this step.
    # Make sure that the database is the default database of the user account employed by ODI for connection, and that the password is correct.
    # Verify (in your Microsoft SQL Server Server network configuration) that TCP/IP has been enabled on port 1433.
    For more details see How To Set Up JDBC Driver Connections For The Microsoft SQL Server For ODI (Doc ID 423914.1)
    If you try sqljdbc.jar, you need to configure ODI_JAVA_HOME to jdk1.5
    sqljdbc4.jar, jdk1.6 (since ODI 11g requires jdk1.6, I'd suggest sqljdbc4.jar)
    More see Compatibility Matrix For Java Machines And JDBC Drivers Used With ODI (Doc ID 807235.1)
    Hope that helps other people who run into this,
    Edited by: user742480 on Apr 4, 2011 12:06 PM

  • Pre requisites in JDBC adaptor

    hi gurus,
    what are the pre requisites in JDBC Adaptor,
    Regards,
    priya

    hi
    we need to install and configure the drivers
    check this document
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f04ce027-934d-2a10-5a8f-fa0b1ed4d88f                                   
    JDBC connection set up for different DATABASE                                   
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/jdbcConnectionSetup                                   
    regards
    kummari

  • How to call sender JDBC Adaptor, if there is a indication file

    Hi All,
    I have a requirement need to  pull data from Oracle and send it to BI.
    Here what i need is like Oracle will give me Indication flat file with 0 records and it will be there in FTP floder, once XI finds that file in the FTP folder then only my JDBC sender adaptor needs to pull data from Oracel and send it BI
    Could you pls suggest me how i can achive this hope we can do it with BPM, or any suggestions to do this.
    Thanks in advance,
    Venkat.

    Hi,
    True that i am new to XI.
    Here the problem is i will get 0 bites flat file i will not get any data in that file, so how i can handle that flat file, and once the flat file is there after that i need to start the JDBC sender adaptor to pull the data
    1. Receive step for the Flat File
    2. Synchronous Send step for Calling JDBC (so you will get some JDBC response back to IP).
    3. Asynchronous Send step to send step2 JDBC response to BI system.
    as you said the BPM will be like this am i correct
    Receive step for File-->Receive step for JDBC-Send step for BI am i correct this process.
    could you pls explain me bit more so its like
    Thanks inadvance
    Venkat

  • Semmingly intractable JDBC connect problem

    Greetings,
    I am having massive difficulties getting our application to talk to our oracle database. We've (probably unwisely) upgraded the OS to RH9, the database to Oracle 9i and the JDK to 1.3.1 (from RH7, 8i and 1.2).
    The problem is that when I try to connect via JDBC in a jsp, it hangs for a long time and comes back with "ServletException: Io exception: the Network Adaptor could not make the connection." This seems to be a common problem, but I have worked extensively on this, and have tried all the posted remedies I can find: connect URL is verifiably correct, database/listener running, path, networking, different connect methods, etc.
    At a low level, what happens is that the listener establishes the connection, but never recieves a reply back, and I can't determine whether oracle is failing (no trace/log seems to support it) or if JDBC is failing. Since all I get is "Connection failed" in a single method call, I'm not sure how to diagnose that.
    Has anybody seen this before? It's killing me
    Thanks,
    --M                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Can you run a simple app that connects to Oracle successfully, no Tomcat or JSPs involved? I'd try that, if you haven't already.
    Here's a simple Java app that will let you try it:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class ConnectionTest
        public static void main(String [] args)
            try
                if (args.length > 0)
                    Connection connection = ConnectionTest.getConnection(args[0]);
                    DatabaseMetaData meta = connection.getMetaData();
                    System.out.println("Database product: " + meta.getDatabaseProductName());
                    System.out.println("JDBC driver     : " + meta.getDriverName());
                    connection.close();
                else
                    System.out.println("No properties file given");
            catch (SQLException e)
                System.err.println("SQL state: " + e.getSQLState());
                System.err.println("SQL error: " + e.getErrorCode());
                e.printStackTrace(System.err);
            catch (Exception e)
                e.printStackTrace(System.err);
        public static Connection getConnection(final String propertiesName)
            throws ClassNotFoundException, SQLException,IOException
            Properties props=new Properties();
            FileInputStream in=new FileInputStream(propertiesName);
            props.load(in);
            in.close();
            String drivers=props.getProperty("jdbc.driver");
            Class.forName(drivers);
            String url=props.getProperty("jdbc.url");
            String username=props.getProperty("jdbc.username");
            String password=props.getProperty("jdbc.password");
            System.out.println("driver  : " + drivers);
            System.out.println("url     : " + url);
            System.out.println("username: " + username);
            System.out.println("password: " + password);
            return DriverManager.getConnection(url, username, password);
    }Save these properties (changed to your values) to ConnectionTest.properties:
    jdbc.driver     = oracle.jdbc.driver.OracleDriver
    jdbc.url        = jdbc:oracle:thin:@host:1521:SID
    jdbc.username   = username
    jdbc.password   = passwordCompile like this:
    javac ConnectionTest.javaRun like this (assuming ConnectionTest.properties and classes12.jar are in the same directory as ConnectionTest.class):
    java -classpath .:classes.12.jar ConnectionTest ConnectionTest.propertiesIt'll come back and tell you the database vendor name if the connection succeeds. - MOD
    MOD

  • Oracle 8.1.5 JDBC driver problem with LONGVARCHAR

    Hi, I'm having problem with 8.1.5 release on Solaris with the
    JDBC type 4 driver (thin). If I create the following table
    create table test1 (col1 NUMBER, col2 LONG);
    Using JDBC driver to insert into the second column any string
    longer than 4000 characters causing run time exception. The type2
    driver works fine, but type2 is slow.
    String sql = "insert into test1 (col1, col2) values (1099,?)";
    PreparedStatement stmt ;
    stmt = conn.prepareStatement(sql);
    // create a string with very long value , bigger than 4096
    stmt.setString(1,string);
    stmt.executeUpdate();
    runtime exception:
    java.sql.SQLException: Data size bigger than max size for this
    type
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(Compiled Code)
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled
    Code)
    at oracle.jdbc.ttc7.TTCItem.setArrayData(Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setItem(Compiled Code)
    at
    oracle.jdbc.driver.OraclePreparedStatement.setString(Compiled
    Code)
    at testi.main(Compiled Code)
    Any help is appreciated.
    Thanks
    Steve
    null

    Post the full stacktrace here
    Also you might want to post jdbc related questions to weblogic.developer.
    interest.jdbc
    Kumar
    DreamNEON wrote:
    Hello,
    the NSAPI integration works, also the JSP files.
    But I have still problems with the Jdriver for my Oracle 8.1.5.
    I get the message :
    Failed to invoke startup class
    weblogic.jdbc.common.internal.JdbcStartup=weblogic.jdbc.common.internal.JdbcStartup
    when the WebLogic Server is started.
    Any ideas or hints about that?
    Thanks in advance
    Armin

  • Error Handling in JDBC Adaptor - Without BPM

    Hi friends,
    My problem is like this. Scenario is File -> Xi -> JDBC.
    here i didn't used BPM at all.
    My interface is working fine.
    right now i am not doing any error handling for 'Primary key violation, refrential intigrity etc.. '.
    if this type errors encountered i going to adapter monitoring and looking out the issue.
    Now the client requirment is
    whenever this type of errors occured Client should be notified Via email along with error description.
    Is there anyway to do this ?

    Hi Suresh,
    You can setup the Alerting framework of XI to trigger alerts. Alert rules can be set to raise alerts in case of JDBC Adapter Errors.
    Check these links....
    http://help.sap.com/saphelp_nw04/helpdata/en/3f/81023cfa699508e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
    Thanks & Regards,
    Renjith
    An addition to what i just said...You have to be on SP14 for this...
    Message was edited by: Renjith Andrews

  • JDBC TableModel problem with setValueAt

    Hello to everyone. I have problem when I change value at cell in Table. My model makes update in DB, but in GUI the change is not visible. The change gets visible only when I reopen the Table.
    public class CustomTableModel extends AbstractTableModel implements Serializable
        int                  dateTime = Types.DATE;
        Connection                con = null;
        ResultSet                  rs = null;
        ResultSetMetaData  rsMetaData = null;
        int                numColumns;
        String[]          columnNames = null;
        boolean           isUpdatable;
        Vector                   rows = new Vector();
        public CustomTableModel(Connection connect, ResultSet rset, String[] strl )
         try
             con = connect;
          String[] sNames = strl;
             rs = rset;
             rsMetaData = rs.getMetaData();
             numColumns = rsMetaData.getColumnCount();
             columnNames = new String[numColumns];
          int rowIndex;
          int columnIndex;
           if (rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE)
              isUpdatable = true;
             else
              isUpdatable = false;
             for (int i = 0; i < numColumns; i++)
        if (sNames==null){
              columnNames[i] = rsMetaData.getColumnLabel(i+1);
        else
          columnNames = sNames;
             while(rs.next())
              Vector tempRow = new Vector(numColumns);
              for (int i = 0; i < numColumns; i++)
                  switch(rsMetaData.getColumnType(i+1))
                  .............. TYPES....
             } // end for loop
              rows.add(tempRow);
             } // end while loop
         }My method setValueAt
    public void setValueAt(Object aValue, int rowIndex, int columnIndex)
         try
            Object oldValue = getValueAt(rowIndex,columnIndex);
             if (oldValue == null && aValue == null)
              return;
             // can use equals() only if oldValue is not null
             if (oldValue != null)
              if (oldValue.equals(aValue))
                  return;
             // JTable is 0 based while ResultSet is 1 based
             rs.absolute(rowIndex+1);
             updateResultSet(rs, aValue, rowIndex, columnIndex);
             rs.updateRow();
             con.commit();
             Vector aRow = (Vector)rows.elementAt(rowIndex);
                aRow.setElementAt(aValue, columnIndex);
           fireTableCellUpdated(rowIndex, columnIndex);
         catch (SQLException ex)
             ExceptionEvent event = new ExceptionEvent(this, ex.getMessage());
             fireExceptionGenerated(event);
             try
              con.rollback();
             catch (SQLException ex2)
              event = new ExceptionEvent(this, ex2.getMessage());
              fireExceptionGenerated(event);
         catch (Exception ex)
             ExceptionEvent event = new ExceptionEvent(this, ex.getMessage());
             fireExceptionGenerated(event);
        }Thanks in advance.

    import java.io.*;
    import java.sql.*;
    import java.text.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableModelDemo extends javax.swing.JFrame {
        public TableModelDemo() {
            initComponents();
            connectDatabase();
            CustomTableModel model = new CustomTableModel();
            model.init(conn,rs,null);
            jTable1.setModel(model);
        private void connectDatabase(){
            try{
                DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());
            }catch (Exception ex){
                ex.printStackTrace();
            conn=null;
            try{
                conn = DriverManager.getConnection("jdbc:sybase:Tds:prdfs4:2638","dba","sql");
            }catch (Exception ex){
                System.out.println("Connection refused");
            try {
                if(conn!=null){
                    Statement stmt = conn.createStatement();
                    String query ="SELECT ANA_LED_BASE_FORGN_CURY, ANA_AXIS_CODE, ANA_ACC_NUM, ANA_LED_TXT FROM ana_ledger " +
                            "where CMPY_CODE='06-LV   ' and JRNL_CODE='SFA  ' and ANA_LED_DOC_NUM=0008170";
                    rs = stmt.executeQuery(query);
            } catch (SQLException sqe) {
                String message = sqe.getMessage();
                JOptionPane.showMessageDialog( null, message );
        private void initComponents() {
            jScrollPane1 = new javax.swing.JScrollPane();
            jTable1 = new javax.swing.JTable();
            jToolBar1 = new javax.swing.JToolBar();
            jButton1 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("change value at cell in Table");
            jScrollPane1.setViewportView(jTable1);
            getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
            jToolBar1.setFloatable(false);
            jButton1.setText("change value at cell in Table");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            jToolBar1.add(jButton1);
            getContentPane().add(jToolBar1, java.awt.BorderLayout.NORTH);
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-790)/2, (screenSize.height-327)/2, 790, 327);
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
            String val = JOptionPane.showInputDialog("change value at cell in Table","TEST,1,1");
            String val2[] = val.split(",");
            jTable1.setValueAt( val2[0],Integer.parseInt(val2[1]),Integer.parseInt(val2[2]) );
        public static void main(String args[]) {
                    new TableModelDemo().setVisible(true);
        private javax.swing.JButton jButton1;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTable jTable1;
        private javax.swing.JToolBar jToolBar1;
        private ResultSet rs ;
        private Connection conn;
    class CustomTableModel extends DefaultTableModel implements Serializable {
        int                  dateTime = Types.DATE;
        Connection                con = null;
        ResultSet                  rs = null;
        ResultSetMetaData  rsMetaData = null;
        int                numColumns;
        String[]          columnNames = null;
        boolean           isUpdatable;
        Vector                   rows = new Vector();
        public void init(Connection connectToDatabase, ResultSet rset, String[] strl ) {
            try {
                con = connectToDatabase;
                String[] sNames = strl;
                rs = rset;
                rsMetaData = rs.getMetaData();
                numColumns = rsMetaData.getColumnCount();
                columnNames = new String[numColumns];
                int rowIndex=0;
                int columnIndex;
                if (rs.getConcurrency() == ResultSet.CONCUR_UPDATABLE) {
                    isUpdatable = true;
                } else {
                    isUpdatable = false;
                for (int i = 0; i < numColumns; i++) {
                    if (sNames==null){
                        columnNames[i] = rsMetaData.getColumnLabel(i+1);
                    } else {
                        columnNames = sNames;
                while(rs.next()) {
                    Object[] rowData = new Object[numColumns];
                    addRow( rowData );
                    Vector tempRow = new Vector(numColumns);
                    for (int i = 0; i < numColumns; i++) {
                        if( rowIndex==0 ){
                            addColumn( columnNames[i] );
                        setValueAt( rs.getString(i+1), rowIndex, i );
                        //                    switch(rsMetaData.getColumnType(i+1))
                        //                    .............. TYPES....
                    } // end for loop
                    rows.add(tempRow);
                    rowIndex++;
                } // end while loop
            }catch(Exception ex){
                ex.printStackTrace();
        public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
            super.setValueAt( aValue, rowIndex, columnIndex );
            try {
                Object oldValue = getValueAt(rowIndex,columnIndex);
                if (oldValue == null && aValue == null) {
                    return;
                // can use equals() only if oldValue is not null
                if (oldValue != null) {
                    if (oldValue.equals(aValue)) {
                        return;
                // JTable is 0 based while ResultSet is 1 based
                //            rs.absolute(rowIndex+1);
                //            updateResultSet(rs, aValue, rowIndex, columnIndex);
                //            rs.updateRow();
                //            con.commit();
                //        Vector aRow = (Vector)rows.elementAt(rowIndex);
                //        aRow.setElementAt(aValue, columnIndex);
                //            fireTableCellUpdated(rowIndex, columnIndex);
                //        } catch (SQLException ex) {
                //            ExceptionEvent event = new ExceptionEvent(this, ex.getMessage());
                //            fireExceptionGenerated(event);
                //            try {
                //                con.rollback();
                //            } catch (SQLException ex2) {
                //                event = new ExceptionEvent(this, ex2.getMessage());
                //                fireExceptionGenerated(event);
            } catch (Exception ex) {
                //                    ExceptionEvent event = new ExceptionEvent(this, ex.getMessage());
                //                    fireExceptionGenerated(event);
    }

  • STRUTS - JDBC connection problem

    im using tomcat 5.5.9, jdk 1.5, oracle database...
    � have a project in struts...
    my project works with my compiler with no problem...
    *i setup tomcat on C:\jakarta-tomcat-5.5.9
    and � made these setting for tomcat:
    � added these strings to my CLASSPATH
    --C:\jakarta-tomcat-5.5.9\common\lib\servlet-api.jar
    --C:\jakarta-tomcat-5.5.9\common\lib\jsp-api.jar
    after � deployed my project under tomcat there was a "classes12.zip" file under this path:
    C:\jakarta-tomcat-5.5.9\webapps\BILGISU\WEB-INF\lib
    � changed it to class.jar
    also � have other .jars under the same path above.
    these jars are:
    classes12.jar
    commons-beanutils.jar
    commons-collections.jar
    commons-dbcp.jar
    commons-digester.jar
    commons-fileupload.jar
    commons-lang.jar
    commons-logging.jar
    commons-pool.jar
    commons-validator.jar
    jakarta-oro.jar
    jdbc2_0-stdext.jar
    struts.jar
    struts-legacy.jar
    THE PROBLEM IS:
    my index page is a "login" page..
    i can open the login page under tomcat.
    but when � enter the username and password, page says it is wrong username or password although these are true parameters...
    i think i still have a connection problem but � dont know how to solve...
    MY SEARCHES SAYS:
    you have to reconfigure "C:\jakarta-tomcat-5.5.9\conf\server.xml" like that:
    <Resource name="jdbc/myoracle"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:[email protected]:1521:mysid"
    username="scott"
    password="tiger"
    maxActive="20"
    maxIdle="10"
    maxWait="-1"/>
    Resource name="jdbc/myoracle" ->HERE WHAT IS "myoracle"??? DOES IT BELONG TO MY PROJECT?
    you have to reconfigure "C:\jakarta-tomcat-5.5.9\conf\web.xml" like that:
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>jdbc/myoracle</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    will i write this to my web.xml
    and what is "auth=Container" here???????
    thanks in advance
    yasin

    ONE MORE QUESTION
    Im defining the datasource in my "struts-config.xml"
    do i have to define them again in "tomcat/conf/server.xml" ...

  • JSP + JDBC + MySql Problem (Tomcat 4.1)

    I'm completely helpless... whenever I try to retrieve stuff from the db (using a jsp page), I get errors that don't even make sense.
    out.println(stmt.executeQuery("SELECT * FROM newsTbl WHERE articleID = 1").getString("articleTitle"));if I try doing the above, I get a "ServletException : Before start of result set" error that supposedly occurred at this line of the generated servlet:
    if (pageContext != null) pageContext.handlePageException(t);---------------
    If i try this:
    ResultSet rsSec = stmt.executeQuery("SELECT * FROM newsSecTbl");
    rsSec.beforeFirst();  //<-- Even if I don't have this line the result does not change
      out.println(rsSec.next());
      while (rsSec.next()) { ... }I the while loop is never initiated, because rsSec.next() is false... kind of weird if you ask me, I even put two entries into the table to make sure the cursor wasnt at the first record and saying there was no second one (which would have been right if there were only one record).
    I would be very grateful if someone could help me out with this. I've never done any db programming with Java yet, so I dont have a clue what Im doing. By the way, I'm using MySql (indicated in the title) and the server was running and available when I ran the above code.
    Cheers,
    Tom

    You can't do this:
    out.println(stmt.executeQuery("SELECT * FROM newsTbl WHERE articleID = 1").getString("articleTitle"));The ResultSet you get back is a database cursor that doesn't point to the first row yet. The correct idiom is:
    String sql = "SELECT * FROM newsTbl WHERE articleID = 1";
    ResultSet result = stmt.executeQuery(sql);
    String articleTitle = "";
    while (result.next())
       title = result.getString("articleTitle");
    result.close();
    stmt.close();If you've never done DB programming before, I'd recommend that you click on the Tutorials link to the left and go through the JDBC tutorial carefully. You'll save yourself a lot of grief.
    Another good idea would be to separate out all your database code into at least one separate object, independent of the servlet. That way you can test and develop it off to the side until it's 100% solid. Then your servlet can simply instantiate one and use it. All your problems from that point forward will be servlet issues, because you'll know that your database code is working. - MOD
    See if that works better. - MOD

  • JDBC/MySQL Problem

    Hello, I'm getting this error when trying to make a connection with MySQL:
    Internal Servlet Error:
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    C:\tomcat\work\localhost_8080\_0002fdb_0002ejspdb_jsp_10.java:62: Undefined variable or class name: DriverManager
         conn = DriverManager.getConnection("jdbc:mysql:numbers", "username", "password");
         ^
    1 error, 1 warning
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
         at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
         at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:536)
    Here's the code I'm using:
    <%
         Class.forName("org.gjt.mm.mysql.Driver").newInstance();
         java.sql.Connection conn;
         conn = DriverManager.getConnection("jdbc:mysql:numbers", "username", "password");
    %>
    If anyone knows how to fix this, I'd appreciate any help!

    Hi,
    Three things:
    1. I presume numbers refers to the prot you are accesaing mysql - i tend to use default 3306.
    2. If there are problems recognising DriverManagaer are you importing java.sql.*; I'm sure you are.
    3. I think the sun.tools.javac.Main error relates to the tools version that you are using, although I would not guarantee this. The tools.jar in later versions of tomcat is twice the size of earlier versions and you have to ensure this is the version that your application is checking for. A quick test for this is to put the newer version(size 74k) into WEB-INF \lib directory where an application looks first for complied java files.
    best,
    kev
    ps If I'm wrong completely, let me know as I am watching this topic

  • T60 wireless adaptor problem

    Hi everybody!
    I reinstalled the windows on my T60 and didn't have any problem with my Intel PRO Wireless 3945ABG adaptor.
    After one day it stopped working. The small green light for it doesn't turn on anymore, even if a press fn+F5.
    I tried to reinstall the driver and it didn't help. I tried to find any problem in its settings, but I couldn't. I've ran out of ideas.
    Can you help me,please? Has anyone ever encountered this problem or a similar one?
    Thanks!
    Solved!
    Go to Solution.

    Oh, God! I'm so embarrassed!
    After all these tries and installing, uninstalling, reinstalling, and doing the same thing over and over again, I discover that there is a switch for it. Sorry everybody, I have no excuse. Oh, I might have: I bought it only 5 days ago.
    I thought that Maliha was talking about fn+F5, I didn't know that there was a real switch.
    Excuse me again!
    Thank you for your help!

Maybe you are looking for