I am taking my very first steps with WildFly application server. I want to create a database driver.
I had a look at https://www.adam-bien.com/roller/abien/entry/installing_oracle_jdbc_driver_on on how to do it manually. And now I want to do it by jboss-cli.sh
. I read about these commands e. g. here and here.
So I am typing...
wildfly-26.0.0.Final/bin$ ./jboss-cli.sh -c
[standalone@localhost:9990 /] module add --name=com.oracle --resources=/home/user/Downloads/ojdbc8.jar --dependencies=javax.api,javax.transaction.api
The command is going to be executed without error.
I would expect it to
module.xml
file (step 4)<driver />
tag in the standalone.xml
(do not know if that should be part of the add module
command?) (step 5)Basically it does a lot of that, but different than I expect.
It creates the subfolder in a wrong(?) location. It is not created in [WILDFLY_HOME]/modules/system/layers/base/com/oracle/main
like it is decribed by Adam Bien but it is created [WILDFLY_HOME]/modules/com/oracle/main
. The JAR file is correctly copied, the module.xml file is created but the folder seems to be wrong. And the standalone.xml is not altered at all.
If I start the web management console I do not see the driver next to the default H2 one.
So my question is what am I doing wrong with the command so that the folder is created in the correcy localtion? Or does this work as designed and the location is not that relevant and I am making other mistakes that it does not show in management console nor in standalone.xml?
By the way, I also tried to change the command module add --name=system.layers.base.com.oracle ...
. Now the folder was correct, but in the module.xml the name of the module was also system.layers.base.com.oracle
.
I tested with WildFly 26.0.0 and WildFly-preview 26.0.0 under Ubuntu.
It should not be created in modules/system/lasers/base
. That is for components provided by the container. Having the module off the root $JBOSS_HOME/modules
directory is correct.