Community
Participate
Working Groups
The server platforms and transaction controllers were no migrated correctly the eclipselink, their code was either commented out or removed. It needs to be added back, WLS - connection unwrapped removed - version commented out, throws error - server log removed WAS - unwrap connection commented out, throws error - ucp platform removed - oc4j 11 platform removed -- mbean, log, version, unwrap - oc4j 1013 platform removed -- version
I fixed the WLS version issue, so it at least runs, but unwrap and log are still missing.
*** Bug 227635 has been marked as a duplicate of this bug. ***
Created attachment 104591 [details] WLS Platform example og un-wrapping a connection Based on http://e-docs.bea.com/wls/docs100/jdbc/thirdparty.html
For WLS logging: I noticed that there is an issue with the current WlsLog wrapper of NonCatalogLogger in the original product against 10.3 - the logs are not showing for a JPA application when this wls platform is used to override the default ServerLog - this may be why the WlsLog subclass was removed.
Created attachment 105436 [details] patch
Added a fix for many of these issues and others. Adds the unwrapping support to WLS and WAS platforms. Adds support to unwrap before executing any statement requiring unwrapped results. This is because WLS needlessly wrapps everything including ResultSet and even returned values (Lobs, Structs, Refs, etc.). Changed unwrapping test connection to wrap similar to WLS to test. Add some additional unwrapping tests. Also, Fixed package renamer properties file to rename some things that were renamed since the migration (JpaEntityManager, jpa.base...).
Ignore the oxm changes in the dif, not should why SVN put those in. I removed these from the checkin.
Fixed
closing
*** Bug 227636 has been marked as a duplicate of this bug. ***
It's not working on WAS 6.1. It was obviously not code reviewed or tested. Whatever is the exact signature of getNativeConnection, it must have at least one parameter to extract something from it. TopLink 10.x does this: public Connection unwrapOracleConnection(Connection connection) { if (connection instanceof com.ibm.ws.rsadapter.jdbc.WSJdbcConnection){ return (Connection)com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.getNativeConnection((com.ibm.ws.rsadapter.jdbc.WSJdbcConnection) connection); } return connection; } EclipseLink under SVN rev 1707 does: protected Method getVendorConnectionMethod() { if ((this.vendorConnectionMethod == null) && (!getWebsphereUtilClass().equals(void.class))) { try { Class args[] = new Class[1]; args[0] = getWebsphereConnectionClass(); this.vendorConnectionMethod = PrivilegedAccessHelper.getDeclaredMethod(getWebsphereUtilClass(), "getNativeConnection", new Class[0]); } catch (NoSuchMethodException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } } Runtime error: java.lang.NoSuchMethodException: com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.getNativeConnection() at java.lang.Class.throwNoSuchMethodException(Class.java:274) at java.lang.Class.getDeclaredMethod(Class.java:586) at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getDeclaredMethod(PrivilegedAccessHelper.java:210) at org.eclipse.persistence.platform.server.was.WebSpherePlatform.getVendorConnectionMethod(WebSpherePlatform.java:120) at org.eclipse.persistence.platform.server.was.WebSpherePlatform.unwrapConnection(WebSpherePlatform.java:134)
Too be clear: EclipseLink 1.0 cannot work with WebSphere 6.0 or 6.1 and was not tested.
Another bug, unwrapConnection is coded like the method called is not a static method. The generic fix is below but it's likely that all WebSphere versions use a static method. public Connection unwrapConnection(Connection connection) { if (getWebsphereConnectionClass().isInstance(connection) && getVendorConnectionMethod() != null) { try { Method method = getVendorConnectionMethod(); if ( Modifier.isStatic(method.getModifiers()) ){ return (Connection) PrivilegedAccessHelper.invokeMethod(method, null,new Object[]{connection}); } else { return (Connection) PrivilegedAccessHelper.invokeMethod(method, connection); } } catch (IllegalAccessException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } catch (InvocationTargetException exception) { getDatabaseSession().getSessionLog().logThrowable(SessionLog.WARNING, exception); } } return super.unwrapConnection(connection); }
The eclipselink 1.0 still does not work with the Websphere 6.1 correctly. [12.08.08 10:18:00:203 MSD] 00000050 SystemOut O [EL Warning]: 2008.08.12 10:18:00.203--Thread(Thread[WebContainer : 8,5,main])--java.lang.NoSuchMethodException: com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.getNativeConnection() [12.08.08 10:18:00:250 MSD] 00000050 SystemOut O [EL Warning]: 2008.08.12 10:18:00.250--UnitOfWork(312611490)--Thread(Thread[WebContainer : 8,5,main])--java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcConnection incompatible with oracle.jdbc.OracleConnection The error is described here: http://www.nabble.com/com.ibm.ws.rsadapter.jdbc.WSJdbcConnection-incompatible-with-oracle.jdbc.OracleConnection-to18938778.html Regards Dmitry
Reopenning for WAS issue. What is the status of our WAS testing?
I am looking for the approach which will allow to use Oracle XMLDB in commercial j2ee projects. Regards Dmitry
From EclipseLink User Discussions group message sent by James Sutherland on Monday, September 08, 2008 10:20 AM, it seems that no tests running on WebSphere cover for the integration code. We need to fix that too. Ideally we should have an undertanding of the different use cases that involve integration code of any application servers, than write test for them and execute them when we run test on specific application servers. Focus on application server testing should start with the application the most used by client of EclipseLink. The most popular application servers are likely JBoss, WebSphere, and WebLogic.
Created attachment 118484 [details] WAS unwrapConnection patch Could somebody using WAS give this patch a try?
Checked the patch in. Tested by Yiping: 5 WAS tests that used to fail now pass.
Closing WAS is now tested nightly by Oracle
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink