I have a deployment problem that I can’t solve alone.
In studio I checked everything from “Build War” to "Single War … "
Then I launched from the app dir the command “./gradlew buildwar” using a terminal
Then I deployed the generated .war in another machine with tomcat7 installed,
When I try to start the app in tomcat I get the error
"SEVERE: Exception sending context initialized event to listener instance of class
com.haulmont.cuba.core.sys.singleapp.SingleAppCoreServletListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'cuba_ServerTokenStore': Invocation of init method failed; nested exception is java.lang.NullPointerException"
I attached the full log file.
Any help is really appreciated because I’m stuck here and I can’t continue the work.
I’m using:
Ubuntu 16.04
Tomcat 7
java version “1.8.0_144”
cuba platform-6.6.4
cuba studio 6.6.2 (licensed)
IMPORTANT UPDATE:
updated to TOMCAT 8.
The application now is working…
I paste here the entire procedure to setup the environment so maybe it is useful for others.
INSTALLATION
sudo apt install tomcat8 tomcat8-admin
check localhost:8080 in the browser. You should see the tomcat start page.
ENABLE TOMCAT MANAGER - localhost:8080/manager
sudo vim /etc/tomcat8/tomcat-users.xml
<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="user" password="xxxxxxxxx" roles="manager-gui" />
<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="xxxxxxxxx" roles="manager-gui,admin-gui" />
ENABLE DEPLOYMENT WAR > 50MB
sudo vim /usr/share/tomcat8-admin/manager/WEB-INF/web.xml
<multipart-config>
<!-- 150MB max -->
<max-file-size>152428800</max-file-size>
<max-request-size>152428800</max-request-size>
<file-size-threshold>0</file-size-threshold>
</multipart-config>
CUBA APPLICATION
BUILD WAR - FROM THE IDE
Project Properties - EDIT
"Deployment settings" (blue text bottom left)
ALL options cheched
Application home dir - /var/lib/tomcat7/webapps/
Generate Custom context.xml
Generate Custom web.xml
App.properties
['cuba.automaticDatabaseUpdate' : true]
BUILD WAR - FROM THE TERMINAL
cd ~/studio-project/app
./gradlew buildwar
Copy the war into the production machine.
From localhost:8080/manager
from section “WAR file to deploy” - browse the war file - deploy.