Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] NPE in SecurityManager$PermissionManager which leads to TimeoutRuntimeException on next commit
[CDO] NPE in SecurityManager$PermissionManager which leads to TimeoutRuntimeException on next commit [message #1840693] Thu, 22 April 2021 07:27 Go to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 146
Registered: July 2015
Senior Member
Hi all,

in our application, we are using CDO release R20210308-1312. In our integration-tests, we see the exception below quite often.
But before, please have a look at our SecurityManager initialization (which may be somehow wrong - I see a discouraged access warning):

        InternalSecurityManager securityMngr = new SecurityManager("/security", IPluginContainer.INSTANCE);
        securityMngr.addCommitHandler((CommitHandler) container.getElement("org.eclipse.emf.cdo.server.security.commitHandlers", "annotation", null));
        securityMngr.setRepository((InternalRepository) repository);
        LifecycleUtil.activate(securityMngr);



org.eclipse.net4j.signal.RemoteException: java.lang.NullPointerException
	at org.eclipse.net4j.signal.RequestWithConfirmation.getRemoteException(RequestWithConfirmation.java:142)
	at org.eclipse.net4j.signal.RequestWithConfirmation.setRemoteException(RequestWithConfirmation.java:131)
	at org.eclipse.net4j.signal.SignalProtocol.handleRemoteException(SignalProtocol.java:562)
	at org.eclipse.net4j.signal.RemoteExceptionIndication.indicating(RemoteExceptionIndication.java:62)
	at org.eclipse.net4j.signal.Indication.doExtendedInput(Indication.java:57)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:391)
	at org.eclipse.net4j.signal.Indication.execute(Indication.java:51)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:297)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:169)
	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)
Caused by: java.lang.NullPointerException
	at org.eclipse.emf.cdo.server.internal.security.SecurityManager$PermissionManager.getPermission(SecurityManager.java:1287)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadPermissionsIndication.responding(LoadPermissionsIndication.java:81)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndication.responding(CDOServerIndication.java:162)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOutput(IndicationWithResponse.java:106)
	at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:360)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:75)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerReadIndication.execute(CDOServerReadIndication.java:36)
	... 5 more


The actual problem for us is, that the next commit seems to be affected by this. It takes a long time and ends with a TimeoutRuntimeException:
org.eclipse.net4j.util.concurrent.TimeoutRuntimeException: Did not receive an update: Transaction 1502
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.waitForCommitInfo(CDOTransactionImpl.java:1639)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1628)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1591)
        <we commit here>


Re: [CDO] NPE in SecurityManager$PermissionManager which leads to TimeoutRuntimeException on next co [message #1840698 is a reply to message #1840693] Thu, 22 April 2021 08:19 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
You can avoid the "discouraged access" warnings with this code:

    ISecurityManager securityManager = (ISecurityManager)IPluginContainer.INSTANCE.getElement( //
        "org.eclipse.emf.cdo.server.security.managers", // Product group.
        "default", // Factory type.
        "repo1:/security:annotation"); // Repo name : realm path : commit handler(s).


The NPE results from a small bug in LoadPermissionsIndication.responding(), which I've fixed via https://bugs.eclipse.org/bugs/show_bug.cgi?id=573074 .

Please let me know if that also fixes your TimeoutRuntimeException...


Re: [CDO] NPE in SecurityManager$PermissionManager which leads to TimeoutRuntimeException on next co [message #1840705 is a reply to message #1840698] Thu, 22 April 2021 09:28 Go to previous messageGo to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 146
Registered: July 2015
Senior Member
Thanks a lot!
Do you still perform weekly builds on fridays? Then its easier for me to test this.
Re: [CDO] NPE in SecurityManager$PermissionManager which leads to TimeoutRuntimeException on next co [message #1840719 is a reply to message #1840705] Thu, 22 April 2021 11:46 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Unfortunately the builds all stopped working due to Eclipse Foundation server changes. I need to work on this next...

Re: [CDO] NPE in SecurityManager$PermissionManager which leads to TimeoutRuntimeException on next co [message #1840753 is a reply to message #1840719] Fri, 23 April 2021 11:13 Go to previous messageGo to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 146
Registered: July 2015
Senior Member
It's working without any problems now :). The fix also gets rid of our TimeoutRuntimeException. Thanks again!
Re: [CDO] NPE in SecurityManager$PermissionManager which leads to TimeoutRuntimeException on next co [message #1840794 is a reply to message #1840753] Fri, 23 April 2021 18:42 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
There's a new I-build now: http://download.eclipse.org/modeling/emf/cdo/drops/I20210423-0442


Previous Topic:create a model instance from a metamodel in EMF
Next Topic:Ecore EDouble toString returns "Set{1.0}" instead of "1.0"
Goto Forum:
  


Current Time: Sun Sep 22 04:23:19 GMT 2024

Powered by FUDForum. Page generated in 0.04134 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top