|
|
|
|
Re: Getting NegativeArraySizeException: allocArray [message #387773 is a reply to message #387772] |
Fri, 08 May 2009 18:30 |
Bruno Felaco Messages: 1 Registered: July 2009 |
Junior Member |
|
|
Hi,
I'm a colleague of Amod. Yes, we do have a session customizer. This is
legacy code, and we're not using the standard JPA configuration. The only
thing I can think of that might be relevant here is the code we have for
determining the DataSourcePlatform for us:
Platform datasourcePlatform =
session.getDatasourceLogin().getDatasourcePlatform();
DatabasePlatform newPlatform;
if (DBUtils.isMsSqlConnection()) {
// Use customized SQLServerPlatform to resolve Unicode issues.
newPlatform = new SQLServerPlatform();
} else if (DBUtils.isOracleConnection()) {
// Use the Oracle10Platform which is currently identical to
the Oracle9Platform.
// This is required to handle DATE fields properly.
// We no longer support Oracle8.
newPlatform = new Oracle10Platform();
// Oracle has a limit of 4000 characters for String constants.
This enables
// SQL binding for CLOBs.
newPlatform.setUsesStringBinding(true);
newPlatform.setStringBindingSize(4000);
// Byte array binding is required for persisting BLOBs
newPlatform.setUsesByteArrayBinding(true);
} else if (DBUtils.isDB2()) {
newPlatform = new DB2Platform();
} else {
throw new
DataAccessException("err.dataAccess.unsupportedDatabase",
new Object[] {""}, null);
}
newPlatform.setDefaultSequence(datasourcePlatform.getDefault Sequence());
newPlatform.setSequences(datasourcePlatform.getSequences());
newPlatform.setTableQualifier(datasourcePlatform.getTableQua lifier());
session.getDatasourceLogin().setDatasourcePlatform(newPlatfo rm);
In any case, what I found is that even though we're using a J2EE
DataSource and no password is required, the class DataSourceLogin is still
always decrypting the empty password. The decryptPassword method in
TopLink was synchronized, but now it is not. I recommended to Amod that
we simply call DataSourceLogin.setEncryptedPassword("") to circumvent the
unnecessary decryption. Does that sound plausible? If that's not
sufficient, then I would try overriding the decryptPassword method to
check for the empty string.
- Bruno
|
|
|
|
Powered by
FUDForum. Page generated in 0.03711 seconds