JDBC Extracting Problem

Hi
I have 2 tables (A,B) In both tables I have a 3 filed with same name..
Examples
Table A
Table A Colums(Fields)
Id, Name, RollNo, Add
TableB Colums
bId, Name, RollNo, Add, Id(FK)
My query in JDBC(Java ) is
SELECT a.*,b.* from TABLEA, TABLEB WHERE A.ID = B.ID(+) AND A.ID = 12;
Once i did that.. after when I say
rs.getLong("Id") -- this returns well
when I say rs.getString("Name") this I am getting wrong.. How to Over Come this proble..
Your Help Appreciated..
thanks
Kasinath

It would help if you gave us the error or whatever was happening instead of just saying something is wrong.
It might be because the column "Name" is ambiguous. It is in both tables. I know this is true of "Id" but maybe the driver (it would also help to tell us which database and driver) is smart enough to know that id can only have one value because of the way the query is framed.
Also, this doesn't look like the real SQL that is causing your problem::
SELECT a.*,b.* from TABLEA, TABLEB WHERE A.ID = B.ID(+) AND A.ID = 12;
Shouldn't it be:
SELECT a.*,b.* from TABLEA A, TABLEB B WHERE A.ID = B.ID(+) AND A.ID = 12;

Similar Messages

  • 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

  • Any progress on the ACR 7.3+ Bridge repeat thumbnail extraction problem?

    Any progress on the ACR 7.3+ Bridge repeat thumbnail extraction problem?
    It was very good news that the cropped lens-correction repeat extraction bug was fixed in 8.2, but this newer problem, surfacing in the ACR 7.3 update (and still present in 8.2), is causing a bigger headache than the older bug for some users of Bridge.
    Unfortunately, I have been unable to identify a trigger for the condition, which is proving very difficult to recreate reliably, other than it very definitely being introduced with ACR 7.3. Adobe's Steve G told the Bridge forum that the 7.3+ problem had been recreated by Adobe, and was being investigated along with the other (now solved) problem. Has any progress been made? Or is it still a mystery?

    Been there, done that:
    http://feedback.photoshop.com/photoshop_family/topics/unneccesary_bridge_thumbnail_and_pre view_extraction
    They know about it, they just don't know how to recreate it.
    Best thing we can do is reliably recreate the fault. My workaround is to only enable Lens Profile Corrections when necessary, as it is a combination of that and some other factor(s) which seems to trigger it.
    If you read all the discussions, you'll see that there are two bugs which produce the same symptoms. One introduced in probably ACR 6.1, whichg was fixed in 8.2; and the other was introduced in 7.3 and is ongoing.

  • MS SQL Server 2K JDBC Connection Problem

    Hi,
    I have installed Sql Server 2000 with mixed mode authentication. I am able to connect to connect through ODBC with both Windows and server authentication.
    The same when i try with JDBC, i am not able to connect. I have added the driver jars to the classpath also.
    Heres the Code :
    try{
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con = java.sql.DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;databaseName=pubs","sa","");
    if(con!=null) System.out.println("Connection Successful!");
    }catch(Exception e){
    e.printStackTrace();
    System.out.println("Error Trace in getConnection() : " + e.getMessage());
    Here is the error :
    java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:115)
    at Connect.main(Connect.java:31)
    Error Trace in getConnection() : com.microsoft.jdbc.sqlserver.SQLServerDriver
    Kindly help.
    Thanks in Advance

    Thanks for the reply.
    I am not using any IDE, but the problem exists if i
    add the jar files into my classpath. I extracted the
    required files as suggested and tried, this time it
    works fine.
    If anyone could let me know why this problem is
    occuring it would be helpful.
    Thanks once againIt occured because MS didn't package their jar properly. You could try to re-jar the files or use a driver from another vendor.

  • RG registers and PLA registers - Extraction Problem

    Hi,
    We have updated balances in table J_2IACCBAL for initial entries for RG registers and PLA registers but the same is not available for extraction in J2I5.
    Could you please advise what the problem is?
    Regards
    Santosh Hegde

    Hi Prasanna,
    We have updated the balance as on 31.03.2007 as per SAP Help. We tried extracting as on 31.03.2007 as well as 01.04.2007.
    Cut over data is as on 31.03.2007 and golive date is 01.04.07.
    Pls help
    Regards
    Santosh Hegde

  • Extraction Problem- while filling the setup table

    Hi all,
    I have a problem when i  fill the setup table for LO cockpit Extraction on any SD datasources (2_LIS_VAHDR,2lis_13_vdkon etc.,). i am done with LBWQ successfully. i also verified the datasources in RSA6. They are in active status in RSA7-delta queue.
    After i submit the request to fill the setup table, i am getting
    "datasource 2_LIS_VAHDR contains data still to be transferred". if i check the extract checker (RSA3) i am getting the error msg "data source is not defined in the source system"
    Can anybody help me on this?
    one of my friend suggested that it could be the reason that some jobs are in active status that loads/updates data into base tables which the datasources refers.
    Any idea on the reason and resolutions?
    Greatly appreciated !

    Hi Vijaya,
    We too got the same Error : " the datasources are not defined in the source system".
    This is source system connection problem.  Check whether connection between R/3 and BW is active.
    This error occurs when the connection is inactive.
    Also, if it is copy client, then check data exists in other client. If so delete the setup tables data in that client as well.
    This will resolve your issue.
    Thanks
    Edited by: Allen Fyne on Aug 9, 2008 6:47 PM

  • 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

  • CO-PA Extraction problem

    Dear all,
    I created CO-PA datasource with costing-based. When I test extraction (RSA3) in R/3 with no any selection criteria, it only extracts a few data. When I check the CE4XXXX table, there are tons of data in it. It seems like that it gets data from summarization table. I've selected all line item characterisitcs when defining this COPA the datasource. Is there anyone come across this problem before. Thanks a lot for any suggestion.

    Hi,
    look at this howto (extraction from CE1xxxx):
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20co-pa%20extraction%203.0x
    /manfred

  • Download and extraction problems with CS6 Web and design Premium?

    I purchased CS6 from my university and upon trying to download it, the downloader that was downloading it stopped at around 85% and initiated a download cannot continue please contact [email protected] Upon chatting with two agents from the online chat, one of them directed me to download the trial version and activate it with the serial number I got when I activated the product. I got a download error when I downloaded it the first time, and the second time worked. When I went to sue the extract tool that I downloaded alongside the zip file, it worked for about 5 seconds, then I got a "A problem occurred while extracting some files. Check available space on your computer and the write privileges on the destination folder." Theres 140GB's on the drive I'm extracting too, and the folder has full privelages. How can I fix this? Or do I need to angrily demand my money back? I already opened and used it so I can't take it back to the university, and I'm not paying 100$ (which is what I was told it would cost me) to have someone else fix something that should not be broken.

    Sorry, I feel your pain but you've posted in the wrong forum--this one is about Audition, the sound editing software.
    However, I'm a bit suspicious of the response you got.  As far as I know, the one part of support that is free from Adobe is still first-time installation issues and this is handled (usually) by phone with Adobe themselves.  Perhaps you're in a different situation because you purchased from your university but something doesn't smell right about what you were told and that email address you were given which isn't an Adobe one.

  • 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" ...

  • Pdf text extract problem with CID font and Identity-H

    Hi all,
    Iam facing some big problem with text extraction from pdf file.
    Currently iam using congviews pdf2xl text extraction tool.
    About 95% of the text extract correcly but few charaters showing box some ? and some dotted circle mark.
    Font Used:
    ArialUnicodeMS(Embedded Subset)
    Type:(True Type (CID)
    Encoding:Identity-H
    TimesNewRomanPSMT
    Type:True Type
    Encoding:ANSI
    ActualFont:TimesNewRomanPSMT
    ActualFontType:TrueType
    Anyone please help me to overcome this.
    Regards
    Gilbert.X

    I tried with acrobat pro9 export option it retrieved only alphabets and numbers all of the hindi charcaters showing just ........
    By the way how can i upload the my pdf file within this forum please guide me.
    Regards
    Gilbert.X

  • Xml extract problem

    I have a problem about sql to extract xml node,the sql followed:
    select a.disptx.extract('/Record/_20/text()').getStringVal() from swifti a where swidty = '6666666666666666666'
    and the clob is :
    <Record>
    <swrctm>2223</swrctm>
    <swintm>22:23:13</swintm>
    <swindt>20100826</swindt>
    <fmbank>ssssss</fmbank>
    <tobank>444444rrrrrrr</tobank>
    <fm>sdfds</fm>
    <to>wwwwwwwwww</to>
    <mgtype>103</mgtype>
    <swftid>dddddd</swftid>
    <sw108f>dddddd</sw108f>
    <swackf>0</swackf>
    <_20>fffffffffff</_20>
    </Record>
    that throw the exception:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in: '/Record/_20/text()'
    ORA-06512: at "SYS.XMLTYPE", line 111
    31011. 00000 - "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.
    can help me?

    you need convert clob to xmltype
    select xmltype(a.disptx).extract('/Record/_20/text()').getStringVal() from swifti a
    create table test (x clob);
    Table created.
    insert into test values ('<Record>
    <swrctm>2223</swrctm>
    <swintm>22:23:13</swintm>
    <swindt>20100826</swindt>
    <fmbank>ssssss</fmbank>
    <tobank>444444rrrrrrr</tobank>
    <fm>sdfds</fm>
    <to>wwwwwwwwww</to>
    <mgtype>103</mgtype>
    <swftid>dddddd</swftid>
    <sw108f>dddddd</sw108f>
    <swackf>0</swackf>
    <_20>fffffffffff</_20>
    </Record>');
    commit;
    1 row created.
    Commit complete.
    SELECT xmltype(x).EXTRACT ('/Record/_20/text()').getstringval ()
      FROM test;
    XMLTYPE(X).EXTRACT('/RECORD/_20/TEXT()').GETSTRINGVAL()                        
    fffffffffff                                                                    
    1 row selected.http://docs.oracle.com/cd/B10500_01/appdev.920/a96620/xdb04cre.htm

  • 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

Maybe you are looking for

  • Office Interop 32 bit on 64 bit OS email attachments filling up outlook temp folder OLK

    I have an issue when sending emails (many) using Office.Interop 32 bit that when the application is installed on a 64 bit OS the outlook secure temp is filling up and throwing an exception, this does not occur when the application is installed on a 3

  • Journal Entry posting Error

    Hi, I am FICO consultant, Got an issue with document posting. User is not able to post document because of below error: Balancing field "Profit Center" in line item 003 not filled Message no. GLT2201 Diagnosis The field Profit Center marked as balanc

  • XHA1 and FInal Cut Break Through!!!!

    Now I am not guaranteeing this will work for everyone, but after 2 years I have found what was wrong with my system. For 2 years, I have shot on my XHA1 and captured on my girlfriends iMac, though I have a G5 of my own. I am currently in session and

  • Setting "Monitor RGB" as default.

    Like many others I know, I design ONLY for the screen and thus, I ALWAYS want my screen to soft proof to "Monitor RGB" in both Illustrator and Photoshop (CS3). I've developed the habit of selecting View > Proof Setup > Monitor RGB and making sure tha

  • X-Apps certification

    Hi all, What are the pre requisites for getting x-apps certification for a business package? Regards Rohit