Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Shared Variables Error(Scout 11 shared Variables Error)
Shared Variables Error [message #1844940] Thu, 30 September 2021 10:48 Go to next message
Luis Nothvogel is currently offline Luis NothvogelFriend
Messages: 56
Registered: October 2019
Hi all

We have 2 things that we need to share with the Client and Server. I did that with Shared Variables.

But the problem now is they wont load on the ClientSession anymore and therefore it fails when i want to log in.

This is the ClientSession Code
  protected void execLoadSession() {
    // initialize variables from server session to prevent crash while loading client session(this
    // is needed bc theres more than 1 shared variable in context)
    // pre-load all known code types
    CODES.getAllCodeTypes("SHARED PACKAGE");
    // The locale needs to be set before the Desktop is created.
    String localeString =
   ClientUIPreferences.getClientPreferences(get()).get(PREF_USER_LOCALE, null);
    if (localeString != null) {
    }"created a new Client session for {}", getUserId());"CLIENT EMPLOYEE ID IS {}", getSessionUser());"CLIENT EMPLOYEE ROLES ARE {}", getEmployeeSessionRoles());

    ISettingsPageService service = BEANS.get(ISettingsPageService.class);
    Boolean dense = service.getViewSetting(getSessionUser().getEmployeeId());
    // false == light
    Boolean view = service.getThemeSetting(getSessionUser().getEmployeeId());
    setDesktop(getDesktopForUserRoles(dense, view));


The LOGS of the Clientsession all say the shared Variables are null. Therefore my service fail too :/

This the Serversession Code
	protected void execLoadSession() {
    UserPojo user = loadEmployeeSessionId(getUserId());
    List<Roles> employeeRoles = loadEmployeeRoles(user.getEmployeeId());
    setEmployeeSessionRoles(employeeRoles);"USER IS: " + user);"created a new server session for {}", getUserId());"SERVER EMPLOYEE ID IS {}", getSessionUser().getEmployeeId());"SERVER EMPLOYEE ROLES ARE {}", getEmployeeSessionRoles());

Did something change in Scout 11? This worked before. Does anyone know a fix?

Thanks in advance :)
Re: Shared Variables Error [message #1844941 is a reply to message #1844940] Thu, 30 September 2021 11:05 Go to previous message
Luis Nothvogel is currently offline Luis NothvogelFriend
Messages: 56
Registered: October 2019
Ok it seems i found a workaround. The problem seems to be the
, cause that doesnt work. I fixed it with creating my own service that does nothing.
  public void clientSessionSharedVariablesInit(String s) {

Then the shared Variables get initialized.

Maybe this is a Scout bug?

[Updated on: Thu, 30 September 2021 11:18]

Report message to a moderator

Previous Topic:It is possible to implement an offline client Session with Scout
Next Topic:SonarQube Settings for Scout
Goto Forum:

Current Time: Mon Mar 04 09:37:07 GMT 2024

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

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

Back to the top