Steve Dev

Ranch Hand
+ Follow
since Apr 22, 2022
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Steve Dev

I think "DynDNS" work only with public IP, the router uses 4G mobile network, so the allocated IP address is private on the network of mobile provider and it is not visible on the internet.
Is there any way to use "DynDNS" in this case ?
2 years ago
Hi all,
First thanks for answering.
There is another method which consists of converting the laptop to a web server but this requires having a public IP address.  
knowing that I use a 4G router, the IP address allocated by the ISP is a private address and i have to ask the ISP to be able to have a public IP.
is there a method to make the laptop accessible via the internet without asking to make a request to ISP.With this way,

Thanks.
2 years ago
Hello,

Are there any linux VPS that allow you to deploy a JSF and Mysql application for free without asking to enter billing information.
I tried other methods other than VPS like Heroku and other similar sites but they require billing information to be able to do tests.

Thanks
2 years ago
And especially for Wildfly, it is important to prepare the module.xml and standalone.xml files..
For the module.xml file

this is done for example on ubunto with the following command
1- Go to bin directory of Wildfly :

cd /wildfly-21.0.2.Final/bin


2- Run Wildfly server with the following command :

./standalone.sh&


3-Generate the module.xml file with the following command:

[standalone@localhost:9990 /] module add --name=com.mysql.driver --dependencies=javax.api,javax.transaction.api --resources=/PATH/TO/mysql-connector-java-8.0 .13.jar


4- Copy the file mysql-connector-java-8.0 .13.jar in the  generated location for the the module

/wildfly-21.0.2.Final/modules/system/layers/base/com/mysql/driver/main


5-Copy generated folder
From

/wildfly-21.0.2.Final/modules/com/mysql/driver/main


to

/wildfly-21.0.2.Final/modules/system/layers/base/com/mysql/driver/main


For the standalone.xml file

The standalone.xml file should be modified by adding the drivers of the Mysql connector, knowing that the class com.mysql.jdbc.Driver is deprecated. The new driver class is com.mysql.cj.jdbc.Driver .
This is done with the following command:

[standalone@localhost:9990 /] /subsystem=datasources/jdbc-driver=mysql/:add(driver-module-name=com.mysql.driver,driver-name=mysql,jdbc-compliant=false,driver-class- name=com.mysql.cj.jdbc.Driver)


This will add the following line to the standalon.xml file

<datasources>
  <datasource >
    ...
   
  </datasource>
  <drivers>
 
    ...
   
    <driver name="mysql" module="com.mysql.driver">
<driver-class>com.mysql.cj.jdbc.Driver</driver-class>
    </driver>
  </drivers>
 
</datasources>  


And finaly when deploying on a Wildfly docker image, it is important to copy these files to the same locations,the following dockerfile can be used as an example:
2 years ago
Thanks Tim Holloway, you underlined a lot of important things and your intervention was very useful.

The container runs on their own address ip, in order to get the allocated address ip, the below command can be used:

$ sudo docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name


The container name can be found by executing the following command:

sudo docker ps -a


Regarding the deployment of the current JSF application, the issue was resolved and there are two ways to complete the deployment:

1-Using docker Wildfly image to host the JSF application and Mysql that is hosted locally

With this way, the application is built into Wildfly docker image but it can not be executed because the Wildfly docker image can't access to Mysql that is hosted locally.
The solution was to run the docker image of Wildfly with the option "--net host,", this will allow the Wildfly docker image  to access to the host machine with the address 127.0.0.1. So the command that should be used to run the Wildfly docker image is:

sudo docker run --net host -p 8080:8080 -p 9990:9990 -d image-id


Now it will be possible to set the connection string in the Wildfly docker image with the following way:

jdbc:mysql://127.0.0.1:3306/Mydatabase



2-Using docker compose with two docker container service

This way requires two containers service: one for the JSF application using Wilfly image and the other is for Mysql, in this case it is important to add the network in each service identified in yml file and also it is required to add a test to the JSF application container service to wait until the Mysql container service finished creation and initialization the database if there is a initialization sql query. Below an example of yml file used for docker compose deployment:

