Hi, when first starting cuba application I am getting an error:
18:52:36.213 INFO c.h.cuba.core.sys.MetadataImpl - Metadata initialized in 391ms
18:52:37.517 ERROR c.h.c.c.s.AbstractWebAppContextLoader - Error initializing application
java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
Exception Description: Syntax error parsing [select u from sec$User u where u.loginLowerCase = ?1 and (u.active = true or u.active is null)].
[31, 93] The expression is not a valid conditional expression.
[93, 94] The query contains a malformed ending.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1620)
at com.haulmont.cuba.core.sys.QueryImpl.getQuery(QueryImpl.java:120)
at com.haulmont.cuba.core.sys.QueryImpl.getResultList(QueryImpl.java:312)
at com.haulmont.cuba.security.app.LoginWorkerBean.loadUser(LoginWorkerBean.java:100)
at com.haulmont.cuba.security.app.LoginWorkerBean.loginAnonymous(LoginWorkerBean.java:215)
at com.haulmont.cuba.security.app.LoginWorkerBean.initializeAnonymousSession(LoginWorkerBean.java:502)
at com.haulmont.cuba.security.app.LoginWorkerBean.applicationStarted(LoginWorkerBean.java:519)
at com.haulmont.cuba.core.sys.AppContext.startContext(AppContext.java:234)
I don’t understand why.
I’m waiting for your help. Thanks in advance.
This is a very strange exception, never seen this before. Looks like it was raised when the application were shutting down for some reason. Could you explain what you have done, all the steps?
I am new on the cuba platfrom. I dowloaded it and setup. I read the documantation and open the sample project. I tried both of them windows 10 and xubuntu 16.04.
You have attached the log file saying that you run Workshop app on MySQL DB:
2017-08-26 18:41:09.228 INFO [localhost-startStop-1] com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Loading app properties from classpath:com/company/workshop/web-app.properties
2017-08-26 18:41:22.370 INFO [localhost-startStop-1] com.haulmont.cuba.core.sys.AppContextLoader - DbmsType of the main database is set to mysql
But the screenshot is about Sales sample on HSQLDB.
Please download the Samples example again and run it, then attach app.log in case of problems.
We have no idea what can be the reason. Please zip all content of your /home/xubuntu1/studio-projects/sample-sales folder, share it on a file hosting and attach a link here. So we need the deployed app (deploy/tomcat) in the archive.
Also, what is your Java version? Please execute in the terminal:
My operation system language was Turkish. I created a new virtual machine with English language. After that in this operation system there is no error on the cuba application start.
As was expected, your application works fine on my machine. I don’t think the problem is related to the system language, rather to something different in your environment. Or, if you switch to Turkish locale in your VM the app stops working?