-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Oracle OCI driver
PostPosted: Thu Apr 28, 2005 4:42 am 
Newbie

Joined: Thu Apr 28, 2005 4:33 am
Posts: 2
Hi

I am trying to get Hibernate 2 working with the Oracle OCI driver. As you might all know there is a size limit of 4K when using CLOBs through the JDBC Thin Driver. When using the OCI, you won't have that issue.
Problem is, I can't get Hibernate to work with this driver. If anyone has any thoughts on this, please..

This is what I get when using the other driver and the following URL:
jdbc:oracle:oci:@localhost:1521:ORCL

[WARN] SettingsFactory - Could not obtain connection metadata <java.sql.SQLException: Invalid Oracle URL specified>
java.sql.SQLException: Invalid Oracle URL specified
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:182)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1160)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:794)

Thanks, Chris Schuit

_________________
-------------------------------------------
Chris Schuit


Top
 Profile  
 
 Post subject: Found OCI application
PostPosted: Thu Apr 28, 2005 6:09 am 
Newbie

Joined: Thu Apr 28, 2005 4:33 am
Posts: 2
Hi all,

To solve my own question, when using the OCI, the following things should be dealt with:

    Download the OCI driver from oracle.com and install the .dll (windows) or .so library approrpiately
.
    Set your URL in hibernate.properties: jdbc:oracle:oci8:@ORCL (make sure your database it set up in the servers TNSNAMES.ORA (mine is called ORCL).
    Set your driver class in hibernate.properties: oracle.jdbc.driver.OracleDriver
    Make sure the classes12.zip from the package you just downloaded is in the classpath and the old classes12.zip is gone.


Well, that's about it :) Hope this solves a lot of questions for a lot of people. The 4K horror has been mentioned a lot of times on the web.

Chris

_________________
-------------------------------------------
Chris Schuit


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.