5

I'm deploying war file to JBoss As 7.1 , the same war file running properly with tomcat but with jboss it's giving flowing exception.

16:20:50,906 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.module.service."deployment.VSCAS.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.VSCAS.war".main: Failed to load module: deployment.VSCAS.war:main
at  org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]
 Caused by: org.jboss.modules.ModuleNotFoundException: Module com.oracle:main is not   found in local module loader @40dd550c (roots: E:\server\jboss-as-7.1.1.vsc\jboss-as-7.1.1.Final\modules)
at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126)
at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275)
at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222)
at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94)
at org.jboss.modules.Module.addPaths(Module.java:841)
at org.jboss.modules.Module.link(Module.java:1181)
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1207)
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:208)
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more

I have given jboss-deployment-structure.xml file also with flowing content to avoid the error.

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
<exclusions>
   <module name="org.hibernate"/>
    <module name="com.oracle" />
</exclusions>
 </deployment>
</jboss-deployment-structure>

Can any please help me.

Krushna
  • 5,059
  • 5
  • 32
  • 49

2 Answers2

4

By following the brief answer, I have done following steps:

1- Created directory structure oracle\ojdbc6\main under EAP-6.4.0\modules\system\layers\base\com\

2- Download and copy ojdbc6-11.2.0.3.jar and place it under main directory

3- Create module.xml file inside main directory with the following content

<?xml version="1.0" encoding="UTF-8"?>

<module xmlns="urn:jboss:module:1.1" name="com.oracle.ojdbc6">
    <properties>
        <property name="jboss.api" value="private"/>
    </properties>

    <resources>
        <resource-root path="ojdbc6-11.2.0.3.jar"/>
        <!-- Insert resources here -->
    </resources>

    <dependencies>
    </dependencies>
</module>
  • For JBoss EAP 7.2 on a mac, the path was slightly different. Better to Use the add command from the jboss Cli as described here: https://stackoverflow.com/a/54450930 – ViV Jun 24 '22 at 16:41
3

This error means your installation is missing the module com.oracle. This module is not included by default. To fix this you need to create the com.oracle module with the required JAR files and corresponding module.xml. Place it /modules/system/layers/base

Hope this helps you and others.

ozOli
  • 1,414
  • 1
  • 18
  • 26