version: "3.8"
services:
mysql_db:
   image: mysql:8.0
   networks:
     - jsf-app-network    
   container_name: mysql_db
   restart: always
   volumes:
     - ./database-initialization:/docker-entrypoint-initdb.d/  
   ports:
     - 3306:3306  
   environment:
     - MYSQL_ROOT_PASSWORD=rootpassword
     - MYSQL_DATABASE=Mydatabase
   healthcheck:
     test: mysql --user=root --password=rootpassword  Mydatabase -e 'select count(*) from user;'
     interval: 10s
     timeout: 300s
     retries: 10
api_service:
   image: jboss/wildfly:21.0.2.Final
   networks:
     - jsf-app-network  
   container_name: api_service
   build:
     context: .
     dockerfile: DockerfileJDK
   restart: on-failure
   ports:
     - 8080:8080
     - 9990:9990
   environment:
     MYSQL_USER: root
     MYSQL_PASSWORD: rootpassword
     MYSQL_DATABASE: Mydatabase
     MYSQL_HOST: mysql_db
   depends_on:
     mysql_db:
         condition: service_healthy
networks:
 jsf-app-network:
   external: false
   name: jsf-app-network


As noted in this yml file, the container of the JSF application service should wait for the Mysql container service to finish creation and initialization of the database, this check is done with the healthcheck attribute in JSF container service and the attribute depends_on in the Mysql container service.
The verification in the Mysql container service will be done by performing a query on the created database, in this way we can know that the database is finished initialization and is ready.
2 years ago
As mentioned in the previous message, I did not deploy the application in order to test the behavior of Widfly in the docker. This means that the war file is not copied, i just launch Wildfly and try to create a datasource to Mysql
The standalone.xml and module.xml files were created locally and then copied to the docker image. please check this link.
So the error is that when launching Wildfly on docker image, the connection does not work to Mysql despite the same configuration working well locally.
The test is done using Wildfly's "Console Application" which is accessible through "http://localhost:9990/console"
In the following image a capture taken from the Wildfly server launched on the docker image:

Now the configuration that works locally doesn't work in the docker image.
The error indicated in the Wildfly log file is the following:

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at [email protected]//com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at [email protected]//com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at [email protected]//com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835)
at [email protected]//com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455)
at [email protected]//com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
at [email protected]//com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
at [email protected]//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:321)
... 35 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure


So in summary, The war file is not copied, and Wildfly cannot connect to Mysql.
2 years ago
When attempting to deploy a JSF application using MySQL which is hosted in localhost, the deployment is done properly locally using Widfly version 21.
When deploying using docker, the application failed due to a connection error with the Mysql database.
In order to test the connection of the docker image of widfly to Mysql, the deployment is done without the JSF application using the following docker file:

FROM jboss/wildfly:21.0.2.Final
RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin
ADD ./dockerfolder/backend/main/mysql-connector-java-8.0.13.jar /opt/jboss/wildfly/modules/com/mysql/driver/main/mysql-connector-java-8.0.13.jar
ADD ./dockerfolder/backend/main/module.xml /opt/jboss/wildfly/modules/com/mysql/driver/main/module.xml
ADD ./dockerfolder/backend/main/mysql-connector-java-8.0.13.jar /opt/jboss/wildfly/modules/com/mysql/driver/main/mysql-connector-java-8.0.13.jar
ADD ./dockerfolder/backend/main/module.xml /opt/jboss/wildfly/modules/com/mysql/driver/main/module.xml
ADD ./dockerfolder/backend/main/mysql-connector-java-8.0.13.jar /opt/jboss/wildfly/modules/system/layers/base/com/mysql/driver/main/mysql-connector-java-8.0.13.jar
ADD ./dockerfolder/backend/main/module.xml /opt/jboss/wildfly/modules/system/layers/base/com/mysql/driver/main/module.xml
COPY ./dockerfolder/backend/standalone.xml /opt/jboss/wildfly/standalone/configuration/standalone.xml
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]


All necessary files are copied from the local to the docker image and this is mentioned in the dockerfile:
The module.xml file:

<?xml version='1.0' encoding='UTF-8'?>

