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

Replace jdk8 OpenJ9 deprecated methods with equivalents #145

Merged
merged 1 commit into from
May 30, 2022

Conversation

pshipton
Copy link
Contributor

@pshipton pshipton commented May 30, 2022

Otherwise the test code does not compile on jdk19 where the methods are
removed.
See eclipse-openj9/openj9#15127

See the compile problems in build https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK19/68/

Tested in grinder https://openj9-jenkins.osuosl.org/view/Test/job/Grinder/833

@pshipton
Copy link
Contributor Author

@Mesbah-Alam pls take a look.

@pshipton
Copy link
Contributor Author

Note that since standard API are used, the tests are no longer OpenJ9 specific and should run on Hotspot as well.

@Mesbah-Alam
Copy link
Contributor

Thanks for these changes @pshipton !

Looks like the grinder is still reproducing the original issue, e.g. https://openj9-jenkins.osuosl.org/job/Grinder_testList_0/117/consoleFull:

12:15:17  CL2 j> 2022/05/31 02:15:16.029 Connection established!
12:15:17  CL2 stderr javax.management.AttributeNotFoundException: No such attribute: ProcessVirtualMemorySize
12:15:17  CL2 stderr 	at java.management/com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:81)
12:15:17  CL2 stderr 	at java.management/com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:206)
12:15:17  CL2 stderr 	at java.management/javax.management.StandardMBean.getAttribute(StandardMBean.java:372)
12:15:17  CL2 stderr 	at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:641)
12:15:17  CL2 stderr 	at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:679)
12:15:17  CL2 stderr 	at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1449)
12:15:17  CL2 stderr 	at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1310)
12:15:17  CL2 stderr 	at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1405)
12:15:17  CL2 stderr 	at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:639)
12:15:17  CL2 stderr 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
12:15:17  CL2 stderr 	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
12:15:17  CL2 stderr 	at java.base/java.security.AccessController.doPrivileged(AccessController.java:784)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:598)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:844)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:721)
12:15:17  CL2 stderr 	at java.base/java.security.AccessController.doPrivileged(AccessController.java:718)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:720)
12:15:17  CL2 stderr 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
12:15:17  CL2 stderr 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
12:15:17  CL2 stderr 	at java.base/java.lang.Thread.run(Thread.java:858)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:304)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:280)
12:15:17  CL2 stderr 	at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:166)
12:15:17  CL2 stderr 	at jdk.remoteref/jdk.jmx.remote.internal.rmi.PRef.invoke(Unknown Source)
12:15:17  CL2 stderr 	at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(RMIConnectionImpl_Stub.java:279)
12:15:17  CL2 stderr 	at java.management.rmi/javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:902)
12:15:17  CL2 stderr 	at net.openj9.test.extensions.OperatingSystemExtensionCommand.execute(OperatingSystemExtensionCommand.java:108)
12:15:17  CL2 stderr 	at net.openj9.test.jlm.resources.VMData.invokeIBMOSBeanTest(VMData.java:187)
12:15:17  CL2 stderr 	at net.openj9.test.jlm.resources.EnvironmentData.writeData(EnvironmentData.java:100)
12:15:17  CL2 stderr 	at net.openj9.test.jlm.remote.ClassProfiler.getStatsViaServer(ClassProfiler.java:171)
12:15:17  CL2 stderr 	at net.openj9.test.jlm.remote.ClassProfiler.main(ClassProfiler.java:99)
12:15:17  CL2 stderr Exception in thread "main" java.lang.AssertionError: Attribute does not exist on the MBean

@pshipton
Copy link
Contributor Author

That's a new problem, but related. I'll fix and re-run.

Otherwise the test code does not compile on jdk19 where the methods are
removed.
See eclipse-openj9/openj9#15127

Signed-off-by: Peter Shipton <[email protected]>
@pshipton
Copy link
Contributor Author

I just re-ran the failed tests, which are passing now.
https://openj9-jenkins.osuosl.org/view/Test/job/Grinder/841

@Mesbah-Alam
Copy link
Contributor

LGTM! (I don't have the right to approve or merge this PR).

@pshipton pshipton requested a review from keithc-ca May 30, 2022 21:23
@keithc-ca keithc-ca merged commit d2ff3b2 into adoptium:master May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants