Community
Participate
Working Groups
Build Identifier: 20100323-r6872 Exception is connected with oracle proxy authentication for Oracle 10g DB on WLS 10.3.x. Isolated client session is used and before every session bean call an interceptor method is fired. This method sets oracle proxy properties for the session bean's Entity Manager. Everything works fine but in some situations there will be "java.sql.SQLException: This is already a proxy session" exception for every session bean call. The only way to repair the app after this is to restart the WLS. Looks like WLS doesn't issue beforeCompletion callback and attempt to clear proxy session in afterCompletion callback fails because access to the connection no longer allowed after transaction is complete. Stacktrace of the exception is attached. Detailed discussion of the problem is here: http://forums.oracle.com/forums/thread.jspa?messageID=4530698 Reproducible: Always Steps to Reproduce: 1. lock a row in some table from external to the app DB session and try to update this row from the app; 2. release the lock from external session; 3. you'll get "Internal Exception: java.sql.SQLException: This is already a proxy session" for you every session bean call or 1. just explicitly roll back the user transaction and you'll get the exception
Created attachment 177662 [details] stacktrace stacktrace
Created attachment 178193 [details] patch with two disabled tests The core problem is in WLS and it will be fixed in WLS 10.3.4. The current patch 1) Adds debug output to connection customizer; 2) Adds a check for already opened proxy session - that should work around some (but not all!) problems: the connection released into poll without clearing its proxy session will have its old proxy session closed before starting a new one. That should fix the problem reported by the bug filer (see ProxyAuthenticationServerTestSuite.testFlushRollback); 3) Added two commented out non-Eclipselink tests: testJtaDataSource and testNonJtaDataSource that illustrate the core (WLS) problem. The tests should be uncommented when the core bug is fixed in WLS 10.3.4. All what's left here is to wait until the core WLS bug is fixed, then uncomment the tests and close the bug.
Forgot to mention that the patch also includes change to WebLogicPlatform - it determines the version of WLS and clears statement cache only if it's required for proxy session support - which is before WLS 10.3.4.
Checked the patch into both trunk (2.2) and 2.1.2
Uncommented testJtaDataSource and testNonJtaDataSource: they now run only on WLS 10.3.4, which now automatically closes proxy session before retuning connection to the pool. Moreover, it clears cached statements when open or close proxy session.
Created attachment 180364 [details] In WebLogicPlatform use getReleaseBuildVersion instead of getBuildVersion In case no patch was applied to WLS both getBuildVersion and getReleaseBuildVersion return the same output that looks like: WebLogic Server 10.3.3.0 Fri Apr 9 00:05:28 PDT 2010 1321401 If the patch has been applied then getReleaseBuildVersion still returns the same as without patch, but getBuildVersion returns only patch info, like: WebLogic Server Temporary Patch for 10063883, 10173996 Tue Oct 05 11:53:05 PDT 2010 Switched form using getBuildVersion to getReleaseBuildVersion to always get the release version and therefore be able to compare versions correctly (see prev. postings).
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink