Oracle thin JDBC driver BUG-2285052, how to solve it ?

Hi, use ResultSet.getString to get a nchar type String from databaase, it will return the proper value.
eg, a 254 size column , it will return more char as needed !!
please check next from jdbc readme file. anyone can give me a temp solution ?
BUG-2285052 (since 9.2.0.1)
Extra space and null characters are returned by ResultSet.getString() and Scrollable ResultSet getString() for NCHAR column when the database national character set is UTF8. This behavior occurs only with JDBC THIN driver.

Dear Michael,
thx I found a lot of useful properties via the links you provided, but not those in question.
michael_obrien wrote:
For timeouts, you may need to use a hint directly on the entity though
http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#How_to_Use_EclipseLink_JPA_Query_Hints
http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#Timeout
I think this refers to "Statement.setQueryTimeout".
The properties I'm looking for focus on the connection and the network beneath.
Are there other undocumented ;) possibilities?
Kind Regards,
daniela

Similar Messages

  • Spy for oracle thin jdbc driver

    Does anyone know a good spy utility to intercept the
    query going to the database thru oracle thin jdbc driver?

    If you can post the code, I would be happy to look at. I'm not aware of any 'trapping' mechanism for JDBC, although there may be one. Are you confident that you are 'waiting' on the execute of the SQL? It's very unusual for nothing to happen. In most cases, I would expect a long running query, or that you are getting, but not catching an Exception. Code would help if that's possible...

  • URGENT!Can I user a THIN jdbc driver to access a CLOB field from oracle 8.0.5 DB?

    URGENT!Can I user a THIN jdbc driver to access a CLOB field from oracle 8.0.5 DB?

    I think you'd need to contact Oracle support to get access to older versions of the driver.
    Since 8.0.5 isn't supported any longer, however, is it possible for you to update your Oracle client to one of the supported releases-- 8.1.7 or 9i?
    Justin

  • Can weblogic server 5.1 version work with Oracle 9.2.0 thin JDBC driver?

    we have an applicaiton using weblogic 5.1 and Oracle database 8.1.6. Is that possible
    to upgrade databse version to Oracle 9i without weblogic upgrade? If yes, what
    JDBC driver should be used? Oracle 9.2.0 thin JDBC driver or weblogic jDriver?
    Is there any known issue with the JDBC driver under that architecture?
    Please help.

    Lei Zeng wrote:
    we have an applicaiton using weblogic 5.1 and Oracle database 8.1.6. Is that possible
    to upgrade databse version to Oracle 9i without weblogic upgrade? If yes, what
    JDBC driver should be used? Oracle 9.2.0 thin JDBC driver or weblogic jDriver?
    Is there any known issue with the JDBC driver under that architecture?
    Please help.Hi. Any weblogic server can be used with any JDBC driver. Just upgrade the
    JDBC driver to the latest/best one for Oracle9i, and make sure it's the first
    thing in the server's weblogic.classpath (not the java.classpath). I recommend the
    thin driver. Because it's all java, it is much more reliable. There is no known
    issue with standard JDBC with that or any other driver. Some non-standard Oracle
    calls which arer available from Oracle's driver classes are available through
    weblogic, and some are not.
    Joe Weinstein

  • Thin JDBC Driver is missing some rows from resultset

    Hi All
    I am faced with a peculiar problem.
    When I fire a SQL query using Toad, I get correct results but firing the same query using JDBC Driver - ojdbc14.jar (ORacle 11g R1) - we are getting lesser number of records.
    Our SQL pulls around 300k of records and buckets them based on some column value into different chunks. We use NTILE function and it shows right results in TOAD.
    Using same sql with JDBC, We are losing 100 rows per bucket.
    Any ideas?
    SQL is
    SELECT
    T.CTLG_ITM_ID as catalogItemIds,
    T.INV_STAT_TYP_ID,
    T.OORD_DT,
    T.LST_UPDT_DTTM,
    T.CTLG_ITM_SELL_TYP_ID,
    P.OORD_IND,
    C.BKORD_ELIG,
    NTILE(300) over (ORDER BY T.CTLG_ITM_ID) AS bucketId
    FROM
    INV_STAT_ROLLUP_T T,
    PRD_T P,
    CTLG_T C,
    CTLG_TREE_PATH_T TP
    WHERE
    T.CTLG_ITM_ID = TP.CTLG_ITM_ID AND
    TP.PAR_CTLG_ITM_ID = P.CTLG_ITM_ID AND
    C.BRD_CD = '10'
    As per toad, each bucket should get us 1038 records but Thin JDBC Driver is fetching us only 898 records.
    Any idea why this discrepancy?
    Thanks
    Saroj

    rozdev29 wrote:
    When I fire a SQL query using Toad, I get correct results but firing the same query using JDBC Driver - ojdbc14.jar (ORacle 11g R1)Seeing the downloads page:
    http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-111060-084321.html
    There IS no ojdbc14.jar for Oracle 11g. The minimum is Java 5. So correct me if I'm wrong, but you seem to be using a very old driver here. I would try a newer one if I were you.

  • Problem with Java 5 and Oracle 10g JDBC driver

    Hi All,
    Currently we upgrade our web application to Java 5 and Oracle 10.2 JDBC driver. And we encountered a bug, when the user entered the information through UI and data didn't store into database (Oracle 9i). The problem is that this bug is not happend so often maybe once a day and this did not happen before we upgraded to Java 5 and Oracle 10.2 JDBC driver. Does anyone encounter the same problem ? Is this Java 5 problem or Oracle JDBC driver problem ?
    Thanks,

    sounds like a database problem...
    Are you using a driver version that's supported for your database engine?
    What else did you change? We once ran into a major bug in our application that had for 5 years been masked by performance problems in our hardware and infrastructure.
    Once those were resolved the bug showed itself and caused tens of thousands of records to be erroneously inserted into our database every day.
    It's certainly NOT a problem with your JVM (if it's a decent one, like the Sun implementation).
    So it's either your database, your driver, your network (dropping packets???), or your application.
    The upgrade may just have exposed something that was already there.

  • Couldnot connect JBuilder 6 to ORACLE 8i , JDBC driver problem

    Hi guys
    I am trying to connect to the oracle 8i database from jbuilder 6 using a simple select statement , but it gives the following error
    Root cause:
    java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
         at _0002ftestEmployee_0002ejsptestEmployee_jsp_1._jspService(_0002ftestEmployee_0002ejsptestEmployee_jsp_1.java:83)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
         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:812)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
         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:484)
    plse help me how to connect jbuilder to oracle to access the data. I followed jbuilder doc like from the menu (Tools �� enterprise setup �� database driver ��)
    but could not select the driver since it is marked as red (uninstalled). How can I made jdbc driver to available to jbuilder.?. I am using oracle 8i. Will oracle 8i supports jdk 1.3 b��cos I have noticed the jbuilder supports from jdk 1.3 onwards. So plse correct me if I am wrong
    waiting for reply
    sumesh

    thanks for u'r reply.
    you mean to say i need to install the new JDBC driver (Classes12.zip and nls_charset12) to the oracle/ora8i/jdbc/lib folder.currently this folder contains only classes102 and classes11.zip files and the corresponding charset only.After instaling the new classes12.zip file do i need to set the classpath?.

  • Oracle 7 JDBC driver

    Hi,
    I want to connect to an Oracle 7 database over JDBC. When I go to the download page, it only gives me Oracle 8 and higher download options, even though the documentation index lists an Oracle7 driver.
    Does anyone know where I can get it from?
    Regards,
    Kelsey Grant

    Jin Yu (guest) wrote:
    : Is there a column limitation in Oracle 7 JDBC drivers ? We are
    : not able to retrieve more than 11 columns in a SELECT
    statement.
    : Could someone get back to us on this ?
    : Thanking you in advance
    : Jin Yu
    Hi!
    I tried to use the JDBC driver to connect to Oracle 7. But had
    some trouble with it.
    Could you give me some hints on how to load the driver, set up
    the url for database, etc?
    By the way, we use JBuilder.
    Thanks.
    null

  • Thick vs. Thin JDBC Driver

    Hi!
    I was just wondering where to find some info about
    the advantages / disadvantages of the Thick and Thin JDBC drivers, please, and some bachground about those drivers (what is the differnence etc).
    In particular I would like to know whether Thick drivers are errorprone and mix up the contents of threads. Is this so according to your experience?
    I would also like to know which one is the recommended driver to use if speed is an issue...
    We use Oracle 8.1.7.4.0 and Websphere Application Server 4.04
    Thanks a lot!
    Cheers,
    Steffen

    Hi Steffen,
    Check these links. I hope they provide you the information required.
    http://st-doc.us.oracle.com/9.0/9202/java.920/a96654/overvw.htm#1000908
    http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/factsht.htm
    Regards,
    Anupama

  • SQL Server JDBC Driver Bug?

    I ran into an unusual situation with the MS SQL Server JDBC driver that I think is a bug and could bite people in some unusual cases.
    Here is the situation that creates the problem.
    - get a connection
    - make it transactional (autocommit false)
    - discover that there is no work to do in the transaction so no commit or rollback is done.
    - make the connection non-transactional (autocommit true)
    - update other tables using the connection (should be non-transactional)
    This leaves the tables updated in the last step locked as part of a transaction!
    It doesn't behave this way with our DB2 driver.
    While I agree that the JDBC spec is vague in many areas, this seems to be well out of bounds of any reasonable interpretation.
    The workaround is to also do a rollback (in a try/catch block) before setting autocommit true.
    -- Frank

    Since database operations are rather expensive why would you do any before checking to see if something needs to be done?

  • For Oracle : When will Oracle's JDBC Driver work for Date ?

    I try to develop an application that will run on every database.
    The only Database I have a problem with is Oracle because of date : I can't use executeQuery or executeUpdate with sql request that use a date field as a parameter.
    And this stupid issue is only due to Oracles's non conformity to JDBC Standard.
    I know that I can use preparedStatements and that it works, but It's not an issue : This is a minor bug that would be easy to correct so DO IT !
    I also know that tit works with SQLJ, but I use Thin client.
    I tried to change NLS_DATE_FORMAT, but with timestamp, time format got millisconds and Oracle don't like it ...
    No, really, it's a long known bug.
    Mike
    null

    I appreciate the confidence in SQLJ, but since SQLJ runs atop JDBC I would be very surprised if you did not encounter the same issue you are troubled with.
    Unfortunately -not already knowing what your problem is- I do not quite understand what you are trying to point out here. Could you give us some code snippets and the expected versus actual behavior, so that we can understand and reproduce your problem? Or, if it is a known issue, would you have a bug assignment for it?
    Thank you very much!

  • Oracle 10g ODBC Driver Bug (10.1.0.3.1)

    Using the ODBC driver version 10.1.0.3.1, there is a problem retrieving BLOB data in chunks using multiple calls to SQLGetData() when the datatype specified is SQL_CHAR.
    Instead of returning (<BufferLength> - 1) characters (ANSI) along with a NULL, it returns exactly <BufferLength> characters (possibly with a NULL, I haven't double checked this) - pretty much the behavior you would expect if SQL_BINARY was specified. This has the affect of losing one character for each truncated chunk.
    According to the ODBC spec, "If the length of character data (including the null-termination character) exceeds BufferLength, SQLGetData truncates the data to BufferLength less the length of a null-termination character. It then null-terminates the data. If the length of binary data exceeds the length of the data buffer, SQLGetData truncates it to BufferLength bytes."
    The way I read this, as long as you specify the datatype as SQL_CHAR, the character data rules should be applied.
    I tried to submit this as a TAR in Metalink, but it seems I don't have the TAR button. Is this the correct forum for this issue? Thanks.
    Jon

    AFAIK, Oracle doesn't officially monitor these forums and where/when they do it is a haphazard and volunteer basis (personal observations).
    They do monitor the MetaLink forums so perhaps that was the cause of the confusion. At any rate the answer to use a forum to file a bug is wrong you do it through a support TAR and that can either be created from MetaLink (TARS button--missing for you) or via the phone.

  • Where can i download oracle oci jdbc driver 1.2?

    http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html
    some error in this page. several days.

    Please be more specific about the file(s) you are having trouble with.
    Regards,
    OTN

  • Is it a bug or how to solve it??

    Hi, Sir:
    In my program, I tried to use
                          JPanel  jpanel = new JPanel():
                          jpanel.setToolTipText("This is a JPanel");when I run, I got no error, but program stuck, no move,
    but some program I can do it if without Drag and Drop, but if once uose DnD, and setToolTipText, I cannot drag again,
    What is wrong here??
    How to use setToolTipText for JPanel??
    Thanks

    hi!
    it seems to be a design error, i could not play much with it, but i could move it, so please check out your code, this will be highly possible. you need to understand mouse listener, and mouse motion listener. if you have added something in the parent doesnot means that you will get that event for its child. so please try to evaluate your code, it was gr8. read examples more carefully.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Cursor;
    import java.awt.Font;
    import java.awt.Insets;
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.event.MouseEvent;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.border.AbstractBorder;
    import javax.swing.border.LineBorder;
    import javax.swing.event.MouseInputAdapter;
    public class Resizing extends JPanel
         public Resizing()
              super(null);
              JPanel jp = addPanel();
              PanelControlAdapter control = new PanelControlAdapter(this);
              jp.addMouseListener(control);
              jp.addMouseMotionListener(control);
         private JPanel addPanel()
              JLabel jl = new JLabel("This is resizeable JPanel at Runtime");
              jl.setBackground(Color.green);
              jl.setOpaque(true);
              jl.setFont(new Font("Helvetica", Font.BOLD, 18));
              JPanel jp = new JPanel();
              jp.setToolTipText("This is resizing inner Jpanel jp");
              jp.setLayout(new BorderLayout());
              jp.setBorder(new LineBorder(Color.black, 3, false));
              jp.add(jl, BorderLayout.NORTH);
              jp.setBounds(50, 50, 400, 200);
              setToolTipText("This is resizing Outer Jpanel this");
              add(jp);
              return jp;
         public static void main(String[] args)
              JFrame f = new JFrame("Test");
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.getContentPane().add(new Resizing());
              f.setSize(500, 400);
              f.setLocation(100, 100);
              f.setVisible(true);
    class PanelControlAdapter extends MouseInputAdapter
         Component     selectedComponent;
         LineBorder     black;
         LineBorder     green;
         Point          offset          = new Point();
         Point          start          = new Point();
         boolean          dragging     = false;
         boolean          resizing     = false;
         public PanelControlAdapter(Resizing r)
              //host = r;
              black = new LineBorder(Color.black, 3, false);
              green = new LineBorder(Color.green, 3, false);
         static int  io = 0;
         public void mouseMoved(MouseEvent e)
              Point l_pEventPoint = e.getPoint();
              boolean hovering = false;
              Component l_cSource = (Component)e.getSource(); //host.getComponent(0);
              Rectangle l_rectCompSize = l_cSource.getBounds();
              if (l_rectCompSize.contains(l_pEventPoint))
                   hovering = true;
                   if (selectedComponent != l_cSource)
                        if (selectedComponent != null) // reset
                             ((JComponent) selectedComponent).setBorder(black);
                        selectedComponent = l_cSource;
                        ((JComponent) selectedComponent).setBorder(green);
                   if (overBorder(l_pEventPoint))
                        setCursor(l_pEventPoint);
                   else if (selectedComponent.getCursor() != Cursor.getDefaultCursor())
                        selectedComponent.setCursor(Cursor.getDefaultCursor());
              if (!hovering && selectedComponent != null)
                   ((JComponent) selectedComponent).setBorder(black);
                   selectedComponent = null;
         private boolean overBorder(Point p)
              Rectangle r = selectedComponent.getBounds();
              JComponent target = (JComponent) selectedComponent;
              Insets insets = target.getBorder().getBorderInsets(target);
              // Assume uniform border insets.
              r.grow(-insets.left, -insets.top);
              return r.contains(p);
         private void setCursor(Point p)
              JComponent target = (JComponent) selectedComponent;
              AbstractBorder border = (AbstractBorder) target.getBorder();
              Rectangle r = target.getBounds();
              Rectangle ir = border.getInteriorRectangle(target, r.x, r.y, r.width,
                        r.height);
              int outcode = ir.outcode(p.x, p.y);
              Cursor cursor;
              switch (outcode)
                   case Rectangle.OUT_TOP:
                        cursor = Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR);
                        break;
                   case Rectangle.OUT_TOP + Rectangle.OUT_LEFT:
                        cursor = Cursor.getPredefinedCursor(Cursor.NW_RESIZE_CURSOR);
                        break;
                   case Rectangle.OUT_LEFT:
                        cursor = Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR);
                        break;
                   case Rectangle.OUT_LEFT + Rectangle.OUT_BOTTOM:
                        cursor = Cursor.getPredefinedCursor(Cursor.SW_RESIZE_CURSOR);
                        break;
                   case Rectangle.OUT_BOTTOM:
                        cursor = Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR);
                        break;
                   case Rectangle.OUT_BOTTOM + Rectangle.OUT_RIGHT:
                        cursor = Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR);
                        break;
                   case Rectangle.OUT_RIGHT:
                        cursor = Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR);
                        break;
                   case Rectangle.OUT_RIGHT + Rectangle.OUT_TOP:
                        cursor = Cursor.getPredefinedCursor(Cursor.NE_RESIZE_CURSOR);
                        break;
                   default:
                        cursor = Cursor.getDefaultCursor();
              selectedComponent.setCursor(cursor);
         public void mousePressed(MouseEvent e)
              Point p = e.getPoint();
              if (selectedComponent != null)
                   Rectangle r = selectedComponent.getBounds();
                   if (selectedComponent.getCursor() == Cursor.getDefaultCursor())
                        offset.x = p.x - r.x;
                        offset.y = p.y - r.y;
                        dragging = true;
                   } else
                        start = p;
                        resizing = true;
         public void mouseReleased(MouseEvent e)
              dragging = false;
              resizing = false;
         public void mouseDragged(MouseEvent e)
              Point p = e.getPoint();
              if (dragging || resizing)
                   Rectangle r = selectedComponent.getBounds();
                   if (dragging)
                        r.x = p.x - offset.x;
                        r.y = p.y - offset.y;
                        selectedComponent.setLocation(r.x, r.y);
                   } else if (resizing)
                        int type = selectedComponent.getCursor().getType();
                        switch (type)
                             case Cursor.N_RESIZE_CURSOR:
                                  r.height -= p.y - start.y;
                                  r.y = p.y;
                                  break;
                             case Cursor.NW_RESIZE_CURSOR:
                                  r.width -= p.x - start.x;
                                  r.x = p.x;
                                  r.height -= p.y - start.y;
                                  r.y = p.y;
                                  break;
                             case Cursor.W_RESIZE_CURSOR:
                                  r.width -= p.x - start.x;
                                  r.x = p.x;
                                  break;
                             case Cursor.SW_RESIZE_CURSOR:
                                  r.width -= p.x - start.x;
                                  r.x = p.x;
                                  r.height += p.y - start.y;
                                  break;
                             case Cursor.S_RESIZE_CURSOR:
                                  r.height += p.y - start.y;
                                  break;
                             case Cursor.SE_RESIZE_CURSOR:
                                  r.width += p.x - start.x;
                                  r.height += p.y - start.y;
                                  break;
                             case Cursor.E_RESIZE_CURSOR:
                                  r.width += p.x - start.x;
                                  break;
                             case Cursor.NE_RESIZE_CURSOR:
                                  r.width += p.x - start.x;
                                  r.height -= p.y - start.y;
                                  r.y = p.y;
                                  break;
                             default:
                                  System.out.println("Unexpected resize type: " + type);
                        selectedComponent.setBounds(r.x, r.y, r.width, r.height);
                        start = p;
    }regards
    Aniruddha

  • "Stuck" in JDBC driver 10.2.0.1

    Environment: Aix 5.1, WebSphere 5.1.1.6, Oracle thin JDBC Driver 10.2.0.1, against Oracle 9i DB Server
    Serveral times a week, we have a huge spike in the number of JDBC connections in webshpere. Typically we see a maximum of 30 concurrent JDBC connections, when we spike we hit 120 connections in 1 second.
    The spike seems artificial, one minute we are chugging along and the next bam we have hit 120 connections. When we get the spike
    the application is not able to recover and the JVM must be restarted. Looking at the javacore, I see that almost all threads are "stuck" in the JDBC driver at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java(Compiled Code)).
    Talking to the DBA, there is no activity on the Oracle server during the spike time. These two points seem to lead us
    to the JDBC driver itself.
    Has anyone else experienced an issue such as this?
    3XMTHREADINFO "Servlet.Engine.Transports : 47255" (TID:0x307CA760, sys_thread_t:0x49B2FC20, state:CW, native ID:0x8448) prio=5
    4XESTACKTRACE at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteQuery(WSJdbcPreparedStatement.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java(Compiled Code))
    4XESTACKTRACE at cache.DBCache.get(DBCache.java(Compiled Code))

    Hi,
    I'd looks like the application hangs (OraclePreparedStatement.Execute Query) for some reason, as a result, more connections are allocated until the JVM crashes.
    I'd investigate why the application would hang and file a service request.
    Kuassi - blog http://db360.blogspot.com/
    ------ book http://www.amazon.com/gp/product/1555583296/

Maybe you are looking for