Bad support for ts hint in Oracle jdbc driver (for preparedStatement)

hi
I have the following SQL
SELECT TRUNC({ ts '2004-01-01 00:00:00.0' }) FROM ET1_ELEMENT
With the jdbc.odbc driver the following meta data is returned:
ResultSet meta data are...
Column [1]
name [TRUNC(TO_DATE('2004-01-0100:00]
type [93]
class name [java.sql.Timestamp]
which is fine.
Nevertheless with Oracle thin driver I got an SQL exception:
The SQL Error is:
ORA-00932: inconsistent datatypes: expected NUMBER got TIMESTAMP
internal exception:
(class java.sql.SQLException):
java.sql.SQLException: ORA-00932: inconsistent datatypes: expected NUMBER got TIMESTAMP
If I use the TO_DATE in the sentence (e.g. t_date('2004-01-01 00:00:00','YYYY-MM-DD HH24:MI:SS')) everything is fine on both driver.
Any idea on the problem? Is it a bug?
Thanks

Mikael,
I couldn't ascertain your environment from your post, so the below may be irrelevant for you. But in the hope that is isn't...
I tried your example on an Oracle 9i (9.2.0.4) database on SUN [sparc] Solaris 9, with J2SE 1.4.2_04 and the "ojdbc14.jar" [JDBC] driver. If I remove the "trunc" function, then I do not get an Oracle error. I must admit, though, that I don't understand why you need to trunc(ate) a literal value. All that the "trunc" function does is set the time part -- the hours, minutes, seconds, etc. -- of your timestamp to (all) zeroes -- which is what you have in your literal, anyway, so why the need for "trunc"?
I believe the Oracle JDBC driver converts the java sql-escape syntax -- "{ts '2004-01-01 00:00:00.0'}" -- to a call to the "to_date" function, anyway. Possibly one way to verify this would be to use P6 Spy. If I am correct, then it would only be logical that Oracle allows you to use the sql-escape syntax wherever it is all right to use the "to_date" function. But then again, I guess that
select trunc(to_date('2004-01-01 00:00','YYYY-MM-DD HH24:MI')
from   ET1_ELEMENTis allowable syntax anyway. So I guess maybe that this may be a bug in the JDBC driver. Have you checked the MetaLink Web site?
Good Luck,
Avi.

Similar Messages

  • Looking for oracle JDBC driver that support Rowset

    I am using oracle driver "oracle.jdbc.OracleDriver" downloaded from oracle.com and i am using cached rowset in my program but my program gave me runtime error :
    Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.OracleDatabaseMetaData.locatorsUpdateCopy()Z
    at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:757)
    at com.sun.rowset.CachedRowSetImpl.execute(CachedRowSetImpl.java:1385)
    at WebRowSetSample.main(WebRowSetSample.java:73)
    but if i used data driver provided by Data Direct "com.ddtek.jdbc.oracle.OracleDriver" then it is working fine but the problem is data direct driver is not free and cant be used in production server, so if anyone know any free driver that support oracle and rowset implementation or able to correct problem then plz help me out.
    thanks...

    Hi I am using latest driver from oracle site, but the problem is when i fire execute method of cahed rowset i throws error that i mentioned above, if you have any other driver than mail me on [email protected]

  • Oracle JDBC driver problem for Canada locale

    Hi, there:
    I have problem on Oracle JDBC thin driver with Canada locale on client side:
    I'm using Oracle9i thin jdbc driver, the nls parameters in oracle database is:
    NLS_LANGUAGE: AMERICAN
    NLS_TERRITORY: AMERICA
    NLS_NUMERIC_CHARACTERS : .,
    My java client side is running on Windows NT, which using jdbc thin driver to connect oracle database. If I set the locale in client side as "English(Canada)", it seems return me "French" number format, like ",45" (comma, instead of decimal point) for "0.45". However, If I set client side locale as "English(United States)", it returns me "0.45" as expected.
    So, my question: does Oracle JDBC driver always returns "French" number format evenif I set "English(Canada)" as locale? Because Canada have both English and French locale "French(Canada), and English(Canada)". How can I get "English" number format like "0.45" with "English(Canada)" locale setting?
    Really appreciated any reply, and thanks a lot in advance
    David

    Sounds like a question for Oracle Support to me.
    Anyway, the way to avoid the problem is to not ask Oracle to format numbers. Get the number directly (via ResultSet.getInt() or getDouble() or whatever) and ask Java to format it.

  • Exception "not implemented for class oracle.jdbc.driver.T4CNumberAccessor"

    Hello I'm having some troubles dealing with 'java.sql.Date' I'm working with express edition database and I have three classes(different packages)
    1.Mapper
    2.Objects Class
    3.ConsoleTest
    I need to get an arraylist of objects, some of which contain dates, but when try to do it I get this exception
    "java.sql.SQLException: Invalid column type: getDate not implemented for class oracle.jdbc.driver.T4CNumberAccessor"
    Do you have any idea how I can implement the getDate method for this T4CNumberAccessor
    Here are the methods that I'm using
    1.Mapper
    public ArrayList<Object> getAllTaskAuctions(Connection con)
              ArrayList<Object> l1 = new ArrayList<Object>();
              String SQLString1 = "select * from taskauction natural join tasks";
    PreparedStatement statement=null;
    try
    //=== get taskauctions natural join tasks
    statement = con.prepareStatement(SQLString1);
    ResultSet rs = statement.executeQuery();
    while(rs.next())
    l1.add(new TaskAuction(rs.getInt(1), rs.getInt(2), rs.getInt(3),
    rs.getDate(4), rs.getDate(5), rs.getInt(6)));
    l1.add(new Task(rs.getInt(1), rs.getInt(2), rs.getString(3),
    rs.getString(4), rs.getString(5), rs.getString(6), rs.getInt(7)));
    catch (Exception exc)
    System.out.println("Fail in TaskAuctionMapper - getAllTaskAuctions");
    System.out.println(exc);
    return l1;
    2.ConsoleTest class
    Connection con;
         public Connection getConnection(){
              try{ 
         Class.forName("oracle.jdbc.driver.OracleDriver");
         con = DriverManager.getConnection(
         "jdbc:oracle:thin:@localhost:1521:XE", "Project", "123" );
         //username/password@[/]host[:port][service_name]
         catch (Exception e)
         {   System.out.println("fail in getConnection()");
         System.out.println(e); }
              return con;
         public static void main(String[] args) {
              ConsoleTest ct = new ConsoleTest();
              TaskAuctionMapper tam1 = new TaskAuctionMapper();
    ArrayList<Object> alt1 = tam1.getAllTaskAuctions(ct.getConnection());
    Iterator<Object> itr1 = alt1.iterator();
    while (itr1.hasNext())
    TaskAuction taskauct = (TaskAuction) itr1.next();
    //Problem, exception traced to TaskAuctionMapper
    System.out.println(
              "Task ID: " + taskauct.getTaskid()+ ", "+
              "StartDate: "+ taskauct.getStartdate()+", "+
              "User ID: " + taskauct.getUserid());
         }

    Found the answer, I shouldn't use integers as parameters of column index in the result set, but instead use String to mark the fields :)

  • Is it a bug for Oracle JDBC driver?

    Hi,
    I use the thin JDBC driver to connect my server, and try to obtain the meta data for the query data set. However, every time I issue 'getMetaData()' to get meta data, the following error is reported:
    java.lang.NumberFormatException: For input string: "4294967295"
         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
         at java.lang.Integer.parseInt(Integer.java:480)
         at java.lang.Integer.parseInt(Integer.java:518)
         at oracle.jdbc.driver.OracleResultSetMetaData.getPrecision(OracleResultSetMetaData.java:381)
         at genentity.GenEntityForm.getTableMetaData(GenEntityForm.java:445)
         at genentity.GenEntityForm.jButton2_actionPerformed(GenEntityForm.java:336)
    and the program coding for this error is as follows:
    sql = "SELECT * FROM " + tableName;
    ps = conn.prepareStatement(sql);
    rs = ps.executeQuery();
    rsmd = rs.getMetaData(); <-- Error occurs in here.
    Does anyone get an idea for this? Please help.
    Thanks in advance,
    Athens Yan.

    Hi,
    If u have applied the patch then there shud be no problem...try applying the patch again.

  • Oracle JDBC Driver for Linux

    I'm looking for a place to download an Oracle JDBC driver for Linux. I have installed Oracle 8.1.5 for Linux, but don't find the driver either in the installation, nor on the CD. Can anyone point me to someplace I might be able to find it?
    Also, generic help in setting this up to work, JDBC API calls would also be of great help.
    Thanks.

    Luis Claudio Rodrigues da Silveira (guest) wrote:
    : How can I configure JDBC driver in a Suse environment? What
    are
    : the necessary steps?
    : Thanks in advance.
    1) You need classes111.zip usually located at
    $ORACLE_HONE/jdbc/lib.
    2) Add classes111.zip to CLASSPATH and export
    3) If you use thin driver your code should look like:
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    // Connect to the database
    // You must put a database name after the @ sign in the
    connection URL.
    // You can use either the fully specified SQL*net syntax or
    a short cut
    // syntax as <host>:<port>:<sid>. The example uses the
    short cut syntax.
    Connection conn =
    DriverManager.getConnection
    (jdbc:oracle:thin:@hostname:port:ORACLE_SID,
    USER_NAME, PASSWOED);
    null

  • [Oracle JDBC Driver]This driver is locked for use with embedded application

    Hi
    I installed Sun Java Studio Enterprise 8, and am trying to connect to my Oracle database using the attached tutorial code.
    The code compiles fine, but I get the following error whenever I run the file: [Oracle JDBC Driver]This driver is locked for use with embedded application
    I don't understand what is happening.
    Using the Runtime navigation panel on the upper left of the IDE screen, I can right-click and connect to the database, and navigate database files, using the Oracle JDBC Driver that came with JSE8.
    Name: Oracle Driver
    Driver: com.sun.sql.jdbc.oracle.OracleDriver
    Database URL: jdbc:sun:oracle://JAZZPUP:1521;SID=REPO
    If the driver is installed, and can be used to connect to a database by right-clicking on the database definition in the Runtime panel, why can't I connect to it just using java code in the IDE. I would expect both methods to work or to fail, not one of each using the same IDE.
    Many thanks and take care,
    Shayne
    import java.sql.*;
    public class CreateCoffees {
    public static void main(String args[]) {
    //String url = "jdbc:mySubprotocol:myDataSource";
    String url = "jdbc:sun:oracle://JAZZPUP:1521;SID=REPO";
    Connection con;
    String createString;
    createString = "create table COFFEES " +
    "(COF_NAME VARCHAR(32), " +
    "SUP_ID INTEGER, " +
    "PRICE FLOAT, " +
    "SALES INTEGER, " +
    "TOTAL INTEGER)";
    Statement stmt;
    try {
    //Class.forName("myDriver.ClassName");
    Class.forName("com.sun.sql.jdbc.oracle.OracleDriver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(e.getMessage());
    try {
    //con = DriverManager.getConnection(url, "myLogin", "myPassword");
    con = DriverManager.getConnection(url, "login", "password");
    stmt = con.createStatement();
    stmt.executeUpdate(createString);
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    } //end class CreateCoffees
    ---

    There are two similar threads:
    http://swforum.sun.com/jive/thread.jspa?threadID=61327&tstart=0
    http://swforum.sun.com/jive/thread.jspa?threadID=51057&messageID=188210
    To summarize - the DataDirectDriver that is shipped with the IDE seems to be locked to be used inside the IDE only because of some licensing issues etc..
    That's weird, I agree. I will raise a question on reasons for such a behavior.
    The solution would be to use Oracle's own driver, that is distributed at no charge from their web site - http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    HTH,
    Kirill

  • How to config the CLASSPATH in Win2000 server for JDBC(oracle.jdbc.driver,*)

    I am using the OS: Win2000 Server.I need to connect to some remote DataBase,but I
    don't know how to config the driver in the CLASSPATH environment variable, my Problem is: when I import the oracle.jdbc.driver.OracleDriver ,and run the program, it warns to me that it cannot find the class,and i know i didnot config the CLASSPATH in environment variables, so I want someone to tell me how to config it ,and where should the file "class12.zip" be placed !
    Thank you! maybe the problem is a piece of cake for you ,but now i do not know how to deal with it!

    Hi ,
    try this,
    http://myjdbc.tripod.com/basic/jdbcurl.html
    Regards
    Elango.

  • EJB - no suitable driver found for oracle jdbc driver

    this is the exception i got when i run the client:
    java.rmi.RemoteException: nested exception is: java.sql.SQLException: No suitable driver; nested exception is:
    java.sql.SQLException: No suitable driver
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:537)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at com.sun.enterprise.resource.JdbcUrlAllocator.createResource(JdbcUrlAllocator.java:45)
    at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:177)
    at com.sun.enterprise.resource.JdbcXAConnection.<init>(JdbcXAConnection.java:56)
    at com.sun.enterprise.resource.Jdbc10XaAllocator.createResource(Jdbc10XaAllocator.java:66)
    at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:177)
    at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:126)
    at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:137)
    at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:74)
    at bmp.TaxEJB.ejbCreate(TaxEJB.java:34)
    at bmp.TaxEJB_RemoteHomeImpl.create(TaxEJB_RemoteHomeImpl.java:32)
    at bmp._TaxEJB_RemoteHomeImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:520)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:210)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
    at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
    at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
    at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
    this is the implementation file (TaxEJB):
    package bmp;
    import java.sql.*;
    import javax.sql.*;
    import javax.naming.*;
    import java.util.*;
    import javax.ejb.*;
    public class TaxEJB implements EntityBean {
    private String stateCode;
    private float taxRate;
    private EntityContext ctx;
    private DataSource ds;
    private String dbName = "jdbc/Oracle";
    private Connection con;
    public void setTaxRate(float taxRate) {
    this.taxRate = taxRate;
    public float getTaxRate() {
    return this.taxRate;
    public String ejbCreate(String stateCode, float taxRate)
    throws CreateException {
    if (stateCode == null) {
    throw new CreateException("The State Code is required.");
    try {
    String sqlStmt = "INSERT INTO TaxTable VALUES ( ? , ? )";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setString(1, stateCode);
    stmt.setFloat(2, taxRate);
    stmt.executeUpdate();
    stmt.close();
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    this.stateCode = stateCode;
    this.taxRate = taxRate;
    return stateCode;
    public void ejbPostCreate(String stateCode, float taxRate) {}
    public void setEntityContext(EntityContext context) {
    this.ctx = context;
    try {
    InitialContext initial = new InitialContext();
    ds = (DataSource)initial.lookup(dbName);
    } catch (NamingException ne) {
    throw new EJBException(ne);
    public void unsetEntityContext() {
    ctx = null;
    public void ejbActivate() {
    stateCode = (String)ctx.getPrimaryKey();
    public void ejbPassivate() {
    stateCode = null;
    public void ejbLoad() {
    try {
    String sqlStmt = "SELECT stateCode, taxRate FROM TaxTable " +
    "WHERE stateCode = ? ";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setString(1, stateCode);
    ResultSet rs = stmt.executeQuery();
    if (rs.next()) {
    this.taxRate = rs.getFloat("taxRate");
    stmt.close();
    } else {
    stmt.close();
    throw new NoSuchEntityException("State Code: " + stateCode);
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    public void ejbStore() {
    try {
    String sqlStmt = "UPDATE TaxTable SET "
    + "taxRate = ? " + "WHERE stateCode = ?";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setFloat(1, taxRate);
    stmt.setString(2, stateCode);
    if (stmt.executeUpdate() != 1) {
    throw new EJBException("Object state could not be saved");
    stmt.close();
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    public void ejbRemove() {
    try {
    String sqlStmt = "DELETE FROM TaxTable WHERE stateCode = ? ";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setString(1, stateCode);
    stmt.executeUpdate();
    stmt.close();
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    public String ejbFindByPrimaryKey(String primaryKey)
    throws FinderException {
    try {
    String sqlStmt = "SELECT stateCode "
    + "FROM TaxTable WHERE stateCode = ? ";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setString(1, primaryKey);
    ResultSet rs = stmt.executeQuery();
    if (!rs.next()) {
    throw new ObjectNotFoundException();
    rs.close();
    stmt.close();
    return primaryKey;
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    public Collection ejbFindInRange(float lowerLimit, float upperLimit)
    throws FinderException {
    try {
    String sqlStmt = "SELECT stateCode from TaxTable "
    + "WHERE taxRate BETWEEN ? AND ?";
    con = ds.getConnection();
    PreparedStatement stmt = con.prepareStatement(sqlStmt);
    stmt.setFloat(1, lowerLimit);
    stmt.setFloat(2, upperLimit);
    ResultSet rs = stmt.executeQuery();
    ArrayList list = new ArrayList();
    while (rs.next()) {
    String id = rs.getString(1);
    list.add(id);
    stmt.close();
    return list;
    } catch (SQLException sqle) {
    throw new EJBException(sqle);
    } finally {
    try {
    if (con != null) {
    con.close();
    } catch (SQLException sqle) {}
    this is the setting in resource.properties:
    jdbcDataSource.5.name=jdbc/Oracle
    jdbcDataSource.5.url=jdbc\:oracle\:thin\:@nicole\:1521\:NICOLE
    jdbcDriver.1.name=oracle.jdbc.driver.OracleDriver
    this is my classpath setting:
    %J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\system\cloudscape.jar;%J2EE_HOME%\lib\system\cloudutil.jar;%J2EE_HOME%\lib\cloudscape\RmiJdbc.jar;%J2EE_HOME%\lib\system\classes12.jar;.
    since i already declare classpath for oracle JDBC Driver (classes12.jar), why the program still can't found the oracle.jdbc.driver.OracleDriver? please help. thanks.

    Hi,
    I m trying to connect ORACLE9i using JSP.But i encounter the error java.sql.SQlException no suitable driver found.My code is as follows.
    <html>
    <head><title>oracle</title></head>
    <body>
    <%@ page language="java"%>
    <%@ page import="java.sql.*" %>
    <%
    String eid=new String();
    String en=new String();
    try
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(ClassNotFoundException cnfe)
         out.println("Failed to load Jdbc Odbc driver");
    try{
    Connection con = DriverManager.getConnection("jdbc:oracle:thin@localhost:1521:ORACLE9I","scott","tiger");
    Statement ps = con.createStatement();
    try{
    ResultSet rs = ps.executeQuery("select * from empDetails");
    while(rs.next())
         out.println(rs.getString(1));
         out.println(rs.getString(2));
    rs.close();
    }catch(SQLException se)
    out.println(se);
    ps.close();
    con.close();
    catch(Exception e)
         out.println(e);
    catch (Exception e){
    out.println(e);
    %>
    </body></html>
    Pls anyone give me a solution.Its really urgent.

  • Does Oracle JDBC driver support cancel()?

    In JDBC API, class Statement has a cancel method, and its support depends on the implementation of the JDBC dirver.
    Does any Oracle JDBC driver support this feature? Thanks.

    Does any Oracle JDBC driver support this feature? Thanks.
    It is supported (but not by the server-side Thin driver); the return value will be "ORA-17015 Statement was cancelled"
    cheers,
    Mary

  • Oracle JDBC driver problem for Oracle 8.1.6

    i am a newbee to Java, i was trying JDBC programming thru Jbuilder 4.0. now the problem is whenever i am trying the DriverManager.getconnection(), I am getting an error "NO SUITABLE DRIVER". i have downloaded jodbc14.jar(oracle 9i JDBC driver) but so result. what can i do now? any other config issues or is it due to absence of a Oracle JDBC driver of Oracle 8.1.6.

    i have set the classpath as mentioned. but no solution.
    the error is like this::
    java.lang.NoClassDefFoundError: java/sql/Savepoint
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
         at java.sql.DriverManager.getConnection(DriverManager.java:517)
         at java.sql.DriverManager.getConnection(DriverManager.java:177)
         at DbaseTest.DbaseForm.OpenConnection(DbaseForm.java:37)
         at DbaseTest.DbaseForm.jbInit(DbaseForm.java:73)
         at DbaseTest.DbaseForm.<init>(DbaseForm.java:26)
         at DbaseTest.Application1.<init>(Application1.java:11)
         at DbaseTest.Application1.main(Application1.java:40)
    i have imported
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    import oracle.jdbc.*;
    import java.lang.*;
    the driver is registered by:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

  • SchemaTool() throws ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    KODO 2.5.3
    I am trying to use the SchemaTool java class for schema manipulations. When
    I try to construct a SchemaTool object I get the following exception:
    com.solarmetric.kodo.runtime.FatalUserException:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    NestedThrowables:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    I am passing an instance of MultiLoaderClassResolver (constructed using a
    custom URLClassLoader) as the ClassResolver argument to the SchemaTool
    constructor. The orcale jar "classes12.jar" is one of the URLs in the
    URLClassResolver. Before constructing a SchemaTool object, a call to
    canResolveClass("oracle.jdbc.driver.OracleDriver") on the class resolver
    returns true. So why is SchemaTool not able to find this class?
    Thanks
    Vijay

    Marc,
    It might well be problems with my custom class loader (which are a pain to
    debug indeed) or my lack of understanding of some of your schema tool
    classes, but the basic problem I encountered (before getting to the Logger
    issue) is as follows:
    I have an instance of MultiLoaderClassResolver constructed using my custom
    class loader.
    A call to resolveClass("orcale.jdbc.driver.OrcaleDriver") on this instance
    returns the correct Class (does not throw a ClassNotFound exception).
    The same MultiLoaderClassResolver instance is passed as an argument to
    SchemaTool(). SchemaTool.refresh() throws an exception:
    ClassNotFound: orcale.jdbc.driver.OrcaleDriver
    So it seems to me that somewhere in the SchemaTool code you are trying to
    resolve orcale.jdbc.driver.OrcaleDriver using something other than the
    instance of MultiLoaderClassResolver that I passed in. From the stack trace
    in my earlier message, it seems like that is happening in:
    com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.createPKColumns(ClassM
    apping.java:1584)where an instance of ConfigurationConnector is constructed. BTW, this is how
    I construct and pass a ConfigurationConnector to SchemaTool:
    JDBCConfiguration conf = new JDBCSimpleConfiguration(someProps);
    ClassResolver resolver = new MultiLoaderClassResolver(myCustomClassLoader);
    Connector connector = new ConfigurationConnector(conf, resolver, false);
    SchemaTool sTool = new SchemaTool(conf, resolver, connector);
    Vijay
    "Marc Prud'hommeaux" <[email protected]> wrote in message
    news:[email protected]...
    Vijay-
    Custom ClassLoader problems are often very hairy to debug. The first
    error message you are receiving indicates a problem:
    org.apache.commons.logging.LogConfigurationException: Class
    org.apache.commons.logging.impl.Log4JLogger does not implement LogThis indicates to me that the
    "org.apache.commons.logging.impl.Log4JLogger" and
    "org.apache.commons.logging.Log" classes are being loaded in different
    ClassLoaders, which is generally a bad thing. Is your URLClassLoader
    deferring to the parent ClassLoader?
    I think that the first step is to identify why the class loaders are
    different for these two classes (which should be easy to do with some
    printlns in a test program that uses your URLClassLoader).
    Bear in mind that this isn't technicall a Kodo issue, but a general
    ClassLoader issue. However, we are happy to try to provide hints and
    guidance about how to isolate the source of the problem.
    In article <[email protected]>, Vijay Ganesan wrote:
    After trying out some combinations, the stack trace at the bottom of
    this
    message gives a better clue of what my problem is:
    Looks like a new ConfigurationConnector is created in ClassMapping.javathat
    ignores my class resolver (based on my custom class loader) that Icreated
    as follows:
    JDBCConfiguration conf = new JDBCSimpleConfiguration(someProps);
    ClassResolver resolver = newMultiLoaderClassResolver(myCustomClassLoader);
    >>
    Connector connector = new ConfigurationConnector(conf, resolver, false);
    SchemaTool sTool = new SchemaTool(conf, resolver, connector);
    Adding the following line before the schema related code solves theproblem:
    Thread.currentThread().setContextClassLoader(myCustomClassLoader);
    However, that causes another error which, from a brief look at
    LogFactoryImpl, seems surely related to custom class loaders. Don't knowhow
    to get past this one:
    org.apache.commons.logging.LogConfigurationException:
    org.apache.commons.logging.LogConfigurationException:
    org.apache.commons.logging.LogConfigurationException: Class
    org.apache.commons.logging.impl.Log4JLogger does not implement Log
    at
    org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
    va:532)
    at
    org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
    va:272)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:414)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.ConfigurationConnector.createConnecti
    onFactory(ConfigurationConnector.java:140)
    --------Stack trace------------
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at
    com.solarmetric.util.classes.LoaderClassResolver.resolveClass(LoaderClassRes
    olver.java:34)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.ConfigurationConnector.createConnecti
    onFactory(ConfigurationConnector.java:113)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.ConfigurationConnector.<init>(Configu
    rationConnector.java:67)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.ConfigurationConnector.<init>(Configu
    rationConnector.java:59)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.ConfigurationConnector.<init>(Configu
    rationConnector.java:39)
    at
    com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.createPKColumns(ClassM
    apping.java:1584)
    at
    com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.install(ClassMapping.j
    ava:1416)
    at
    com.solarmetric.kodo.impl.jdbc.ormapping.Mapping.createMapping(Mapping.java:
    169)
    at
    com.solarmetric.kodo.impl.jdbc.ormapping.Mapping.createMappings(Mapping.java
    :116)
    at
    com.solarmetric.kodo.impl.jdbc.ormapping.Mapping.createMappings(Mapping.java
    :86)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.createMappings(SchemaTool.j
    ava:831)
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.refresh(SchemaTool.java:333
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.refresh(SchemaTool.java:321
    at
    com.solarmetric.kodo.impl.jdbc.schema.SchemaTool.refresh(SchemaTool.java:311
    "Stephen Kim" <[email protected]> wrote in message
    news:[email protected]...
    My guess is that your custom classloader is preventing instanceof. Can
    you try using the system classloader or see if java.sql.Driver is
    assignable from oracle.jdbc.dirver.OracleDriver?
    Vijay Ganesan wrote:
    KODO 2.5.3
    I am trying to use the SchemaTool java class for schema
    manipulations.
    When
    I try to construct a SchemaTool object I get the following exception:
    com.solarmetric.kodo.runtime.FatalUserException:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    NestedThrowables:
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    I am passing an instance of MultiLoaderClassResolver (constructed
    using
    a
    custom URLClassLoader) as the ClassResolver argument to the
    SchemaTool
    constructor. The orcale jar "classes12.jar" is one of the URLs in the
    URLClassResolver. Before constructing a SchemaTool object, a call to
    canResolveClass("oracle.jdbc.driver.OracleDriver") on the classresolver
    returns true. So why is SchemaTool not able to find this class?
    Thanks
    Vijay
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Help - Could not load 'oracle.jdbc.driver.OracleDriver ...

    I'm using oci8 to connect to the Oracle database.
    URL: jdbc:oracle:oci8:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(PORT=1527)(HOST=testhost)))(CONNECT_DATA=(SID=fnoe2pa)))
    When I tried to start the weblogic server, I got the following errors:
    Can you suggest what I should do next (step-wise)??? Thanks, Bobby
    <Sleeping in createResource()>
    ####<15/08/2002 14:09:43> <Error> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001060> <Cannot startup connection pool
    "pool/test_myapp" weblogic.common.ResourceException:
    Could not load 'oracle.jdbc.driver.OracleDriver
    If this is a type-4 JDBC driver, it could occur if the JDBC
    driver is not in the system CLASSPATH.
    If this is a type-2 JDBC driver, it may also indicate that
    the Driver native layers(DBMS client lib or driver DLL)
    have not been installed properly on your system
    or in your PATH environment variable.
    This is most likely caused by one of the following:
    1. The native layer SO, SL, or DLL could not be found.
    2. The file permissions on the native layer SO, SL, or DLL
    have not been set properly.
    3. The native layer SO, SL, or DLL exists, but is either
    invalid or corrupted.
    For more information, read the installation documentation
    for your JDBC Driver, available from:
    http://e-docs.bea.com
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:212)
         at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:134)
         at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:705)
         at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
         at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:650)
         at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:360)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:285)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:239)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:199)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:360)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy31.updateDeployments(Unknown Source)
         at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2977)
         at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:372)
         at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:160)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:360)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy42.start(Unknown Source)
         at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:480)
         at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
         at weblogic.management.Admin.finish(Admin.java:644)
         at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
         at weblogic.Server.main(Server.java:35)
    >
    ####<15/08/2002 14:09:43> <Info> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001082> <Creating Data Source named
    jdbc/test_myapp for pool pool/test_myapp>
    ####<15/08/2002 14:09:43> <Info> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001070> <Checking existence of connection pool
    pool/test_myapp requested by user system>
    ####<15/08/2002 14:09:43> <Error> <JDBC> <qawebmethods> <myserver>
    <main> <system> <> <001059> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbc/test_myapp) can't
    be created with non-existent Pool (connection or multi)
    (pool/test_myapp)>
    ####<15/08/2002 14:09:50> <Info> <EJB> <qawebmethods> <myserver>
    <main> <system> <> <010008> <EJB Deploying file: myapp-ejb.jar>
    ####<15/08/2002 14:09:50> <Warning> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160007> <You are running WebLogic Server with J2EE
    1.3 features enabled. The implementation of specific J2EE 1.3 features
    (EJB 2.0, JSP 1.2, Servlet 2.3, and J2EE Connector Architecture 1.0)
    in BEA WebLogic Server 6.1 is of a non-final version of the
    appropriate specification. It is subject to change in future releases
    once the specification becomes finalized. This may cause application
    code developed for BEA WebLogic Server 6.1 that uses the new features
    of J2EE 1.3 to be incompatible with the J2EE 1.3 platform supported in
    future releases of BEA WebLogic Server.>
    ####<15/08/2002 14:09:59> <Error> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160001> <Error deploying application myapp-ejb:
    Unable to deploy EJB: Counter from myapp-ejb.jar:
    The DataSource with the JNDI name: jdbc/test_myapp could not be
    located. Please ensure that the DataSource has been deployed
    successfully and that the JNDI name in your EJB Deployment descriptor
    is correct.
    >
    ####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101053> <[HTTP myserver] Loading web app: myapp>
    ####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101059> <[myserver] Loading myapp from WAR file:
    C:\bea\wlserver6.1\.\config\mydomain\applications\.wlnotdelete\wlap31483\myapp.war>
    ####<15/08/2002 14:09:59> <Warning> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160007> <You are running WebLogic Server with J2EE
    1.3 features enabled. The implementation of specific J2EE 1.3 features
    (EJB 2.0, JSP 1.2, Servlet 2.3, and J2EE Connector Architecture 1.0)
    in BEA WebLogic Server 6.1 is of a non-final version of the
    appropriate specification. It is subject to change in future releases
    once the specification becomes finalized. This may cause application
    code developed for BEA WebLogic Server 6.1 that uses the new features
    of J2EE 1.3 to be incompatible with the J2EE 1.3 platform supported in
    future releases of BEA WebLogic Server.>
    ####<15/08/2002 14:09:59> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101031>
    <[WebAppServletContext(1412030,myapp,/myapp)] extracting classfiles to
    C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\wlap31483\WEB-INF\_tmp_war_myapp:>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101032>
    <[WebAppServletContext(1412030,myapp,/myapp)] extracted classfiles
    successfully...>
    ####<15/08/2002 14:10:04> <Info> <HTTP Session> <qawebmethods>
    <myserver> <main> <system> <> <100037> <Creating SessionContext of
    type: memory for webapp: /myapp>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering classpath
    servlet with initArgs 'null'>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering getior
    servlet with initArgs 'null'>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering tunneling
    servlets with initArgs 'wl-dispatch-policy=direct'>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101047>
    <[WebAppServletContext(1412030,myapp,/myapp)] registering JSPServlet
    with initArgs '[JspConfig:
    verbose=true,packagePrefix=jsp_servlet,-compiler=javac,compileFlags=,workingDir=C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\wlap31483\WEB-INF\_tmp_war_myapp,pageCheckSeconds=1,superclass=null,keepgenerated=false,precompileContinue=false,compilerSupportsEncoding=true,encoding=null,defaultfilename=index.jsp,compilerclass=null,noTryBlocks=false]'>
    ####<15/08/2002 14:10:04> <Debug> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101097> <Registering ServletContext:
    "myapp:/myapp">
    ####<15/08/2002 14:10:04> <Info> <J2EE> <qawebmethods> <myserver>
    <main> <system> <> <160003> <Deployed : myapp>
    ####<15/08/2002 14:10:04> <Info> <HTTP> <qawebmethods> <myserver>
    <main> <system> <> <101133> <Initializing WEB server myserver>
    ####<15/08/2002 14:10:04> <Notice> <Management> <qawebmethods>
    <myserver> <main> <system> <> <141052> <Application Poller started for
    development server.>
    ####<15/08/2002 14:10:04> <Notice> <WebLogicServer> <qawebmethods>
    <myserver> <ListenThread> <system> <> <000202> <ListenThread listening
    on port 7001>
    ####<15/08/2002 14:10:04> <Info> <NT Performance Pack> <qawebmethods>
    <myserver> <ListenThread> <system> <> <000000> <NATIVE: NTSocketMuxer
    was built on Nov 1 2001 16:39:28
    >
    ####<15/08/2002 14:10:04> <Notice> <WebLogicServer> <qawebmethods>
    <myserver> <SSLListenThread> <system> <> <000202> <SSLListenThread
    listening on port 7002>
    ####<15/08/2002 14:10:05> <Notice> <Management> <qawebmethods>
    <myserver> <main> <system> <> <141030> <Starting discovery of Managed
    Server... This feature is on by default, you may turn this off by
    passing -Dweblogic.management.discover=false>
    ####<15/08/2002 14:10:05> <Notice> <WebLogicServer> <qawebmethods>
    <myserver> <main> <system> <> <000331> <Started WebLogic Admin Server
    "myserver" for domain "mydomain" running in Development Mode>
    ####<15/08/2002 14:10:11> <Info> <NT Performance Pack> <qawebmethods>
    <myserver> <ExecuteThread: '14' for queue: 'default'> <> <> <000000>
    <Allocating: '2' NT reader threads>
    ####<15/08/2002 14:10:13> <Info> <HTTP> <qawebmethods> <myserver>
    <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
    <> <101047> <[WebAppServletContext(5367844,console,/console)] actions:
    init>
    ####<15/08/2002 14:10:18> <Info> <HTTP> <qawebmethods> <myserver>
    <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
    <> <101047> <[WebAppServletContext(5367844,console,/console)]
    FileServlet: init>
    ####<15/08/2002 14:10:18> <Info> <HTTP> <qawebmethods> <myserver>
    <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system>
    <> <101047> <[WebAppServletContext(5367844,console,/console)]
    FileServlet: Using standard I/O>

    "thorick" <[email protected]> wrote in message news:<[email protected]>...
    Most likely, the OCI libraries could not be loaded.
    Before continuing down this path, is there any reason
    why you want to use an OCI based Driver as opposed to the
    all Java Oracle thin driver ?There is indeed a valid reason for my choice.
    I am currently connecting to the Oracle "Rdb" 7.0 database (located on
    VMS) - not Oracle Oracle.
    The SQL Service software we're currently using is version 7.1. This
    version works well with the OCI8 driver (when connecting to the
    database from Windows NT). This version of SQL Service however does
    NOT work for the THIN driver (unless we upgrade the SQL Service to
    version 7.1.5.5 - which we're not prepared to do so because it is not
    stable enough from our previous test/trials). SQLSRV Version 7.1.5.5
    works for THIN driver but it will result in uncommitted
    transactions/unresolved connection/stopping of listener issues and
    there is a need to restart the service from time to time. Oracle has
    since confirmed that this is a bug that they have yet to resolve...
    So we have to stick to OCI8 (THICK) for the time being. I would really
    appreciate it very much if you can tell me the various OCI libraries
    that I need to load (in terms of WebLogic Server config file settings
    etc..).
    By the way I have already installed the Oracle 8 client software on
    the NT server (where WebLogic Server is) and I have also set up the
    relevant SID (using the Net8 Assistant) that points to the Oracle Rdb
    database on the VMS. I have also tried using SQL*Plus to connect to
    the database and I can connect properly to the database. But WebLogic
    simply doesn't seem to load the software.
    Help...
    Regards,
    Bobby Brown, writing from Australia.

  • Oracle JDBC Driver 10.1.0.4.0 and IndexOutOfBounds-Exception

    Hello all,
    we´ve experienced a weird problem using the Oracle JDBC driver version 10.1.0.4.0. While executing SELECT statement we get an ArrayIndexOutOfBounds exception from the JDBC driver. Here´s the stacktrace:
    java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at oracle.jdbc.driver.T4CDateAccessor.saveDataFromOldDefineBuffers(T4CDateAccessor.java:212)
    at oracle.jdbc.driver.T4CPreparedStatement.saveDefineBuffersIfRequired(T4CPreparedStatement.java:405)
    at oracle.jdbc.driver.OracleStatement.prepareAccessors(OracleStatement.java:859)
    at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:949)
    at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:532)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1037)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2905)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2946)
    at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:124)
    We couldn´t find anything on the web on this error. We´re using Weblogic 8.1 SP4 with JDBC version. Does anyone have a hint or an idea what could be the problem here?
    Thanks for any help in advance!
    Cheers,
    Joerg

    I may have a related bug, I get a similiar exception when running JIRA...
    java.lang.ArrayIndexOutOfBoundsException: -1
    at oracle.jdbc.driver.DateTimeCommonAccessor.computeJulianDay(DateTimeCommonAccessor.java:341)
    at oracle.jdbc.driver.DateTimeCommonAccessor.getMillis(DateTimeCommonAccessor.java:386)
    at oracle.jdbc.driver.DateAccessor.getTimestamp(DateAccessor.java:142)
    at oracle.jdbc.driver.OracleResultSetImpl.getTimestamp(OracleResultSetImpl.java:1018)...I tried the 10.1.0.2 and 10.1.0.4 drivers, both throw the same exception. I would try the 10.2 drivers, but they just hang! Gotta love Oracle QA!

  • Use of oracle.jdbc.driver now deprecated.

    Hi all,
    Just thought of sharing this note with us.,(if its new ..)
    http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/java.901/a90211/overvw.htm#1008871
    Extract ...,
    Beginning in Oracle9i, the Oracle extensions to JDBC are captured in the package oracle.jdbc. This package contains classes and interfaces that specify the
    Oracle extensions in a manner similar to the way the classes and interfaces in java.sql specify the public JDBC API.
    Your code should use the package oracle.jdbc instead of the package oracle.jdbc.driver used in earlier versions of Oracle. Use of the package
    oracle.jdbc.driver is now deprecated, but will continue to be supported for backwards compatibility.
    All that is required to covert your code is to replace "oracle.jdbc.driver" with "oracle.jdbc" in the source and recompile. This cannot be done piece-wise.
    You must convert all classes and interfaces that are referenced by an application. Conversion is not required, but is highly recommended. Future releases of Oracle
    may have features that are incompatible with use of the package oracle.jdbc.driver.
    The purpose of this change is to enable the Oracle JDBC drivers to have multiple implementations. In all releases up to and including Oracle9i, all of the Oracle
    JDBC drivers have used the same top level implementation classes, the classes in the package oracle.jdbc.driver. By converting your code to use
    oracle.jdbc, you will be able to take advantage of future enhancements that use different implementation classes. There are no such enhancements in Oracle9i, but
    there are plans for such enhancements in the future.
    Regards
    Elango.

    The two main things that would have to change
    - driver : com.microsoft.sqlserver.jdbc.SQLServerDriver
    - url: jdbc:microsoft:sqlserver://localhost:1433
    It may be that this page will help you
    http://msdn.microsoft.com/data/learning/jdbc/
    You also need to make sure that the files Msbase.jar , Msutil.jar and Mssqlserver.jar are all available in the "classpath"
    For a web app, that means these files should be in the WEB-INF/lib directory.
    Good luck,
    evnafets

Maybe you are looking for

  • Reg LGWR got killed by OS utility

    Hi, Last saturday i faced a strange issue in my database. My environment: Oracle EBS. Two node installation. Forms and Web in One server and Concurrent and Database in Another. We have sheduled backup on every saturday. Duing last saturday,after back

  • HDD Noise + Trackpad

    HI everyone, I just bought this macbook pro 15" on saturday and I have to say that I'm really glad of this laptop. But since yesterday evening I noticed two things: First, when I open an "heavy" program, it seems like the HDD or the processor is maki

  • Database Crawler-Follow URL

    Hi, I am trying to crawl an external SQL Server database using SharePoint 2013 Search engine. The database has a table that holds URL of documents published in a SharePoint 2010 site. I would like to know if SharePoint 2013 crawler will be able to fo

  • Fixing duplicate keyword problem in LR 2.2

    I have imported Controlled Vocabulary into my existing keyword library. Unfortunately I already had existing keywords tagged to a couple of hundred photos. As a result I now have duplicate keywords for each photo. I realize I may have compounded my p

  • Color difference between LCD monitor and iMac monitor?

    So I recently purchased a 27" iMac (purchased it last week) and have hooked up my previous monitor, a 24" Apple LCD cinema display (aluminum enclosure) to have a dual-monitor setup. Both are using Apple's stock color profiles, but the LCD cinema disp