HI
My application had an error that I have fixed and running locally but when I deploy it to cloud getting the same error. I have created a new environment in Jelastic and deployed it but getting the same error.
I cleared the cache and clean/assemble again and again but it seems that the war file is picking something from old file with error when deployed. any thoughts?
Here is the error:
26-Aug-2019 22:57:15.076 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/webapps/ROOT.war]
Aug 26, 2019 10:57:24 PM org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 32 column 364: The character sequence "]]>" must not appear in content unless used to mark the end of a CDATA section.
org.xml.sax.SAXParseException; systemId: file:/opt/tomcat/webapps/ROOT/WEB-INF/web.xml; lineNumber: 32; columnNumber: 364; The character sequence "]]>" must not appear in content unless used to mark the end of a CDATA section.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
Additional information:
web.xml (core)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<!-- Application properties config files -->
<context-param>
<param-name>appPropertiesConfig</param-name>
<param-value>classpath:com/inteacc/erp/app.properties
/WEB-INF/local.app.properties
"file:${catalina.home}/conf/myapp-core/local.app.properties"</param-value>
</context-param>
<!--Application components-->
<context-param>
<param-name>appComponents</param-name>
<param-value>com.haulmont.addon.dashboard com.haulmont.addon.dashboardchart com.haulmont.addon.imap
com.haulmont.cuba com.haulmont.charts com.haulmont.reports com.haulmont.bpm com.inteacc.common com.haulmont.fts
com.haulmont.addon.search com.haulmont.addon.emailtemplates com.haulmont.addon.sdbmt</param-value>
</context-param>
<listener>
<listener-class>com.haulmont.cuba.core.sys.AppContextLoader</listener-class>
</listener>
<servlet>
<servlet-name>remoting</servlet-name>
<servlet-class>com.haulmont.cuba.core.sys.remoting.RemotingServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>remoting</servlet-name>
<url-pattern>/remoting/*</url-pattern>
</servlet-mapping>
</web-app>
web.xml (web)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<!-- Application properties config files -->
<context-param>
<param-name>appPropertiesConfig</param-name>
<param-value>classpath:com/myapp/web-app.properties
/WEB-INF/local.app.properties
"file:${catalina.home}/conf/myapp/local.app.properties"</param-value>
</context-param>
<!--Application components-->
<context-param>
<param-name>appComponents</param-name>
<param-value>com.haulmont.addon.dashboard com.haulmont.addon.imap com.haulmont.cuba com.haulmont.charts com.haulmont.reports com.haulmont.bpm com.myapp.common com.haulmont.fts com.haulmont.addon.search com.haulmont.addon.emailtemplates com.haulmont.addon.dashboardchart com.haulmont.addon.sdbmt </param-value>
</context-param>
<listener>
<listener-class>com.vaadin.server.communication.JSR356WebsocketInitializer</listener-class>
</listener>
<listener>
<listener-class>com.haulmont.cuba.web.sys.WebAppContextLoader</listener-class>
</listener>
<servlet>
<servlet-name>app_servlet</servlet-name>
<servlet-class>com.haulmont.cuba.web.sys.CubaApplicationServlet</servlet-class>
<async-supported>true</async-supported>
</servlet>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>com.haulmont.cuba.web.sys.CubaDispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>rest_api</servlet-name>
<servlet-class>com.haulmont.restapi.sys.CubaRestApiServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/dispatch/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>app_servlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>rest_api</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>cuba_filter</filter-name>
<filter-class>com.haulmont.cuba.web.sys.CubaHttpFilter</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>cuba_filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>restSpringSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>contextAttribute</param-name>
<param-value>org.springframework.web.servlet.FrameworkServlet.CONTEXT.rest_api</param-value>
</init-param>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>springSecurityFilterChain</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>restSpringSecurityFilterChain</filter-name>
<url-pattern>/rest/*</url-pattern>
</filter-mapping>
</web-app>
krivopustov
(Konstantin Krivopustov)
August 28, 2019, 6:18am
#3
If you are using single-WAR deployment, look for the cause in the single-war-web.xml
file which is used by buildWar
gradle task.
Thanks Konstantin, I found the error in single-war-web.xml and it is working after fixing it.
Thank you so much.