Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Assertion error: No userId available(Error)
Assertion error: No userId available [message #1858496] Wed, 05 April 2023 07:14 Go to next message
Ahmed Attya is currently offline Ahmed AttyaFriend
Messages: 4
Registered: April 2023
Junior Member
I am trying the one day tutorial of scout but whenever i try to launch the server and open the link it only opens once or twice then after that it keeps giving me initialization error on the page with this error message


2023-04-05 09:07:16,549 WARN [qtp538185145-26] org.eclipse.scout.rt.server.commons.authentication.DevelopmentAccessController.handle(DevelopmentAccessController.java:65) - +++ Development access control with user AhmedAttya
2023-04-05 09:07:17,468 INFO [qtp538185145-25] org.eclipse.scout.rt.ui.html.UiThemeHelper.getConfiguredTheme(UiThemeHelper.java:58) - UI theme configured in config.properties: default - MDC[cid=9bd600e6-c408-4bb9-9ffc-0284d9380c81]
2023-04-05 09:07:17,826 WARN [scout-thread-3] org.eclipse.scout.rt.platform.job.internal.CallableChainExceptionHandler.intercept(CallableChainExceptionHandler.java:61) - Exception in callable chain.
org.eclipse.scout.rt.platform.util.Assertions$AssertionException: Assertion error: No userId available [user=AhmedAttya]
at org.eclipse.scout.rt.platform.util.Assertions.fail(Assertions.java:620)
at org.eclipse.scout.rt.platform.util.Assertions.assertNotNull(Assertions.java:86)
at org.eclipse.scout.rt.client.clientnotification.ClientSessionRegistry.checkSession(ClientSessionRegistry.java:91)
at org.eclipse.scout.rt.client.clientnotification.ClientSessionRegistry.sessionStarted(ClientSessionRegistry.java:84)
at org.eclipse.scout.rt.client.clientnotification.ClientSessionRegistry.sessionChanged(ClientSessionRegistry.java:209)
at org.eclipse.scout.rt.client.AbstractClientSession.handleSessionEvent(AbstractClientSession.java:545)
at org.eclipse.scout.rt.client.AbstractClientSession.lambda$4(AbstractClientSession.java:540)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.eclipse.scout.rt.client.AbstractClientSession.fireSessionChangedEvent(AbstractClientSession.java:540)
at org.eclipse.scout.rt.client.AbstractClientSession.start(AbstractClientSession.java:292)
at org.eclipse.scout.rt.client.session.ClientSessionProvider.lambda$1(ClientSessionProvider.java:73)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:226)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:226)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxMandatory(TransactionProcessor.java:155)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.runTxRequired(TransactionProcessor.java:138)
at org.eclipse.scout.rt.platform.transaction.TransactionProcessor.intercept(TransactionProcessor.java:77)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:221)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:169)
at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:157)
at org.eclipse.scout.rt.platform.context.RunContextRunner.intercept(RunContextRunner.java:37)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:221)
at org.eclipse.scout.rt.platform.job.internal.CallableChainExceptionHandler.intercept(CallableChainExceptionHandler.java:32)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:221)
at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:169)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.lambda$0(JobFutureTask.java:105)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.run(JobFutureTask.java:174)
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:829)
at org.eclipse.scout.rt.platform.job.internal.NamedThreadFactory$1.run(NamedThreadFactory.java:62)
Re: Assertion error: No userId available [message #1858497 is a reply to message #1858496] Wed, 05 April 2023 07:28 Go to previous messageGo to next message
Matthias OtterbachFriend
Messages: 58
Registered: August 2015
Location: Munich
Member
Having a look at the method org.eclipse.scout.rt.client.clientnotification.ClientSessionRegistry.sessionStarted(ClientSessionRegistry.java:84):

  public void sessionStarted(final IClientSession session) {
    ensureUserIdAvailable(session);
    checkSession(session);


before checkSession is called (which throws the exception from your post) previously ensureUserIdAvailable(session); is called which basically just does a simple server call

BEANS.get(IPingService.class).ping("ensure shared context is loaded...");


to ensure initialization of the server session (which should also bring the userId to your client session).

Apparently this method does not set a userId on your client session; do you have any output on your backend server e.g. errors in the log?

On the server-side a userId should be assigned in org.eclipse.scout.rt.server.AbstractServerSession.start(String) which calls org.eclipse.scout.rt.server.AbstractServerSession.assignUserId(). Maybe no userId was assigned there? Do you have any log output here or maybe you could add a breakpoint there?
Re: Assertion error: No userId available [message #1858498 is a reply to message #1858497] Wed, 05 April 2023 08:08 Go to previous messageGo to next message
Ahmed Attya is currently offline Ahmed AttyaFriend
Messages: 4
Registered: April 2023
Junior Member
the weird thing is the server init worked fine when i made the tutorial project 3 times but when i reach the db integration part they all break down and give me this same error
Re: Assertion error: No userId available [message #1858499 is a reply to message #1858497] Wed, 05 April 2023 08:14 Go to previous messageGo to next message
Ahmed Attya is currently offline Ahmed AttyaFriend
Messages: 4
Registered: April 2023
Junior Member
there is no log on assignUserId() and breakpoints don't break there

[Updated on: Wed, 05 April 2023 08:24]

Report message to a moderator

Re: Assertion error: No userId available [message #1858506 is a reply to message #1858499] Wed, 05 April 2023 12:03 Go to previous message
Ahmed Attya is currently offline Ahmed AttyaFriend
Messages: 4
Registered: April 2023
Junior Member
well I solved it by downgrading to version 22.0.0
Previous Topic:Select contents on start edit of input field
Next Topic:Build Failing at Ant Step for UI
Goto Forum:
  


Current Time: Tue Dec 03 18:26:03 GMT 2024

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

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

Back to the top