Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318187 - NegativeArraySizeException Occurs on Occasion when Calling JCEEncryptor.decryptPassword()
Summary: NegativeArraySizeException Occurs on Occasion when Calling JCEEncryptor.decry...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Chris Delahunt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 320375 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-28 10:47 EDT by lists CLA
Modified: 2022-06-09 10:08 EDT (History)
5 users (show)

See Also:


Attachments
proposed fix and testcase (6.08 KB, patch)
2010-07-29 15:22 EDT, Chris Delahunt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lists CLA 2010-06-28 10:47:13 EDT
Build Identifier: 2.0.2

Details can be found in the forum thread:

http://www.eclipse.org/forums/index.php?t=msg&th=170167&start=0&

Basically, it sounds like the fix for Toplink/3927740 did not get pulled into Eclipselink, that being synchronization of JCEEncryptor.decryptPassword(). So when using an external datasource, the method gets called with every DB call and being that decryptPassword() is not threadsafe, it will occasional blow up. Not sure if this affects anything else. Hopefully someone with access to the Toplink bug database can simply re-apply the Toplink fix to the Eclipselink codebase.

Reproducible: Sometimes

Steps to Reproduce:
1. Configure app to use Tomcat JNDI.
2. Set password field-javax.persistence.jdbc.password-to something (note, this won't actually be used for the JNDI datasource, this is just how we had things configured).
3. Apply high load to the system (triggering DB calls).

In theory, you could also just run JCEEncryptor.decryptPassword() repeatedly in a threaded scenario.
Comment 1 Chris Delahunt CLA 2010-07-27 15:54:34 EDT
Investigating
Comment 2 Chris Delahunt CLA 2010-07-29 15:22:25 EDT
Created attachment 175524 [details]
proposed fix and testcase
Comment 3 Chris Delahunt CLA 2010-08-09 14:06:02 EDT
fix checked into main and 2.1.1 on Aug 6th
Comment 4 Chris Delahunt CLA 2010-08-17 11:28:25 EDT
*** Bug 320375 has been marked as a duplicate of this bug. ***
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:08:24 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink