tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tschuler <>
Subject AW: IllegalAccessException - OraclePreparedStatementWrapper
Date Sat, 12 Oct 2013 06:21:47 GMT
Hi Romain!

Maybe a custom dictionary could help.
But regarding to OpenJPA documentation (
chapter 4.4 (OracleDictionary Properties):

UseSetFormOfUseForUnicode: Prior to Oracle 10i, statements executed against unicode capable
columns (the NCHAR, NVARCHAR, NCLOB Oracle types) required special handling to be able to
store unicode values. Setting this property to true (the default) will cause OpenJPA to attempt
to detect when the column is one of these types, and if so, will attempt to correctly configure
the statement using the OraclePreparedStatement.setFormOfUse. For more details, see the Oracle
JDBC Programming with Unicode<>.
Note that this can only work if OpenJPA is able to access the underlying OraclePreparedStatement
instance, which may not be possible when using some third-party datasources. If OpenJPA detects
that this is the case, a warning will be logged.

And that's exactly what happens here.
Is a TomEE datasource a "third-party datasource" as described within the documentation?

Best regards,

Von: Romain Manni-Bucau [via OpenEJB] []
Gesendet: Mittwoch, 9. Oktober 2013 16:44
An: Thomas Schuler
Betreff: Re: IllegalAccessException - OraclePreparedStatementWrapper


I think you need to set a custom dictionarry (inheriting from
oracledictionary) handling wrappers

*Romain Manni-Bucau*
*Twitter: @rmannibucau <>*
*Blog: ***<>
*LinkedIn: ***

2013/10/9 tschuler <[hidden email]</user/SendEmail.jtp?type=node&node=4665497&i=0>>

> Hi!
> We are using latest TomEE 1.6.0 snapshot and an oracle database for storing
> entity beans.
> What we see are warning messages like:
> java.lang.IllegalAccessException: Class
> org.apache.openjpa.jdbc.sql.OracleDictionary can not access a member of
> class oracle.jdbc.driver.OraclePreparedStatementWrapper with modifiers
> "public"
> It happens if the database table includes "unicode" columns (e.g.
> and an entity is manipulated (added, gets found by a named query or
> deleted).
> We did additional tests and had a look inside the OpenJPA sources. What we
> see is:
> - The warnings did NOT depend on the used JDBC driver and NOT on the oracle
> database version.
> - Checking the source code (org.apache.openjpa.jdbc.sql.OracleDictionary)
> we
> can see that a specific prepared statement object
> (oracle.jdbc.OraclePreparedStatement) is required but while creation
> (conn.prepareStatement) another object
> (oracle.jdbc.driver.OraclePreparedStatement) is instantiated.
> Is there a way to get the correct OraclePreparedStatement object
> instantiated or is a special setting (in persistence.xml or tomee.xml)
> needed?
> Best regards,
> Thomas
> --
> View this message in context:
> Sent from the OpenEJB User mailing list archive at

If you reply to this email, your message will be added to the discussion below:
To unsubscribe from IllegalAccessException - OraclePreparedStatementWrapper, click here<>.

View this message in context:
Sent from the OpenEJB User mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message