1 of 1 people found this helpful
Below is example from my custom module I create to keep oracle driver jar :
I created on directory under wildfly modules as system\layers\base\com\oracle\ojdbc14\main
Now put all your jars in this directory. Add one module.xml file in same directory with entries of your jar files :
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.oracle.ojdbc14">
<resource-root path="second jar"/>
<resource-root path="third jar "/>
pay attention , I keep my directory structure consistent to my Name property in module. You can add as many jars as you need to this directory and add entry for resource-root path
Now to use this module , you can add entry in jboss-deployment-structure.xml in your applications META-INF , like :
<module name = "com.oracle.ojdbc14"/>
Hope this helps
Thanks for reply,
i've added the jar's as module and configured module name in jboss-deployment-structure.xml file too.
here am attaching screenshot. my jar name is ojdbc14.jar
but am not loading jar in build path of server.
can you guide me,how to get my jar in build path, do we need any special configuration in wildfly apart above solution ?
Can you explain issue a bit more ?
" my jar name is ojdbc14.jar" >> I think you mistype here. ? Please confirm.
You getting exceptions while running your application ? If yes please post trace.
If you mean you dont see that jar , in eclipse classpath , that Ok.. module we created will be available in classpath at runtime.
am not getting any exceptions,
i've configured everything, but am unable to use the classes in lib as that lib is not listed in java build path.
2 of 2 people found this helpful
If you need them for compile time dependency , then you need to add them manually , as far as I think.
Because adding modules to wildfly just resolve runtime denpendencies
Hi Abhinav, Thanks for the help,it's working now.
Do you think adding all the jar files to one Module will help in resolving internal dependencies? I have 50 some jar files which are needed at run time and they have some internal dependencies.