Failed to load the widgetset #2585

My app works in my computer but stopped working in the cloud (Jelastic), having exception as attached from catalina.out
When I run it, the loading screen shows and ends up with the following error:


Failed to load the widgetset: ./VAADIN/widgetsets/com.myapp.web.toolkit.ui.AppWidgetSet/com.myapp.web.toolkit.ui.AppWidgetSet.nocache.js?1504613978656

Catalina log shows the driver is unregistered to prevent a memory leak!! but what is causing this!


05-Sep-2017 12:13:48.514 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.

cataline out.rtf (97.8K)

Hi,
The first thing to mention is the root package “com.myapp” without the company name. It is recommended to follow common rules of package naming.
Using Jelastic administrative panel, check whether the widgetset files are deployed to Cloud (see the screenshot).
If the files are missed in cloud check the generated WAR. Widgetset should be also there (myappSystems.war\VAADIN\widgetsets\com.myapp.web.toolkit.ui.AppWidgetSet</i>)
public://attachments/ddbcb6be6eb8599f028f95e7d5908a33.jpg

ddbcb6be6eb8599f028f95e7d5908a33

Hi Rostislav
The root package has company name but missed it when sharing.
I have checked in Jelastic Administrative panel and found all those files here… .web.toolkit.ui.AppWidgetSet…
The size of the size are also the same to your screen-shot.

Please advise what should I check then!

Could you describe the project?
Has it custom UI components?
Custom application components?
We would appreciate any additional info.
Try to build and start uberJAR.
Also try to deploy the generated for Jelastic WAR (appears in the build/distributions/war directory) to another Tomcat server (or a brand new Jelastic environment).

Hi Rostislav
There is no custom UI or application components used in this project.

I already have tried earlier with a new environment but the outcome is the same!

I uploaded manually and the result is the same…


No webpage was found for the web address: http://myapp.mircloud.host/
HTTP ERROR 404

Thanks for your help for the next steps!

Hi
I have deployed in a new environment and now getting the following error that seems there is a problem in database update

