Unexpected command 'module add ...' Type 'help --commands' for the list of supported commands in JBoss EAP 6
Issue
Using CLI how do I add JDBC Module, Driver and JNDI mapping. Below is my script and it looks like everything works but the line that does the "module add" if I comment out that line and move the JDBC driver into modules by hand it works but I would like to get the "module add" line working Below is my script
module add --name=com.mysql.jdbc --resources=\/home\/jboss\/mysql-connector-java-5.1.21.jar --dependencies=javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=mysql:add(driver-module-name=com.mysql.jdbc,driver-name=mysql,driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource)
/subsystem=datasources/data-source=mysql:add(jndi-name="java:jboss/datasources/mySQLDB",use-java-context=true,user-name=jboss,password=jboss,connection-url="jdbc:jdbc://127.0.0.1/jboss",min-pool-size=20,max-pool-size=50,driver-name=mysql,flush-strategy=FailingConnectionOnly)
data-source enable --name=mysql
Here is the error I am getting:
Unexpected command 'module add --name=com.mysql.jdbc --resources=\/home\/jsmith\/tmp\/mysql-connector-java-5.1.21.jar --dependencies=javax.api,javax.transaction.api'. Type 'help --commands' for the list of supported commands
Environment
- JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.