<module xmlns="urn:jboss:module:1.1" name="com.mysql.driver">

   <resources>
       <resource-root path="mysql-connector-java-8.0.13.jar"/>
   </resources>

   <dependencies>
       <module name="javax.api"/>
       <module name="javax.transaction.api"/>
   </dependencies>
</module>


The datasource in standalone.xml file

       <subsystem xmlns="urn:jboss:domain:datasources:6.0">
           <datasources>
               <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
                   <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                   <driver>h2</driver>
                   <security>
                       <user-name>sa</user-name>
                       <password>sa</password>
                   </security>
               </datasource>
               <datasource jndi-name="java:/MySqlDS" pool-name="MySqlDS">
                   <connection-url>jdbc:mysql://127.0.0.1:3306/Mydatabase</connection-url>
                   <driver-class>com.mysql.cj.jdbc.Driver</driver-class>
                   <driver>mysql</driver>
                   <security>
                       <user-name>root</user-name>
                       <password>rootpassword</password>
                   </security>
                   <validation>
                       <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
                       <background-validation>true</background-validation>
                       <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
                   </validation>
               </datasource>
               <drivers>
                   <driver name="h2" module="com.h2database.h2">
                       <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                   </driver>
                   <driver name="mysql" module="com.mysql.driver">
                       <driver-class>com.mysql.cj.jdbc.Driver</driver-class>
                   </driver>
               </drivers>
           </datasources>
       </subsystem>


When trying to create a Datasource from "Application console", the error message "WFLYJCA0040: failed to invoke operation: WFLYJCA0047"  is displayed as shown in the following image:



So it seems that the error is not at the level of the JSF application but at the level of the connection from Docker image of Widfly to mysql .
While trying to scan the log file of Widfly, it was noticed that the error related to connection from Widfly to Mysql as shown in the log file as follows:

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at [email protected]//com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
at [email protected]//com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
at [email protected]//com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835)
at [email protected]//com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455)
at [email protected]//com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
at [email protected]//com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:207)
at [email protected]//org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:321)
... 35 more
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure




Thanks
2 years ago
I think the error is related to then connection to the database that's why the managed beans could not be generated as described in the following error message:

api_service_1  | 12:11:21,179 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 7) WELD-000119: Not generating any bean definitions from jsf-manage.department.dao.AppSettingDAOImpl because of underlying class loading error: Type SessionFactory from [Module "JSF-Manage-Department.war" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.



2 years ago
JSF
Also after removing the library from the pom.xml, the error relevant to DAO class that is injected in the managed bean is generated:
The error is relevant to the injection of DAO class in the managed bean:
Below the generated error:

api_service_1  | Exception 1 :
api_service_1  | org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type AppSettingDAO with qualifiers @Default
api_service_1  |   at injection point [BackedAnnotatedField] @Inject private jsf-manage.department.service.AppSettingMB.appSettingDAO
api_service_1  |   at jsf-manage.department.service.AppSettingMB.appSettingDAO(AppSettingMB.java:0)
api_service_1  |
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:64)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:62)
api_service_1  | at [email protected]//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
api_service_1  | at [email protected]//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
api_service_1  | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
api_service_1  | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
api_service_1  | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
api_service_1  | at java.base/java.lang.Thread.run(Thread.java:834)
api_service_1  | at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:513)


Below how AppSettingMB was defined:

And here how AppSettingDAOImpl was defined:
 
The application works properly locally but not in the used image in docker.

2 years ago
JSF
Libraries that should be excluded have been modified by adding "<scope>provided</scope>" in the pom.xml file.
Currently a new error is displayed;

api_service_1  | Exception 1 :
api_service_1  | org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type AppSettingDAO with qualifiers @Default
api_service_1  |   at injection point [BackedAnnotatedField] @Inject private jsf-manage.department.service.AppSettingMB.appSettingDAO
api_service_1  |   at jsf-manage.department.service.AppSettingMB.appSettingDAO(AppSettingMB.java:0)
api_service_1  |
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:64)
api_service_1  | at [email protected]//org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:62)
api_service_1  | at [email protected]//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
api_service_1  | at [email protected]//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
api_service_1  | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
api_service_1  | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
api_service_1  | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
api_service_1  | at java.base/java.lang.Thread.run(Thread.java:834)
api_service_1  | at [email protected]//org.jboss.threads.JBossThread.run(JBossThread.java:513)


