cuba-platform / documentation

CUBA Platform Documentation
https://www.cuba-platform.com
Creative Commons Attribution 4.0 International
26 stars 45 forks source link

Renew 'WAR deployment to WildFly' #156

Closed IskandarovRost closed 6 years ago

IskandarovRost commented 6 years ago

Environment

Description of the bug or enhancement

When tested CUBA WAR deployment to Wildfly 12 found following documentation several problems:

The first problem : Execution of the following comand using Jbos-CLI fails, as there is no org/postgres module When the postgresql.jar is put to deployments it is not added to modules.

/subsystem=datasources/jdbc-driver=postgresql:add(driver-name=postgresql, driver-module-name=org.postgresql, driver-class-name=org.postgresql.Driver)

Installation of the driver as a module is not required - it is available right after deployment. Or we should to describe how to install the driver as module. **Note: Wildfly 13 has a bug and "test connection" everytime fails for a postgres datasource.

The second problem: no need to set includeJdbcDriver = true in the buildWar task, as the driver is already there.

The third problem: Modification of /opt/wildfly/standalone/configurations/standalone.xml config is required

Add to the <subsystem xmlns="urn:jboss:domain:logging:4.0"> snipet

<add-logging-api-dependencies value="false"/>
<use-deployment-logging-config value="false"/>

If not do do so the following exception occurs

Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
ng bean with name 'entityManagerFactory' defined in class path resource [cuba-sp
ring.xml]: Invocation of init method failed; nested exception is java.lang.Class
CastException: org.slf4j.impl.Slf4jLogger cannot be cast to ch.qos.logback.class
ic.Logger

The fourth problem: Hibernate module is created only after jbos-cli is called. When a user runs the manual at first time there is no such module at the moment we asking him to replace the jar.

oshiryaeva commented 6 years ago

**Note: Wildfly 13 has a bug and "test connection" everytime fails for a postgres datasource.

@IskandarovRost Sure? I didn't get a fail on v13.0.0