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
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:
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>
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.