Below how AppSettingMB was defined:

And here how AppSettingDAOImpl was defined:
 
Although the application works properly locally and for deployment the quay.io/wildfly/wildfly image is used.
2 years ago
JSF
the versions of the libraries used are also defined in the pom.xml file, below how they were defined:

 <properties>
<springframework.version>5.3.19</springframework.version>
<springsecurity.version>5.6.3</springsecurity.version>
</properties>


If a specific version of hibernate or MySQL connector is used, then if the versions exposed by widhfly are different, this will cause the application to malfunction.
In addition, no error is generated when running the application locally with widhfly.
Regarding the war file export, but excluding the libraries used will generate compilation errors and therefore the export will fail. or is there a way to export without having compilation errors?




2 years ago
JSF
Considering the version of spring used in the project, I think this is not a problem since the spring library is imported from Maven repository and I think it does not exist in the docker image of widhfly.
Regarding Hibernate, I think this is not a problem since the server will first look at the library used in the project before the version installed at home.
Below are the dependencies used in the project

   <dependencies>
 
   <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>3.8.1</version>
   </dependency>

<dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-core</artifactId>
   <version>${springframework.version}</version>
</dependency>

<dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-tx</artifactId>
   <version>${springframework.version}</version>
</dependency>

<dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-webmvc</artifactId>
   <version>${springframework.version}</version>
</dependency>

<dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-orm</artifactId>
   <version>${springframework.version}</version>
</dependency>

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-entitymanager</artifactId>
   <version>5.6.8.Final</version>
</dependency>

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-core</artifactId>
   <version>5.6.8.Final</version>
</dependency>

   <dependency>
       <groupId>mysql</groupId>
       <artifactId>mysql-connector-java</artifactId>
       <version>8.0.13</version>
   </dependency>        

<dependency>
   <groupId>javax.inject</groupId>
   <artifactId>javax.inject</artifactId>
   <version>1</version>
</dependency>

<dependency>
   <groupId>org.aspectj</groupId>
   <artifactId>aspectjrt</artifactId>
   <version>1.9.9.1</version>
</dependency>

<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>

<dependency>
   <groupId>com.sun.faces</groupId>
   <artifactId>jsf-api</artifactId>
   <version>2.2.20</version>
</dependency>

<dependency>
   <groupId>com.sun.faces</groupId>
   <artifactId>jsf-impl</artifactId>
   <version>2.2.20</version>
</dependency>

<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version>
</dependency>-->

<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>javax.servlet-api</artifactId>
   <version>3.1.0</version>
</dependency>

<dependency>
   <groupId>org.slf4j</groupId>
   <artifactId>slf4j-api</artifactId>
   <version>1.7.30</version>
</dependency>

<dependency>
   <groupId>ch.qos.logback</groupId>
   <artifactId>logback-classic</artifactId>
   <version>1.2.3</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>

<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
</dependency>

<dependency>
<groupId>com.sun.el</groupId>
<artifactId>el-ri</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
</dependency>

<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>2.1.1</version>
</dependency>

<dependency>
   <groupId>org.webjars</groupId>
   <artifactId>bootstrap</artifactId>
   <version>5.1.3</version>
</dependency>

<dependency>
   <groupId>org.webjars</groupId>
   <artifactId>webjars-locator-core</artifactId>
   <version>0.48</version>
</dependency>

   <dependency>
   <groupId>org.webjars</groupId>
   <artifactId>font-awesome</artifactId>
   <version>6.0.0</version>
</dependency>

<dependency>
   <groupId>org.primefaces</groupId>
   <artifactId>primefaces</artifactId>
   <version>11.0.0</version>
</dependency>

<dependency>
   <groupId>com.lowagie</groupId>
   <artifactId>itext</artifactId>
   <version>2.1.7</version>
</dependency>

<dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-web</artifactId>
   <version>5.3.19</version>
</dependency>
 
   <dependency>
       <groupId>org.springframework.security</groupId>
       <artifactId>spring-security-web</artifactId>
       <version>${springsecurity.version}</version>
   </dependency>
   
   <dependency>
       <groupId>org.springframework.security</groupId>
       <artifactId>spring-security-config</artifactId>
       <version>${springsecurity.version}</version>
   </dependency>

