0

We are using wildfly-maven-plugin configured in pom.xml. Over that we are trying to install Oracle DB Driver and trying to configure DB Connection Pool in JBoss subsystem.

Please find the pom.xml configuration for wildfly-maven-plugin

                     <plugin>
                        <groupId>org.wildfly.plugins</groupId>
                        <artifactId>wildfly-maven-plugin</artifactId>
                        <version>1.2.2.Final</version>
                        <configuration>
                            <hostname>${jboss_host}</hostname>
                            <port>${jboss_port}</port>
                             </configuration>
                        
                        <executions>
                        
                            <!-- Run CLI-scripts -->
                            <execution>
                                <id>jboss-config</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>execute-commands</goal>
                                </goals>
                                <configuration>
                                    <execute-commands>
                                        <scripts>                                           
                                            <script>${basedir}/target/jboss/configuration/jboss-all-script.cli</script>
                                        </scripts>
                                    </execute-commands>
                                </configuration>
                            </execution>
                            
                        </executions>
                    </plugin>

Following command installs Oracle DB driver sucessfully.

mvn clean install -Pdeploy-oracle-driver,localdev

Following command supposed to configure DB Driver Connection but it is failing. Here is the mvn command and the concerned error output.

mvn clean install -Pjboss,localdev

Error,

[INFO] --- wildfly-maven-plugin:1.2.2.Final:execute-commands (jboss-config) @ csd-servers-jboss ---
WARN: can't find jboss-cli.xml. Using default configuration values.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.382 s
[INFO] Finished at: 2022-03-24T15:14:02+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final:execute-commands (jboss-config) on project csd-servers-jboss: Execution jboss-config of goal org.wildfly.plugins:wildfly-maven-plugin:1.2.2.Final:execute-commands failed: Failed to initialize CLI context: Failed to initialize Aesh console: org/fusesource/jansi/WindowsAnsiOutputStream: org.fusesource.jansi.WindowsAnsiOutputStream -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

And we have the following file - cli-filters-localdev.properties under jboss folder in the maven project.

spring_profiles_active=localdev logging_level=DEBUG oracle_deploy_name=oracle_driver ds_tx_name=${project.parent.artifactId}_db ds_tx_jndi=java:jboss/jdbc/${project.parent.artifactId}/DataSource ds_no_tx_name=${project.parent.artifactId}_db_NoTx ds_no_tx_jndi=java:jboss/jdbc/${project.parent.artifactId}/DataSource_NoTx database_url=jdbc:oracle:thin:@//srv251.srv.pulp.com:11523/jeevee.srv.pulp.com database_server=srv251.srv.pulp.com database_port=11523 database_name=jeevee database_user=bul database_password=showbot database_max_pool_size=20 database_timeout=5000

what is wrong that I am doing over here, why this mvn command is failing,- mvn clean install -Pjboss,localdev

I understood this is basically happening through jboss-cli - JBoss Command Line Interface - Aesh console

Dev Anand Sadasivam
  • 699
  • 7
  • 21
  • 49
  • Adding the `-e` maven switch might give you some hints for the actual problem. I would guess that it fails to authenticate with the server – Guillaume Mar 24 '22 at 11:59
  • Definitely looks like a strange error. You could try upgrading to 2.0.2.Final. If that doesn't work keep on 2.0.2.Final, but add `true` to your configuration. – James R. Perkins Mar 24 '22 at 16:04
  • When I am using `2.0.2.Final` build is succeeding, however, it is not adding `db driver connection` in `JBoss EAP subsystem`. And for the moment I cannot go beyond `1.2.2.Final` due to my project constraint. Maybe someone can let me know what have been went wrong in the `wildfly-maven-plugin` with the present configuration. – Dev Anand Sadasivam Apr 20 '22 at 04:54

0 Answers0