Hello,
We (the team I’m working with and I) are new to the CUBA Platform. We are currently developing a portal application which deployed to a simple AWS Elastic Beanstalk environment without issue. Recently, one of the developers modified the application to include the multitenancy addon. The application works fine in CUBA Studio but fails once it is deployed to Elastic Beanstalk, even when being deployed to a completely fresh environment from the ground up.
Here is a stack trace that I pulled from the EC2 app.log
folder:
2021-08-04 18:25:28.237 ERROR [localhost-startStop-1] com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Error initializing application
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: java.lang.IllegalArgumentException: Property 'deleteTs' not found in membership_SubscriptionGroupLink
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:448) ~[spring-orm-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.startTransaction(AbstractPlatformTransactionManager.java:400) ~[spring-tx-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373) ~[spring-tx-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at com.haulmont.cuba.core.sys.TransactionImpl.<init>(TransactionImpl.java:63) ~[cuba-core-7.2.14.jar:7.2.14]
at com.haulmont.cuba.core.sys.TransactionsImpl.create(TransactionsImpl.java:55) ~[cuba-core-7.2.14.jar:7.2.14]
at com.haulmont.cuba.core.sys.PersistenceImpl.createTransaction(PersistenceImpl.java:139) ~[cuba-core-7.2.14.jar:7.2.14]
at com.haulmont.cuba.security.auth.AuthenticationManagerBean.login(AuthenticationManagerBean.java:114) ~[cuba-core-7.2.14.jar:7.2.14]
at com.haulmont.cuba.security.auth.AnonymousSessionHolder.loginAnonymous(AnonymousSessionHolder.java:118) ~[cuba-core-7.2.14.jar:7.2.14]
at com.haulmont.cuba.security.auth.AnonymousSessionHolder.initializeAnonymousSessions(AnonymousSessionHolder.java:103) ~[cuba-core-7.2.14.jar:7.2.14]
at com.haulmont.cuba.security.auth.AnonymousSessionHolder.applicationStarted(AnonymousSessionHolder.java:54) ~[cuba-core-7.2.14.jar:7.2.14]
at com.haulmont.cuba.core.sys.AppContext.startContext(AppContext.java:239) ~[cuba-global-7.2.14.jar:7.2.14]
at com.haulmont.cuba.core.sys.AppContext$Internals.startContext(AppContext.java:302) ~[cuba-global-7.2.14.jar:7.2.14]
at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextInitialized(AbstractWebAppContextLoader.java:94) ~[cuba-global-7.2.14.jar:7.2.14]
at com.haulmont.cuba.core.sys.AppContextLoader.contextInitialized(AppContextLoader.java:52) ~[cuba-core-7.2.14.jar:7.2.14]
at com.haulmont.cuba.core.sys.singleapp.SingleAppCoreContextLoader.contextInitialized(SingleAppCoreContextLoader.java:46) ~[cuba-core-7.2.14.jar:7.2.14]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at com.haulmont.cuba.core.sys.singleapp.SingleAppCoreServletListener.contextInitialized(SingleAppCoreServletListener.java:78) ~[cuba-shared-lib-7.2.14.jar:7.2.14]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4705) ~[catalina.jar:8.5.63]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5171) ~[catalina.jar:8.5.63]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:8.5.63]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743) ~[catalina.jar:8.5.63]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719) ~[catalina.jar:8.5.63]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705) ~[catalina.jar:8.5.63]
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1085) ~[catalina.jar:8.5.63]
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1802) ~[catalina.jar:8.5.63]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
Caused by: javax.persistence.PersistenceException: java.lang.IllegalArgumentException: Property 'deleteTs' not found in membership_SubscriptionGroupLink
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:852) ~[org.eclipse.persistence.jpa-2.7.3-16-cuba.jar:na]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:219) ~[org.eclipse.persistence.jpa-2.7.3-16-cuba.jar:na]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:327) ~[org.eclipse.persistence.jpa-2.7.3-16-cuba.jar:na]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:350) ~[org.eclipse.persistence.jpa-2.7.3-16-cuba.jar:na]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:313) ~[org.eclipse.persistence.jpa-2.7.3-16-cuba.jar:na]
at org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:466) ~[spring-orm-5.2.9.RELEASE.jar:5.2.9.RELEASE]
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:391) ~[spring-orm-5.2.9.RELEASE.jar:5.2.9.RELEASE]
... 32 common frames omitted
Caused by: java.lang.IllegalArgumentException: Property 'deleteTs' not found in membership_SubscriptionGroupLink
at com.haulmont.chile.core.model.impl.MetaClassImpl.getPropertyNN(MetaClassImpl.java:107) ~[cuba-global-7.2.14.jar:7.2.14]
at com.haulmont.cuba.core.sys.persistence.mapping.UuidMappingProcessor.process(UuidMappingProcessor.java:52) ~[cuba-core-7.2.14.jar:7.2.14]
at com.haulmont.cuba.core.sys.persistence.EclipseLinkSessionEventListener.preLogin(EclipseLinkSessionEventListener.java:124) ~[cuba-core-7.2.14.jar:7.2.14]
at org.eclipse.persistence.sessions.SessionEventManager.preLogin(SessionEventManager.java:622) ~[org.eclipse.persistence.core-2.7.3-16-cuba.jar:na]
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.preConnectDatasource(DatabaseSessionImpl.java:853) ~[org.eclipse.persistence.core-2.7.3-16-cuba.jar:na]
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:829) ~[org.eclipse.persistence.core-2.7.3-16-cuba.jar:na]
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:258) ~[org.eclipse.persistence.jpa-2.7.3-16-cuba.jar:na]
When trying to reach the application through Elastic Beanstalk, we get a 404 error.
Here are some other relevant details:
-
Elastic Beanstalk Platform: Tomcat 8.5 with Corretto 11 running on 64bit Amazon Linux 2
-
CUBA Platform version: 7.2.14
-
Project deployment type: WAR
-
Database: Postgres 12.5 RDS instance created through Elastic Beanstalk console (for demo purposes)
Let me know if there are any other details that I can provide that would be helpful. As a note, I did see in a related post that it might be helpful to include the com.haulmont.addon.sdbmt
component in the application TestContainer classes, but that hasn’t seemed to help either.
Any help would be appreciated!