[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3159) Oracle 11g - desupport of oracle.jdbc.driver

Richard Marriott (JIRA) noreply at atlassian.com
Mon Mar 15 15:31:50 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35834#action_35834 ] 

Richard Marriott commented on HHH-3159:
---------------------------------------

Is this problem really fixed - I am getting it with WebLogicServer 10.3 and Hibernate 3.3.2 - I have checked the Dialect source code and it still looks wrong:

	// not final-static to avoid possible classcast exceptions if using different oracle drivers.
	int oracletypes_cursor_value = 0; 
	public int registerResultSetOutParameter(java.sql.CallableStatement statement,int col) throws SQLException {
		if(oracletypes_cursor_value==0) {
			try {
				Class types = ReflectHelper.classForName("oracle.jdbc.OracleTypes");
				oracletypes_cursor_value = types.getField("CURSOR").getInt(null);
			} catch (Exception se) {
				throw new HibernateException("Problem while trying to load or access OracleTypes.CURSOR value",se);
			} 
		}
		//	register the type of the out param - an Oracle specific type
		statement.registerOutParameter(col, oracletypes_cursor_value);
		col++;
		return col;
	}



> Oracle 11g - desupport of oracle.jdbc.driver
> --------------------------------------------
>
>                 Key: HHH-3159
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3159
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.2.5
>         Environment: Hibernate 3.2.5GA, Oracle 11.1.0.6.0.
>            Reporter: Dustin Schultz
>            Assignee: Chris Bredesen
>             Fix For: 3.2.7, 3.3.2, 3.5.0.Beta-1
>
>   Original Estimate: 1 minute
>  Remaining Estimate: 1 minute
>
> With Oracle 11g, the deprecated package oracle.jdbc.driver no longer exists and this causes issues with all OracleDialect classes making it impossible to use Hibernate.
> This issue affects all of the following classes:
> Oracle9iDialect.java
> Oracle9Dialect.java
> Oracle10gDialect.java
> The line error in question is:
>     Class types = ReflectHelper.classForName("oracle.jdbc.driver.OracleTypes");
> This simply needs to be changed to:
>      Class types = ReflectHelper.classForName("oracle.jdbc.OracleTypes");
> From the Oracle 11g readme.txt
> "In Oracle JDBC release 9.0.1 customer use of the classes
>     in that package was deprecated. A new package, oracle.jdbc, was
>     introduced and customers were advised to begin using the
>     interfaces and classes defined in oracle.jdbc. In every release
>     since 9.0.1 we have encouraged customers to switch to oracle.jdbc
>     and stated that oracle.jdbc.driver would be desupported. The time
>     has come. Customer code that references oracle.jdbc.driver will
>     not compile and will not execute in this and future releases of
>     the Oracle JDBC drivers. Please use oracle.jdbc instead."
> Thanks.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list