Web themes JAR copied to Tomcat instead of app-web on 6.10

app.log (12.3 KB)

See attached app.log for full stack trace

I am migrating a 6.8 project to 6.10 in the latest Cuba Studio IDE and this appears to be the last hurdle - the main error is unable to login as anonymous, but the cause appears to be related to the TrustedClientService. Any help appreciated

I believe you should check the log during server starting up. It looks like some initialization issues.

Hi Greg,

I have checked all the logs but can’t see any errors during start up, infact I do see the following:

2019-04-07 09:24:59.181 DEBUG [main] com.haulmont.cuba.security.auth.AnonymousSessionHolder - Initialize anonymous session
2019-04-07 09:25:00.327 INFO  [main/app-core/server] com.haulmont.cuba.core.app.ConfigStorage - Loading DB-stored app properties cache
2019-04-07 09:25:01.452 INFO  [main/app-core/server] com.haulmont.cuba.core.sys.DefaultPermissionValuesConfig - Initializing default permission values
2019-04-07 09:25:01.616 INFO  [main/app-core/server] com.haulmont.cuba.security.auth.AuthenticationManagerBean - Logged in: 7a2598d7-4e60-76c4-3fdf-f2fb41dc26cc [anonymous]

which suggests (at least to my mind :slight_smile: ) that anonymous log in is working, and yet when I browse to the log in screen the error occurs

Hi,
You can see from logs that your “core” web app is registered as app-core.
But web client tries to find local service proxies by cuba-core prefix.

Probably your web-app.properties is missing a property like below:

# Middleware connection
cuba.connectionUrlList=http://localhost:8080/app-core
2 Likes

Hi Alex,

I’d like to make sure I’m not misunderstanding you, I have the following properties set, but do you mean I ought to change app-core to cuba-core? (I haven’t altered the properties that have been working in v6.8 fine)

# Middleware connection
cuba.connectionUrlList = http://localhost:8081/app-core

# Set to false if the middleware works on different JVM
cuba.useLocalServiceInvocation = true
cuba.webContextName = app

# Web session inactivity timeout in seconds
cuba.httpSessionExpirationTimeoutSec = 1800
cuba.web.theme = halo
cuba.web.foldersPaneEnabled=false
cuba.web.loginDialogPoweredByLinkVisible = false

cuba.availableLocales = English|en
cuba.localeSelectVisible = false
cuba.restApiUrl = http://localhost:8081/app-portal/api
cuba.webAppUrl = http://localhost:8081/app
cuba.webPort = 8081

cuba.web.loginDialogDefaultUser=<disabled>
cuba.web.loginDialogDefaultPassword=<disabled>

Hi

cuba.connectionUrlList = http://localhost:8081/app-core

This is correct.

There can be several reasons why your project’s configuration is broken and property above doesn’t work.
I would place breakpoint to com.haulmont.cuba.web.sys.remoting.LocalServiceProxy.LocalServiceInvocationHandler#invoke method

And investigate why entryName is cuba-core/cuba_TrustedClientService and not app-core/cuba_TrustedClientService as it should be.
And what services are registered in com.haulmont.cuba.core.sys.remoting.LocalServiceDirectory#invokers variable while stopped in this method.

Stepping through, I can see that “classpath:com/solutiondomain/fieldsolution/web-app.properties” is not found. I can’t find it in the deploy directory - not sure where to look for it when it is running?

I think I have resolved it now, the build.gradle file was creating two app-web Jar files:

  • app-web-X.XX.jar
  • app-web-X.XX-themes.jar

but only the themes jar was copied to the deploy directory. I don’t know why this was happening, but removing the theme tasks from the build.gradle file and removing the theme.jar file resolved the issue.

1 Like

Hello @mark.butler

Have you tried to migrate the project to version 7? Because themes are compiled into JAR only in this version.

Does your project contain custom themes?

Could you share the project or prepare a sample to investigate the issue?

Regards,
Daniil