Search code examples
javamacosmavenjbossnetbeans-8.2

JBoss 7.00 is not starting ojdbc in macOS Sierra with Netbeans 8.2


I'm installed jboss-eap-7.0.0-installer.jar and run executed using Netbeans 8.2 Independent OS in Windows 10 y works perfectly. In my Work!

Now in the same manner, I haven't Windows in my home, else macOS Sierra 10.12 I used the same jboss-eap-7.0.0-installer.jar with the same Netbeans 8.2 Independent OS.

I added the service obviously.

But is not starting (or using ojdbc6)!

08:57:47,238 ERROR [org.jboss.as.controller.management-operation] 
(ServerService Thread Pool -- 36) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "oracle")
]) - failure description: "WFLYJCA0041: Failed to load module for driver 
[com.oracle.ojdbc6]"

The conxtex the before error is

09:12:18,183 INFO  [org.jboss.as.security] (MSC service thread 1-3) WFLYSEC0001: Current PicketBox version=4.9.6.Final-redhat-1
09:12:18,213 INFO  [org.jboss.as.connector] (MSC service thread 1-6) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.3.Final-redhat-1)
09:12:18,212 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 36) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "datasources"),
    ("jdbc-driver" => "oracle")
]) - failure description: "WFLYJCA0041: Failed to load module for driver [com.oracle.ojdbc6]"
09:12:18,321 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0003: Undertow 1.3.21.Final-redhat-1 starting

And I have another error messages.

08:58:38,806 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0059: Class Path entry jaxb-api.jar in /Users/joseluisbz/EAP-7.0.0/standalone/deployments/Adagestion.war/WEB-INF/lib/jaxb-xjc-2.2.6.jar  does not point to a valid jar for a Class-Path reference.
08:58:38,807 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0059: Class Path entry jaxb-impl.jar in /Users/joseluisbz/EAP-7.0.0/standalone/deployments/Adagestion.war/WEB-INF/lib/jaxb-xjc-2.2.6.jar  does not point to a valid jar for a Class-Path reference.
08:58:42,434 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.module.service."deployment.Adagestion.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.Adagestion.war".main: WFLYSRV0179: Failed to load module: deployment.Adagestion.war:main
    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.modules.ModuleNotFoundException: org.mapstruct:main
    at org.jboss.modules.Module.addPaths(Module.java:1092)
    at org.jboss.modules.Module.link(Module.java:1448)
    at org.jboss.modules.Module.relinkIfNecessary(Module.java:1476)
    at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:225)
    at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:68)
    ... 5 more

Where I can discover this problem an Solve it?

EDIT

I put this path:

/Users/joseluisbz/EAP-7.0.0/modules/com/oracle/ojdbc6/main/module.xml

this content

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:Wildfly:module:1.0" name="com.oracle.ojdbc6">
    <resources>
        <resource-root path="/Users/joseluisbz/.m2/repository/com/oracle/ojdbc6/11.2.0.4/  "/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.resource.api"/>
        <module name="javax.transaction.api"/>
   </dependencies>
</module>

Because I have in this path the jar related

/Users/joseluisbz/.m2/repository/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar

Solution

  • I solve this question following this answer https://stackoverflow.com/a/51945667/811293:

    MacBook-Air:bin joseluisbz$ /Users/joseluisbz/EAP-7.0.0/bin/jboss-cli.sh 
    You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
    [disconnected /] module add --name=com.oracle.ojdbc6 --resources=/Users/joseluisbz/.m2/repository/com/oracle/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar --dependencies=javax.api,javax.resource.api,javax.transaction.api 
    [disconnected /] connect
    [standalone@localhost:9990 /]
    
    MacBook-Air:bin joseluisbz$
    

    This produces this files

    enter image description here

    With the content in the file module.xml

    <resources>
        <resource-root path="ojdbc6-11.2.0.4.jar"/>
    </resources>
    
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.resource.api"/>
        <module name="javax.transaction.api"/>
    </dependencies>