Problems after migration to 6.9.0.BETA2

Hi Gleb
I am unable to save data having similar exception related to FTS after using v 6.9 beta2. here is the exception report.exception.txt (4.1 KB)

I’m stuck with my project, neither can go back to use 6.8 nor 6.9 beta2 is working!!! Thanks for helping out!

Duplicate key:

getting the following error while I save a new record with sequence.

  at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
 at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158) ~[vaadin-server-7.7.13.cuba.8.jar:7.7.13.cuba.8]
.. 38 common frames omitted
Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method buttonClick in com.haulmont.cuba.web.gui.components.WebButton$$Lambda$121/1332855459 failed.
 at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530) ~[vaadin-server-7.7.13.cuba.8.jar:7.7.13.cuba.8]
         at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200) ~[vaadin-server-7.7.13.cuba.8.jar:7.7.13.cuba.8]
 at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163) ~[vaadin-server-7.7.13.cuba.8.jar:7.7.13.cuba.8]
 at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1037) ~[vaadin-server-7.7.13.cuba.8.jar:7.7.13.cuba.8]
 at com.vaadin.ui.Button.fireClick(Button.java:377) ~[vaadin-server-7.7.13.cuba.8.jar:7.7.13.cuba.8]
 at com.haulmont.cuba.web.toolkit.ui.CubaButton.fireClick(CubaButton.java:54) ~[cuba-web-6.9.0.BETA2.jar:6.9.0.BETA2]
 at com.vaadin.ui.Button$1.click(Button.java:54) ~[vaadin-server-7.7.13.cuba.8.jar:7.7.13.cuba.8]
 ... 43 common frames omitted
Caused by: com.haulmont.cuba.core.global.RemoteException: ERROR: duplicate key value violates unique constraint "erp_delivery_order_pkey"
 Detail: Key (id)=(fd2d2e86-e698-62ae-6180-c4243f61edf1) already exists.

system generated auto number duplicate! strange!

Try to remove project files using Studio and remove the *.iws file manually from the project base directory.

As for the exception, could you please provide steps to reproduce the problem? As far as I understand, your project include FTS app component, but the exception is thrown when you try to commit any entity, is that right?

Hi Gleb,
I only migrated my project to 6.9BETA2 from 6.8.x and started getting this exception. I don’t know what could trigger this exception!! It is still existing even if i remove FTS from my project.

Another problem: I can’t deploy to Jelastic!

Hi i am unable to deploy after using v 6.9 BETA2. Getting following exceptions as attached. can not find driver.txt (1.4 KB)

Hi @mortozakhan ,
Is the Include JDBC driver option enabled in cloud deployment settings?
image

task jelasticBuildWar(type: CubaWarBuilding) {
    appHome = '..'
    webXmlPath = 'modules/web/web/WEB-INF/single-war-web.xml'
    appProperties = ['cuba.automaticDatabaseUpdate' : true,
'cuba.logDir' : '${catalina.base}/logs']

    includeJdbcDriver = true

    includeContextXml = true
    coreContextXmlPath = 'modules/core/web/META-INF/jelastic-context.xml'
}

Yes, that was the first thing I checked but I found checked. Here is also the Gradle:

    task jelasticBuildWar(type: CubaWarBuilding) {
appHome = '..'
webXmlPath = 'modules/web/web/WEB-INF/single-war-web.xml'
appProperties = ['cuba.automaticDatabaseUpdate' : true]
includeJdbcDriver = true
includeContextXml = true
coreContextXmlPath = 'modules/core/web/META-INF/jelastic-context.xml'

}

task jelasticDeployWar(type: CubaJelasticDeploy, dependsOn: jelasticBuildWar) {
email = rootProject.hasProperty('jelasticEmail') ? rootProject['jelasticEmail'] : ''
password = rootProject.hasProperty('jelasticPassword') ? rootProject['jelasticPassword'] : ''
hostUrl = 'app.mircloud.host'
environment = 'uatinteacc'

}

I don’t see any difference!!

