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