Problem accessing the login page

Hi guys,

I got this problem when trying to access a builded WAR with the buildWar task from my Apache Tomcat 8.5 Server :


java.lang.IllegalArgumentException: Service myapp-core/cuba_LoginService is not registered in LocalServiceDirectory

Some details :

  1. My App is connected to a local LDAP Server so I use some configuration in my local.app.properties file here’s an example :

cuba.web.externalAuthentication = true
cuba.web.ldap.urls = ldap://localhost:4444
cuba.web.ldap.base = dc=ITGR,dc=INTRA
cuba.web.ldap.user = cn=pikachu,cn=Users,dc=myDC
cuba.web.ldap.password = mypassword
cuba.web.ldap.userLoginField=samaccountname
  1. My App is connected to an Oracle Database 10g and I’m using the jdbc driver from oracle.
  2. I tried both SingleWar and Multiple wars and I’m having the same issue.

FUN FACTS

  1. When running my app throught CUBA Studio I dont get this error and everything is working fine.
  2. When trying to disable the externalAuthentication I get the same error.

The log file is attached.

Thanks in advance.

log.log (45.5K)

Hi,

I have tried to reproduce the issue by the description, but in my environment, everything works well.

Does the problem still occur? If yes, could you provide some details:
Which version of the platform do you use? Have you migrated the project from some of the previous versions?
Do you use the same database for the launched by Studio application and deployed to Tomcat one?

Could you also share the whole log one more time? As the file was lost during the forum maintenance.

Sure thing,

  • I still got the same error.
  • I’m using the 6.5.0 Version
  • It’s a brand new project from scratch
  • Using the same Oracle Database except that i’m delpoying the WAR version of the project.
  • Using the same Tomcat Version in the Studio and in the Deployement WARs version.

Here is the log file one more time.

Odd thing, I cant figure out a way to edit the topic, is this a normal thing with the new forum ?

Thanks a lot !!

app.log (45.5K)

Hi,
In my environment, everything still works well. With the Oracle DB - too.
Try to deploy the WAR to a brand-new tomcat. Maybe, this could help.
Or clean the tomcat before deployment: remove work, app_home folders, and app, app-core from the webapps directory.

One more assumption. In your log, we have found that cuba.dbmsType is set to HSQLDB. But you have said that you use Oracle.
DBMS type and context.xml should correspond to each other. Also before building the WAR, DB-scripts for the runtime DBMS should be generated.
So it is recommended to use the same DBMS type in both: development- and runtime.
It seems the issue is there as you wrote that the application works well when launched from Studio.
Read the documentation if you did not see it before: https://doc.cuba-platform.com/manual-6.5/tomcat_war_deployment.html

Regards.

Thanks for your help, I guess the HSQLDB configuration was helding me back. I restarted the project all over again and this time it worked, just took me 6 days to rebuild that stuff.

Anyway if it was the real problem here I think the error message could be improved a little bit. As I got no HSQLDB on any of my environnements I dont know why there was no error in the logs related to a potential connection issue with the database.

You can now close this thread.

Thank you again for the investigation on your end, really appreciated.