Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jakarta EE 9 support in Yoko ORB #17742

Closed
tkburroughs opened this issue Jul 1, 2021 · 4 comments · Fixed by #18290
Closed

Jakarta EE 9 support in Yoko ORB #17742

tkburroughs opened this issue Jul 1, 2021 · 4 comments · Fixed by #18290
Assignees
Labels
Epic Used to track Feature Epics that are following the UFO process in:EJB Container in:Transport jakartaEE9 story

Comments

@tkburroughs
Copy link
Member

The Yoko ORB does have some Java EE specific code which must be transformed or updated to properly support the new jakarta namespace for Jakarta EE 9. Specifically, the class org.apache.yoko.rmi.impl.UtilImpl makes use of the following Java EE specific classes:

"javax.transaction.UserTransaction"
"javax.transaction.TransactionRequiredException"
"javax.transaction.TransactionRolledbackException"
"javax.transaction.InvalidTransactionException"

There may be other instances of Java EE classes; additional investigation may be required.

The above use of Java EE specific classes results in the following failure in testing of Remote EJB interfaces in the following FAT :

project: com.ibm.ws.ejbcontainer.remote_fat
test : RemoteTests

To run, remove use of :
@SkipForRepeat(SkipForRepeat.EE9_FEATURES)

Following is the error that occurs:

[7/1/21, 10:26:28:763 CDT] 0000007a SystemErr R java.rmi.RemoteException: CORBA TRANSACTION_ROLLEDBACK 0 No; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK: jakarta.transaction.TransactionRolledbackException: ; nested exception is:
com.ibm.ws.ejbcontainer.remote.fat.basic.TestRollbackException: vmcid: 0x0 minor code: 0x0 completed: No
at org.apache.yoko.rmi.impl.UtilImpl.createRemoteException(UtilImpl.java:199)
at org.apache.yoko.rmi.impl.UtilImpl.createRemoteException(UtilImpl.java:181)
at org.apache.yoko.rmi.impl.UtilImpl.mapSystemException(UtilImpl.java:165)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:91)
at com.ibm.ws.ejbcontainer.remote.fat.basic._BusinessRMI_Stub.testTransactionException(_BusinessRMI_Stub.java:1)
at com.ibm.ws.ejbcontainer.remote.fat.basic.BasicRemoteTestServlet.testBusinessRMITransactionException(BasicRemoteTestServlet.java:224)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at componenttest.app.FATServlet.doGet(FATServlet.java:71)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:500)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:587)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1258)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:746)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1227)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1011)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:75)
at com.ibm.ws.webcontainer40.servlet.CacheServletWrapper40.handleRequest(CacheServletWrapper40.java:85)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:938)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:279)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:1159)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:428)
at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:387)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:566)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:500)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:360)
at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:327)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:167)
at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:75)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:504)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:574)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:958)
at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1047)
at com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:238)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Suppressed: java.lang.ClassNotFoundException: javax.transaction.TransactionRolledbackException
at org.apache.yoko.rmi.impl.UtilImpl.loadClass0(UtilImpl.java:614)
at org.apache.yoko.rmi.impl.UtilImpl.loadClass(UtilImpl.java:545)
at com.ibm.ws.transport.iiop.internal.WSUtilImpl.loadClass(WSUtilImpl.java:34)
at javax.rmi.CORBA.Util.loadClass(Util.java:81)
at org.apache.yoko.rmi.impl.UtilImpl.createRemoteException(UtilImpl.java:195)
... 38 more
Caused by: org.omg.CORBA.TRANSACTION_ROLLEDBACK: jakarta.transaction.TransactionRolledbackException: ; nested exception is:
com.ibm.ws.ejbcontainer.remote.fat.basic.TestRollbackException: vmcid: 0x0 minor code: 0x0 completed: No
at com.ibm.ws.ejbcontainer.remote.fat.basic.RollbackBean.beforeCompletion(RollbackBean.java:23)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.ibm.ejs.container.CMStatefulBeanO.invokeSessionSynchMethod(CMStatefulBeanO.java:539)
at com.ibm.ejs.container.CMStatefulBeanO.beforeCompletion(CMStatefulBeanO.java:434)
at com.ibm.ejs.container.ContainerTx.beforeCompletion(ContainerTx.java:506)
at com.ibm.tx.jta.impl.RegisteredSyncs.coreDistributeBefore(RegisteredSyncs.java:238)
at com.ibm.tx.jta.impl.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:146)
at com.ibm.tx.jta.impl.TransactionImpl.prePrepare(TransactionImpl.java:1405)
at com.ibm.tx.jta.impl.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:796)
at com.ibm.tx.jta.impl.TransactionImpl.processCommit(TransactionImpl.java:771)
at com.ibm.tx.jta.impl.TransactionImpl.commit(TransactionImpl.java:714)
at com.ibm.tx.jta.impl.TranManagerImpl.commit(TranManagerImpl.java:153)
at com.ibm.tx.jta.impl.TranManagerSet.commit(TranManagerSet.java:110)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:864)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:186)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:481)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3686)
at com.ibm.ws.ejbcontainer.remote.fat.basic.EJSRemote0SLBusinessRemoteStatelessBean_ee9ebe7c.testTransactionException(EJSRemote0SLBusinessRemoteStatelessBean_ee9ebe7c.java)
at com.ibm.ws.ejbcontainer.remote.fat.basic._EJSRemote0SLBusinessRemoteStatelessBean_ee9ebe7c_Tie.testTransactionException(_EJSRemote0SLBusinessRemoteStatelessBean_ee9ebe7c_Tie.java:1)
at com.ibm.ws.ejbcontainer.remote.fat.basic._EJSRemote0SLBusinessRemoteStatelessBean_ee9ebe7c_Tie._invoke(_EJSRemote0SLBusinessRemoteStatelessBean_ee9ebe7c_Tie.java)
at org.apache.yoko.orb.OBPortableServer.ServantDispatcher.dispatch(ServantDispatcher.java:187)
at org.apache.yoko.orb.OBPortableServer.POA_impl._OB_dispatch(POA_impl.java:1729)
at org.apache.yoko.orb.OB.DispatchRequest_impl.invoke(DispatchRequest_impl.java:56)
at com.ibm.ws.transport.iiop.yoko.ExecutorDispatchStrategy$1.run(ExecutorDispatchStrategy.java:42)
... 4 more
Caused by: com.ibm.ws.ejbcontainer.remote.fat.basic.TestRollbackException
... 31 more