Is there the postgresql driver in the lib folder?
image

Yes, I see it there.
image

Regarding the problem with Jelastic:
Is there several contexts deployed to the Cloud tomcat? Several applications in the same environment might work unstable.

To solve the problem with PK try to dropTomcat (launch gradlew droptomcat), ensure it is removed and redeploy the application. It seems some libraries were not renewed during deployment.

Removed Tomcat and re-initiated it. Now getting the following error. It seems the java class javafx.util.Pair is no longer available?

java.lang.NoClassDefFoundError javafx.util.Pair.txt (2.4 KB)

Another problem!!
I can;t run my app even locally, here is the issue:

2018-05-04 11:30:44.707 DEBUG [http-nio-8080-exec-9/myapp-core/admin] com.haulmont.cuba.core.app.RdbmsStore - loadList: metaClass=sec$UserSubstitution, view=com.haulmont.cuba.security.entity.UserSubstitution/app, query=select us from sec$UserSubstitution us where us.user.id = :userId and (us.endDate is null or us.endDate >= :currentDate) and (us.startDate is null or us.startDate <= :currentDate) and (us.substitutedUser.active = true or us.substitutedUser.active is null) order by us.substitutedUser.name 2018-05-04 11:30:44.747 DEBUG [http-nio-8080-exec-9/myapp-core/admin] com.haulmont.cuba.core.app.RdbmsStore - load: metaClass=erp$ExtUser, id=null, view=com.myapp.erp.entity.gen.ExtUser/extUserCompanyDefaultView-view 2018-05-04 11:30:44.826 WARN [http-nio-8080-exec-9/myapp/admin] com.haulmont.cuba.web.app.loginwindow.AppLoginWindow - Unable to login java.lang.NullPointerException: null

Note that I didn’t make any change in users and its authentication.

Hi
It was only one app in the environment though. However, I have created a new environment and deployed but having similar exception regarding driver not found, please see attached.
can not find driver.txt (7.8 KB)

Hi @iskandarov
The application is always working locally and the problem arisen when I deploy the 6.9 BETA2 version of my application to exiting app hosted in Jelastic cloud. I did a kind a research and here is the findings:

  1. After I have removed FTS and compiled that FTS related issue is gone. It is still ok even I have used FTS back again.
  2. Again like FTS, I removed the JDBC driver unchecked mark then compiled. Later checked it back and compiled, this issue is no more seen.
  3. Now the issue is still with the database and here is details:

a) if I deploy my application to a newly created environment with new database, it works.
b) If I deploy after restoring the existing database to the cloud, I get error message coming due to sys_server already exists sys_server already exists.txt (4.4 KB)
. If I remove it from restored database then I get the same error for sys_config and so on. After I have removed all the entities starting with sys_ then i get error that file sys_server is not found. It seems that 6.9BETA2 has breaking changes somehow in migration of database. could you please investigate, I am stuck with my production application enhancement due to this problem!!
Thanks for your help.
Mortoza

Hi @gorelov, @iskandarov
Any update on this issue?

Hi,
Is there SYS_DB_CHANGELOG and SEC_USER tables in the database after restore?
Which records (rows) has the SYS_DB_CHANGELOG? During automatic DB update, only those scripts are executed which have not been registered in SYS_DB_CHANGELOG.

It seems the SYS* tables exist in your DB but there are no corresponding records in SYS_DB_CHANGELOG…

Hi @iskandarov
Both SYS_DB_CHANGELOG and SEC_USER tables are existing in the database after restore. Table SYS_DB_CHANGELOG contains lot of records, up to the date it was updated last, see below:
image

It seems, something is wrong there. As my sys_db_changelog contains less records(174)
image

Click Browse and see its contents. The records should be like xxxxx/update/postgres/01/01-360-CategoryAttrScreen.sql. The first node in the path is ignored when update scripts are searched the sys_db_changelog during automatic DB update.
image

Could you share the table data? There is the “Export” button in PHP PG admin.
I think it will help to determine the problem.