Well, I could try, but JdbcOdbcDriver it's a class that comes included on the JDK for windows (It's inside the "rt.jar", along with every other common java class). I can't put all the rt.jar as module, as it would be a module loading almost every java class. You must be aware that in rt.jar came all the "java.lang" (Including String, Long, Exception, etc) and a lot of other packages that comes with the default java instalation. I don't tryed it because I thought it woul be problematic to load all the java resources twice.
I searched on the net, but the pure java JDBC drivers existing for MS Acces are all commecial, and my boss is not going to pay for nothing, so I can't use any of it as module. I need to use the original "sun.jdbc.odbc.JdbcOdbcDriver" included freely on the Sun Java Virtual Machine (Now Oracle Java Virtual Machine).
I was able to work around this by altering the standalone.conf.bat with the following line:
rem # Make Byteman classes visible in all module loaders
rem # This is necessary to inject Byteman rules into AS7 deployments
rem # This allows for the JdbcOdbcDriver to be seen by the classloader
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman,sun.jdbc"
Not sure if this is the official solution, but I hope that it gets the ball rolling towards one.
I haven't checked if this is actually working, but have you considered adding a module defined like this ?
<module xmlns="urn:jboss:module:1.1" name="com.sun.jdbc.odbc">
Sure, my situation is nearly identical to the original post. I am trying to port an ear deployment from JBoss 5.1.0.GA to 7.1.1.Final, running on Windows 7 x64 on JDK 1.7.0_03x86. In my ear, I have a MBean setup to connect to an access database that is on the local disk. Here is the exception that I recieve:
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver from [Module "deployment.***.ear:main" from Service Module Loader]
at java.lang.Class.forName0(Native Method)
That line of code is:
This code is located in a fairly common piece of our multiple deployments, so I would like to avoid any changes to code. I believe that this should be able to be accomplished via configuration.
As stated before, I am currently able to work around the issue by adding "sun.jdbc" to the "jboss.modules.system.pkgs" property in the standalone.conf.bat, which allows for the JBoss "system" classloader to find the appropriate classfile in the JDK. Unfortunately, the more desirable solution of create a new module (as also posted above) didn't work.