9 KB
519 KB
114 KB
196 KB
61 KB
It seems that v17 and v18 behave exactly the same. When I tried to import the attached MySQL.zip in v17, ADServer also did not create script and connection files.
It seems that if the number of script and the number of connection files is > 1, then the import succeeds.
[SP] Confirmed. I see the same behavior in ADS v17. @raghav: pls confirm this behavior & then re-open issue
@Sachin,
Issue reproduce only in ADServer- 18.0.0 ,
In ADserver V-17.0.0 issue not reproducible
If the number of script and the number of connection files is = 1, then the connection file also import successfully in ADServer V-17.0.0 .Please Refer updated screenshot 'Updated_2979.png'
@Sachin,
Issue reproduce only in ADServer- 18.0.0 ,
In ADserver V-17.0.0 issue not reproducible
If the number of script and the number of connection files is = 1, then the connection file also import successfully in ADServer V-17.0.0 .Please Refer updated screenshot 'Updated_2979.png'
- I also can reproduce the issue in both v17 and v18.
- I have another project package that contains 2 server files and only 1 server file is imported.
- If I go to the Servers tab and choose "Import Server", the missing server file gets imported successfully.
- I trace the ADServer code and don't see any problem. ADServer calls Hibernate to "merge" the records and Hibernate doesn't create the records. There is no exception from Hibernate.
- I don't know how to turn on SQL logging in Hibernate. Instead I turn on SQL logging in the MySQL database. Then I try importing MySQL.zip. The attachment MySQL_log.xlsx are the SQL statements logged.
In the SQL log:
- There are only 2 insert statements. Both are "insert into user_files".
- "insert into aqua_scripts" should have happened after row 36 after doing the queries for "merge".
- "insert into connections" and "insert into connection_properties" should have happened after 102 after all the queries.
- I also can reproduce the issue in both v17 and v18.
- I have another project package that contains 2 server files and only 1 server file is imported.
- If I go to the Servers tab and choose "Import Server", the missing server file gets imported successfully.
- I trace the ADServer code and don't see any problem. ADServer calls Hibernate to "merge" the records and Hibernate doesn't create the records. There is no exception from Hibernate.
- I don't know how to turn on SQL logging in Hibernate. Instead I turn on SQL logging in the MySQL database. Then I try importing MySQL.zip. The attachment MySQL_log.xlsx are the SQL statements logged.
In the SQL log:
- There are only 2 insert statements. Both are "insert into user_files".
- "insert into aqua_scripts" should have happened after row 36 after doing the queries for "merge".
- "insert into connections" and "insert into connection_properties" should have happened after 102 after all the queries.
When ADServer imports a project package, it creates a parent transaction (in ProjectController#uploadProject) and inside that transaction, nested transactions (in ProjectFileParser#parser) are created for each script, connection and user file's save/update/merge/delete operation. I don't understand why scripts and connections are not persisted after the parent transaction commits, but flushing the session after each save/update/merge/delete operation inside the nested transaction seems to solve this problem.
In com.common.server.hibernate.Hibernate, I have added methods that will flush the session. Then the save/update/merge/delete operations in ScriptManager, ConnectionManager and UserFileManager are modified to always flush the session.
When ADServer imports a project package, it creates a parent transaction (in ProjectController#uploadProject) and inside that transaction, nested transactions (in ProjectFileParser#parser) are created for each script, connection and user file's save/update/merge/delete operation. I don't understand why scripts and connections are not persisted after the parent transaction commits, but flushing the session after each save/update/merge/delete operation inside the nested transaction seems to solve this problem.
In com.common.server.hibernate.Hibernate, I have added methods that will flush the session. Then the save/update/merge/delete operations in ScriptManager, ConnectionManager and UserFileManager are modified to always flush the session.
Now server file and script file is imported successfully.I have also imported multiple scripts and multiple server files.Tested it in windows and Linux both the platforms.
Verified in ADS 18.0.0-preview-19
Now server file and script file is imported successfully.I have also imported multiple scripts and multiple server files.Tested it in windows and Linux both the platforms.
Verified in ADS 18.0.0-preview-19
問題/不具合 No.2979 |
クローズ済み |
修正済み |
解決済み |
完了 |
期限なし |
修正ビルド 18.0.0-preview-19 |
推定時間なし |
It seems that v17 and v18 behave exactly the same. When I tried to import the attached MySQL.zip in v17, ADServer also did not create script and connection files.
It seems that if the number of script and the number of connection files is > 1, then the import succeeds.
[SP] Confirmed. I see the same behavior in ADS v17. @raghav: pls confirm this behavior & then re-open issue