@tkburroughs
Copy link
Member Author

I updated org.apache.yoko.rmi.impl.UtilImpl in an overlay, to support both javax and jakarta and confirmed if resolved all 3 failing test variations. I found no other obvious cases in the yoko code base that would require changes. I'll attach the changes I made here... they (or something similar) could either be delivered back to yoko or as an overlay in open liberty.

@tkburroughs
Copy link
Member Author

src.zip

@tkburroughs
Copy link
Member Author

@joe-chacko Created a PR in OpenLiberty/yoko repository here : OpenLiberty/yoko#48

@ngmr ngmr self-assigned this Jul 14, 2021
@tkburroughs
Copy link
Member Author

There are now 6 test methods in 4 test classes that have a skip due to this problem:

BasicRemoteTestServlet.java - com.ibm.ws.ejbcontainer.remote_fat/test-applications/BasicRemote.war/src/com/ibm/ws/ejbcontainer/remote/fat/basic
PassivationRegressionServlet.java - com.ibm.ws.ejbcontainer.legacy_fat/test-applications/StatefulPassivationWeb.war/src/com/ibm/ejb2x/base/pitt/web (3 matches)
TxAttrComp2Servlet.java - com.ibm.ws.ejbcontainer.remote_fat/test-applications/StatelessAnnWeb.war/src/com/ibm/ws/ejbcontainer/remote/ejb3session/sl/ann/web
TxAttrCompView2Servlet.java - com.ibm.ws.ejbcontainer.remote_fat/test-applications/StatelessAnnWeb.war/src/com/ibm/ws/ejbcontainer/remote/ejb3session/sl/ann/web

Search for the following:

// TODO: Remove Skip when #17742 is fixed

@jhanders34 jhanders34 added the Epic Used to track Feature Epics that are following the UFO process label Aug 18, 2021
@joe-chacko joe-chacko self-assigned this Aug 23, 2021
joe-chacko added a commit to joe-chacko/open-liberty that referenced this issue Aug 25, 2021
joe-chacko added a commit that referenced this issue Aug 25, 2021
…in-yoko

Issue #17742 update yoko to add jakarta ee 9 support
tkburroughs added a commit to tkburroughs/open-liberty that referenced this issue Aug 26, 2021
Now that the Yoko ORB supports Jakarta packaging, revert the changes
to some FAT that skipped tests for Jakarta EE 9 due to exceptions
not using the correct jakarta packages. The tests will now run
with Jakarta EE 9 features.
tkburroughs added a commit that referenced this issue Aug 27, 2021
…okoJakaratSupport

Issue #17742: Revert FAT skips after Yoko Jakarta Support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Used to track Feature Epics that are following the UFO process in:EJB Container in:Transport jakartaEE9 story
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants