Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

Not all the questions on this page are directly related to Canvas deployment, e.g. questions on Oracle database. Some of these questions were asked by participants during the Canvas training sessions. We have answered those here for the larger benefit of the Canvas Developer community.

...

This step is applicable only for the JBoss application server. If you use Tomcat or any other app server, proceed to step

2.

 

In the CTResources.jar

folder (e.g. ‘D:\Canvas\ JBoss EAP 7.x Installed folder\CTWeb

, in the ....\Ctweb\Dependencies\Canvas\CTResources.jar\CanvasApplicationContext.

json’)

json file, specify the context root

in CanvasApplicationContext.json file

, as shown in the following code snippet:

Expand
titleWhat are the changes to be done when context root of the application is changed?

Let’s assume that the context root of the application is dliteweb.

In the JBoss EAP 7.x Installed folder (e.g. 'D:\Canvas\JBoss EAP 7.x Installed folder\standalone\deployments\ctmodelhouse.war \WEB-INF\jboss-web.xml’)

following are the details of the application: 

  • DATA_SOURCE_NAME : DliteCTDS
  • SCHEMA_NAME : CT_MIG
  • SCHEMA_NAME_PWD : CT_MIG
  • CONTEXT_ROOT : dliteweb
  • WAR_NAME : dliteweb
  • WORK_FOLDER : D:/Canvas19/dliteweb

As a sample reference, the following steps indicate the changes required for the JBoss app server and Oracle database environments. For other app server and database combinations, appropriate changes need to be done in the relevant files. 
Context Root changes

1. In the application WAR, in the JBoss folder, specify the context root in the\WEB-INF\jboss-web.xml file, as shown in the following code snippet:

Code Block
languagexml
<context-root> 
<dliteweb>
<CONTEXT_ROOT> </context-root>
<!-- For example -->
<context-root> dliteweb </context-root>
Note
titleNote
Code Block
languagebash
{
	"contextRoot": "<CONTEXT_ROOT>",
	"applicationId": "MODELHOUSE",
	"displayName": "CTWEB",
	"isService": "Y"
}
# For example
{
	"contextRoot": "
<dliteweb>
dliteweb",
	"applicationId": "MODELHOUSE",
	"displayName": "CTWEB",
	"isService": "Y"
}
Resource

3. In the

application

CtwebResource.jar

folder (e.g. D:\Canvas\ JBoss EAP 7.x Installed folder\CTWeb\CTWebResources

, in the ....\Ctweb\CtwebResources\src\main\resource\

securityconfig.properties)

Ctwebsecurityconfig.properties file, specify the default context root

in securityconfig.properties file

,

 as

as shown in the following code snippet: 

Code Block
languagexml
DEFAULT_CONTEXT_ROOT=/
<dliteweb>
<CONTEXT_ROOT>
ALL_CONTEXT_ROOTS=<CONTEXT_ROOT>
<!-- For example -->
DEFAULT_CONTEXT_ROOT=dliteweb
ALL_CONTEXT_ROOTS=
<dliteweb>
dliteweb

4. In the

application

CtwebResource.jar

folder (e.g. D:\Canvas\ JBoss EAP 7.x Installed folder\CTWeb\CTWebResources

, in the ....\CtwebResources\src\main\resource\

exportconfig

Ctwebexportconfig.properties

)

file, specify

the context root as

the context path

in exportconfig.properties file

,

 as

as shown in the following code snippet:

Code Block
languagexml
SESSION_TIMEOUT_URL=/
<dliteweb>
<CONTEXT_ROOT>/index.jsp 
CONTEXT_PATH=/<CONTEXT_ROOT>
/<dliteweb>For JNDI data sources, the data source name should be specified. Let's assume that the JNDI data source name is DliteCTDS.
In the application Resource.jar folder (e.g. D:\Canvas\ JBoss EAP 7.x Installed folder\CTWeb\CTWebResources
<!-- For example -->
SESSION_TIMEOUT_URL=dliteweb/index.jsp 
CONTEXT_PATH=dliteweb

JNDI Data source name change

1. In the CtwebResource.jar, in the ....\CtwebResources\src\main\resource\

databaseconfig

Ctwebdatabaseconfig.properties

)

file, specify the JNDI data source name

in databaseconfig.properties file

,

 as

as shown in the following code snippet:

Code Block
languagexml
CT_FW_DATASOURCE=java:/<DATA_SOURCE_NAME>
CT_FW_FILEIMPORT_DATASOURCE=java:/<DATA_SOURCE_NAME>
<!-- For example -->
CT_FW_DATASOURCE=java:/
<DliteCTDS>
DliteCTDS 
CT_FW_FILEIMPORT_DATASOURCE=java:/
<DliteCTDS>
DliteCTDS

2. In

the JBoss EAP 7.x Installed folder (e.g. 'D:\Canvas\JBoss EAP 7.x Installed folder\standalone\configuration\standalone.xml’)

the application WAR, in the JBoss folder, specify the JNDI data source name in the ..../standalone/configuration/standalone.xml file, as shown in the following code snippet:

Code Block
languagexml
<datasource jndi-name="java:jboss/datasources/
<DliteCTDS>
<DATA_SOURCE_NAME>" pool-name="
<DliteCTDS>
<DATA_SOURCE_NAME>" enabled="true">
     
<connection-url>jdbc:oracle:thin:@10.12.25.28:1521:SIR13714</connection-url>
     
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
     <driver>OracleJDBCDriver</driver>
     <security>
         
<driver>OracleJDBCDriver</driver>
<user-name><SCHEMA_NAME></user-name>
         <password><SCHEMA_NAME_PWD></password>
  
<security>
   </security>
</datasource>
<!-- For example -->
<datasource jndi-name="java:jboss/datasources/DliteCTDS" pool-name="DliteCTDS" enabled="true">
     <connection-url>jdbc:oracle:thin:@10.12.25.28:1521:SIR13714</connection-url>
     
<user-name><SCHEMA_NAME></user-name>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
     <driver>OracleJDBCDriver</driver>
     <security>
    
<password><SCHEMA_NAME_PWD></password>
     <user-name>CT_MIG</user-name>
         <password>CT_MIG</password>
     </security>
</datasource>
Note
titleNote

Steps 6 and 7 are applicable only for the JBoss application server. If you use Tomcat or any other app server, proceed to step 8. 

In the JBoss EAP 7.x Installed folder (e.g. 'D:\Canvas\JBoss EAP 7.x Installed folder\standalone\deployments\ctmodelhouse.war \WEB-INF\jboss-web.xml’)

3. In the application WAR, in the JBoss folder, specify the JNDI data source name in the \WEB-INF\jboss-web.xml file, as shown in the following code snippet:

Code Block
languagexml
<resource-ref>
   <res-ref-name>jdbc/CTwebCanvasDataSource</res-ref-name>
   <jndi-name>java:jboss/datasources/<DATA_SOURCE_NAME></jndi-name>
</resource-ref>
<!-- For example -->
<resource-ref>
   <res-ref-name>jdbc/CTwebCanvasDataSource</res-ref-name>
   
<jndi-name>java:jboss/datasources/
<DliteCTDS><
DliteCTDS</jndi-name>
</resource-ref>
It is essential to specify the work folder path. Let's assume that the work folder path is D:/Canvas19/dliteweb
In the application Resource.jar folder (e.g. D:\Canvas\ JBoss EAP 7.x Installed folder\CTWeb\CTWebResources\

Work Folder Changes

1. In the CtwebResource.jar, in the ....\CtwebResources\src\main\resource\

MyImplementation

CtwebImplementation.properties

)

file, specify the work folder and centralized work folder paths

in MyImplementation.properties file

, as shown in the following code snippet:

Code Block
languagexml
CT_WORK_FOLDER_PATH=<WORK_FOLDER>                
CT_WORK_CENTRALIZED_FOLDER_PATH=<WORK_FOLDER>   
<!-- For example -->
CT_WORK_FOLDER_PATH=D:/Canvas19/dliteweb                
CT_WORK_CENTRALIZED_FOLDER_PATH=D:/Canvas19/dliteweb
It is essential to specify the WAR file name. Let's assume that the WAR file name is dliteweb

2. Specify the Web Application Resource (WAR) file name

in

of the application in build.xml file, as shown in the following code snippet: 

Code Block
languagexml
<property name="WAR_FILE_NAME" value="${DIST_ROOT}/<WAR_NAME>.war" />
<!-- For example -->
<property name="dliteweb" value="${DIST_ROOT}/
<dliteweb>.war" />
dliteweb.war" />



Expand
titleConnection timeout issue while deploying application on JBOSS

Solution: Add following entry in the standalone.xml file:

Code Block
languagexml
linenumberstrue
<system-properties>
         <property name="jboss.as.management.blocking.timeout" value="600"/> 
  </system-properties>



Expand
titleApplication deployment fails when setting up in a new environment

Check for the following pattern in the error logs:

Code Block
linenumberstrue
java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.ensureError(J9VMInternals.java:148)
at java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:137)
at io.bit3.jsass.Compiler.<init>(Compiler.java:40)
at com.intellectdesign.canvas.web.themes.ThemeConfig$CssConfig.convertScssFileToCssFie(ThemeConfig.java:817)

Solution: The SASS Java library does not support AIX operating system and hence the issue. This issue can be solved by performing the SASS compilation while generating the application WAR. Go through the following links to find samples of the ANT targets that must be included in the build file to perform the SASS compilation:


Expand
titleGetting Heap Space or Out of Memory error

Check for the following pattern in the error logs: 

Code Block
linenumberstrue
java.lang.OutOfMemoryError: Java heap space

Solution: Increase the memory to at least 8 GB. If the OutOfMemoryError still occurs, generate periodic heap dumps and analyse whether the heap usage is increasing.


Expand
titleApplication is not getting deployed

Check for the following pattern in the error logs:

Code Block
linenumberstrue
SEVERE: [com.intellectdesign.canvas.config.ConfigurationManager] [CTCOM00095] : Error while initializing configuration

Solution: This pattern will be present in the CanvasConfig_<yyyyMMddkkmmss>_<appServerName>_<applicationName> in case there is an error while initializing the configuration required for CT. At the end of the stack trace check the root cause mentioned in the “Caused by: " section.


Expand
titleInstead of updating the CanvasApplicationContext.json file, update web.xml in the 19.1.7.11 19679 revision and above.
  • If the latest release revision is 19.1.7.11 19679 and above, refer to the following steps:

Perform the following steps to use the CT release as-is without the need to update the CanvasApplicationContext.json file in the CTResources.jar.

  1. Update web.xml in the application WAR.

Example, File Location: ...\webapps\ctmodelhouse\WEB-INF\web.xml

The following snippet provides the sample values of the necessary elements and attributes that are to be configured within web.xml.

Code Block
<context-param>
<param-name>appId</param-name>
<param-value>MODELHOUSE</param-value>
</context-param>


Note

The param name should remain unchanged. Only "appId" should be used.

If the context-param attribute is already present in the web.xml for a different param-name, the new context-param attribute has to be added after that to configure the value of appId.

Refer to the following snippet for sample values of the necessary elements and attributes that are to be configured within web.xml.

Code Block
<context-param>
<param-name>ModelHouseInitializeBundle</param-name>
<param-value>MyImplementation</param-value>
</context-param>
<context-param>
<param-name>appId</param-name>
<param-value>MODELHOUSE</param-value>
</context-param>