<dependency>
   <groupId>org.springframework.security</groupId>
   <artifactId>spring-security-core</artifactId>
   <version>${springsecurity.version}</version>
</dependency>

<dependency>
   <groupId>com.github.jepsar</groupId>
   <artifactId>timeago-jsf</artifactId>
   <version>1.0</version>
</dependency>

 </dependencies>



should we export the war file without the hibernate libraries in this case?
If the spring and hibernate libraries will be removed, the project will not be compiled.

2 years ago
JSF
According to my understanding, that the libraries used in spring will be packaged in the war file so will be exported to the hosting server which is Widhfly for our case so the version of spring used in the project will be exported and there will be no version problem .
on the other hand you gave me an idea on the version of java used, in my case I use JDk 17 and java 1.8 whereas it seems that java is absent in the docker image of widhfly !!!
I used widhfly because the application contains EJB classes while Apache tomcat does not allow EJB hosting.
Do you have a suggestion for another docker image that can support hosting JSF application with EJB or how to modify the widfly image to support hosting JSF with EJB.
2 years ago
JSF
I have a JSf application that works properly locally on the Widfly server
When deploying the application with docker compose using the image jboss/wildfly:21.0.0.Final  the following error message is displayed

api_service_1  | 01:52:22,325 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 80) WFLYCLINF0002: Started http-remoting-connector cache from ejb container
api_service_1  | 01:52:22,988 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "JSF-Manage-Department.war")]) - failure description: {"WFLYCTL0080: Failed services" => {
api_service_1  |     "jboss.deployment.unit.\"JSF-Manage-Department.war\".component.\"org.springframework.http.server.reactive.ServletServerHttpResponse$ResponseAsyncListener\".WeldInstantiator" => "Failed to start service
api_service_1  |     Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class org.springframework.http.server.reactive.ServletServerHttpResponse$ResponseAsyncListener
api_service_1  |     Caused by: java.lang.NoClassDefFoundError: Failed to link org/springframework/http/server/reactive/ServletServerHttpResponse$ResponseBodyProcessor (Module \"deployment.JSF-Manage-Department.war\" from Service Module Loader): Failed to link org/springframework/http/server/reactive/AbstractListenerWriteProcessor (Module \"deployment.JSF-Manage-Department.war\" from Service Module Loader): org/reactivestreams/Processor",
api_service_1  |     "jboss.deployment.unit.\"JSF-Manage-Department.war\".component.\"org.springframework.http.server.reactive.ServletServerHttpRequest$RequestAsyncListener\".WeldInstantiator" => "Failed to start service
api_service_1  |     Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class org.springframework.http.server.reactive.ServletServerHttpRequest$RequestAsyncListener
api_service_1  |     Caused by: java.lang.NoClassDefFoundError: Failed to link org/springframework/http/server/reactive/ServletServerHttpRequest$RequestBodyPublisher (Module \"deployment.JSF-Manage-Department.war\" from Service Module Loader): Failed to link org/springframework/http/server/reactive/AbstractListenerReadPublisher (Module \"deployment.JSF-Manage-Department.war\" from Service Module Loader): org/reactivestreams/Publisher",
api_service_1  |     "jboss.deployment.unit.\"JSF-Manage-Department.war\".component.\"org.springframework.http.server.reactive.ServletHttpHandlerAdapter$HttpHandlerAsyncListener\".WeldInstantiator" => "Failed to start service



It appears that the error is related to "org.springframework.http.server.reactive.ServletServerHttpResponse$ResponseAsyncListener" and the deployment is used with the war file generated with Eclipse.
Does anyone have an idea of the source of this error ?

2 years ago
JSF
Thanks Tim Holloway
As you said there is many distributions for widfly : "Java EE Full & Web Distribution" and not "Jakarta EE Full & Web Distribution" and "WildFly Preview EE 9 Distribution".
This is due to the changes made on Java EE witch became Jakarta now.
The version that should be used is "Java EE Full & Web Distribution" .
2 years ago
JSF