Topic
  • 2 replies
  • Latest Post - ‏2013-01-21T16:39:06Z by Steola
Steola
Steola
78 Posts

Pinned topic IllegalAccessException WSJdbcUtil can not access a member of class oracle.

‏2013-01-18T17:30:56Z |
Getting this error by an indirect call made by Hibernate version 3.1.
Same code works fine with oracle driver 10g, but fails with 11g.
Code deployed on WAS 8.5.

a)exception:

Caused by: java.lang.IllegalAccessException: Class com.ibm.ws.rsadapter.jdbc.WSJdbcUtil can not access a member of class oracle.jdbc.driver.OraclePreparedStatementWrapper with modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:77)
at java.lang.reflect.Method.invoke(Method.java:602)
at com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.call(WSJdbcUtil.java:617)

b)a note on OTN that package: "oracle.jdbc.driver" was discontinued!

Again ojdbc driver is not called explicitly! From WAS perspective, is there a solution?

<< OTN
I just installed 11.1 and my code won't compile. What gives?

The classes in the package oracle.jdbc.driver are desupported in 11.1. You should use the types in the package oracle.jdbc instead. Typically all that is required is to replace oracle.jdbc.driver with oracle.jdbc. If that doesn't work then your code is using classes or methods that were never intended for public use. You will have to find another solution. There is no workaround or backward compatibility mode.
>>

thanks.
Updated on 2013-01-21T16:39:06Z at 2013-01-21T16:39:06Z by Steola
  • Steola
    Steola
    78 Posts

    Re: IllegalAccessException WSJdbcUtil can not access a member of class oracle.

    ‏2013-01-18T20:25:19Z  
    I have an update, i discovered that the Hibernate mapping provides an "in-house developed" class that calls: WSCallHelper.jdbcCall( ... "setBlob",...)

    causing the mentioned issue...
    Is there an alternative to make a jdbc call which would not cause the oracle issue?
    thanks.
  • Steola
    Steola
    78 Posts

    Re: IllegalAccessException WSJdbcUtil can not access a member of class oracle.

    ‏2013-01-21T16:39:06Z  
    • Steola
    • ‏2013-01-18T20:25:19Z
    I have an update, i discovered that the Hibernate mapping provides an "in-house developed" class that calls: WSCallHelper.jdbcCall( ... "setBlob",...)

    causing the mentioned issue...
    Is there an alternative to make a jdbc call which would not cause the oracle issue?
    thanks.
    Narrowed down the issue to the mentioned call:
    com.ibm.websphere.rsadapter.WSCallHelper.jdbcCall(
    null,
    statement,
    "setBLOB",
    new Object[] { new Integer(index),blob},
    new Class[] { int.class, oracle.sql.BLOB.class });

    Class WSCallHelper seems obsolete in WAS 8.5, but not clear what should replace it.

    Interesting that letting container to execute the passed in: PreparedStatement statement, works! which so far seems a valid solution.
    So avoiding the call altogether.