Unexpected error Please contact system administrator

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.

app.log (16.2K)

Hi,

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?

Hi,

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.

cuba-sample-config

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.

I am sorry it is my fault. I attach the sales sample log.

app.log (6.5K)

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:

echo $JAVA_HOME

$JAVA_HOME/bin/java -version

Here is the my sample project link: [url=https://yadi.sk/d/Ej_PHlWR3MTjE2]sample-sales.zip — Яндекс.Диск

java-version

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?

Also, what is the output of the below commands?

echo $JAVA_HOME

$JAVA_HOME/bin/java -version

After I changed the system language on windows works fine.

And command output:


xubuntu1@xubuntu1-VirtualBox:~$ $JAVA_HOME/bin/java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
xubuntu1@xubuntu1-VirtualBox:~$ 

Thank you. Could you clarify - does it work on the machine with Turkish language?

Hi,
We reproduced the error, see YouTrack issue https://youtrack.cuba-platform.com/issue/PL-9785.

Thanks,
Subbotin Andrey

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/PL-9785