&#91;ch.qos.logback.core.ConsoleAppender&#93; 12:31:21,346 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as &#91;Console&#93; 12:31:21,357 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type &#91;ch.qos.logback.classic.encoder.PatternLayoutEncoder&#93; for &#91;encoder&#93; property 12:31:21,404 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named &#91;Console&#93; to Logger&#91;ROOT&#93; 12:31:21,406 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;com.haulmont.cuba&#93; to DEBUG 12:31:21,406 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;com.haulmont.cuba.core.sys&#93; to INFO 12:31:21,406 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;com.haulmont.cuba.core.sys.CubaDefaultListableBeanFactory&#93; to WARN 12:31:21,406 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;com.haulmont.cuba.core.app.scheduling&#93; to INFO 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;com.haulmont.cuba.web.sys&#93; to INFO 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;com.haulmont.cuba.portal&#93; to INFO 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;com.haulmont.cuba.core.app.LockManager&#93; to INFO 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;eclipselink&#93; to WARN 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;eclipselink.sql&#93; to INFO 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.springframework&#93; to WARN 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.activiti&#93; to INFO 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;freemarker&#93; to INFO 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.thymeleaf.TemplateEngine&#93; to INFO 12:31:21,407 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.docx4j&#93; to WARN 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.xlsx4j&#93; to WARN 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.hibernate&#93; to WARN 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;sun&#93; to INFO 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;com.sun&#93; to INFO 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;javax&#93; to INFO 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.apache&#93; to INFO 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.eclipse.jetty&#93; to INFO 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.atmosphere&#93; to INFO 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.docx4j.utils.ResourceUtils&#93; to ERROR 12:31:21,408 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.docx4j.Docx4jProperties&#93; to ERROR 12:31:21,409 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91; org.xlsx4j.jaxb.Context&#93; to ERROR 12:31:21,409 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;org.perf4j.TimingLogger&#93; to OFF 12:31:21,409 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger &#91;com.haulmont.cuba.gui.logging.UIPerformanceLogger&#93; to OFF 12:31:21,409 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 12:31:21,410 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@336e891a - Registering current configuration as safe fallback point 12:31:21,223 |-INFO in ch.qos.logback.classic.servlet.LogbackServletContainerInitializer@7a36d109 - Adding an instance of class ch.qos.logback.classic.servlet.LogbackServletContextListener to the current web-app Sep 13, 2017 12:31:21 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing AtmosphereFramework 2017-09-13 12:31:21.630 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.AppComponents - Using app components: &#91;com.haulmont.cuba, com.haulmont.reports, com.haulmont.fts, com.haulmont.charts&#93; 2017-09-13 12:31:21.670 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Loading app properties from classpath:com/company /erp/app.properties 2017-09-13 12:31:21.671 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Loading app properties from /WEB-INF/local.app.properties 2017-09-13 12:31:21.767 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.AppContextLoader - DbmsType of the main database is set to postgres 2017-09-13 12:31:22.581 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.persistence.MappingFileCreator - Creating file /opt/tomcat/myapp-core/work/orm.xml 2017-09-13 12:31:22.596 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.persistence.PersistenceConfigProcessor - Creating file /opt/tomcat/myapp-core/work/persistence.xml 2017-09-13 12:31:22.650 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.singleapp.SingleAppCoreContextLoader$1 - Refreshing com.haulmont.cuba.core.sys.singleapp.SingleAppCoreContextLoader$1@7b23e441: startup date &#91;Wed Sep 13 12:31:22 UTC 2017&#93;; root of context hierarchy 2017-09-13 12:31:34.619 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.CubaThreadPoolTaskScheduler - Initializing ExecutorService 'scheduler' 2017-09-13 12:31:36.880 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.jmx.MBeanExporter - Registering beans for JMX exposure: &#91;myapp-core.cuba:type=PersistenceManager, myapp-core.cuba:type=ConfigStorage, myapp-core.cuba:type=UserSessions, myapp-core.cuba:type=UniqueNumbers, myapp-core.cuba:type=Emailer, myapp-core.cuba:type=EntityLog, myapp-core.cuba:type=FileStorage, myapp-core.cuba:type=LockManager, myapp-core.cuba:type=CachingFacade, myapp-core.cuba:type=ClusterManager, myapp-core.cuba:type=ScriptingManager, myapp-core.cuba:type=ServerInfo, myapp-core.cuba:type=Scheduling, myapp-core.cuba:type=ObjectsCacheManager, myapp-core.cuba:type=PasswordEncryptionSupport, myapp-core.cuba:type=JmxNodeIdentifier, myapp-core.cuba:type=JmxLogControl, my-app-core.cuba:type=ClassLoaderManager, myapp-core.cuba:type=StatisticsCounter, myapp-core.cuba:type=BruteForceProtection, myapp-core.cuba:type=QueryCacheSupport, myapp-core.cuba:type=IdpSessions&#93; 2017-09-13 12:31:37.312 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.jmx.MBeanExporter - Registering beans for JMX exposure: &#91;myapp-core.reports:type=CubaOfficeIntegration, inteaccERPSystems-core.reports:type=ReportImportExport, myapp-core.reports:type=ReportingMigrator&#93; 2017-09-13 12:31:37.345 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.jmx.MBeanExporter - Registering beans for JMX exposure: &#91;myapp-core.fts:type=FtsManager&#93; 2017-09-13 12:31:37.615 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine - Updating database... 2017-09-13 12:31:38.263 INFO &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine - Executing script 10-cuba/update/postgres/01/01-010-addValueIdToEntityLog.sql 2017-09-13 12:31:38.272 ERROR &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine - ERROR: column "value_id" of relation "sec_entity_log_attr" already exists 2017-09-13 12:31:38.275 ERROR &#91;localhost-startStop-1&#93; com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Error initializing application java.lang.RuntimeException: java.lang.RuntimeException: An error occurred while executing SQL script at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterImpl.doUpdate(DbUpdaterImpl.java:107) at com.haulmont.cuba.core.sys.dbupdate.DbUpdaterEngine.updateDatabase(DbUpdaterEngine.java:86) at com.haulmont.cuba.core.sys.AppContextLoader.updateDatabase(AppContextLoader.java:115) at com.haulmont.cuba.core.sys.AppContextLoader.afterInitAppContext(AppContextLoader.java:107) at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextInitialized(AbstractWebAppContextLoader.java:72) at com.haulmont.cuba.core.sys.singleapp.SingleAppCoreContextLoader.contextInitialized(SingleAppCoreContextLoader.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java

It is better to attach the .log file (it probably will contain line separators).
Connect to your Database using PHP PGadmin (use the link from the email which the cloud provider has sent you). And view data in the sys_db_changelog table. Is there “10-cuba/update/postgres/01/01-010-addValueIdToEntityLog.sql” ?
If you use platform 6.6.x the table should have about 120 “10-cuba…” rows.

Hi Rostislav
My another try to deploy has already worked today but by recreating the environment. Since the project is under development, I could afford that even I have lost test data.

However, I think we got to investigate why is this happening!
I have all the backups and can simulate it again to gather the files you have requested. It seems to me that, I case I have created a new Entity and deleted in my development environment, this problem occurs when I want to refresh my app back to Cloud. But if refresh my cloud app every time I create or delete Entity, it is OK. Do you think we should validate it?

Hi,

You have got two different databases: 1) Your local development DB 2) Production DB in Cloud.
When you launch “generate DB scripts” Studio generates scripts comparing the state of your local(development) DB with the project model.
All the scripts are packed to WAR and delivered to production.
DbUpdaterEngine executes all the scripts which have not been registered in sys_db_changelog. If the whole script was successfully executed it is registered in sys_db_changelog (a new record appears).

SQL commands separated with “^” are executed in a separate transaction, and as written in the documentation, if an update fails there is a chance that a part of the script was executed but the whole script was not marked as executed.

The above means that however Studio generates scripts, the developer still must verify them before deployment.
Regards.

Hi Rostislav
"The above means that however Studio generates scripts, the developer still must verify them before deployment." Do you mean “sys_db_changelog” must be verified?

I mean, the developer should take care of the production database and its data, and check which scripts are going to be executed, and if needed manually modify them. And it is also recommended to create the database backup before the system update.