-
1. Re: Set JBoss AS 7.1.1 java.class.path
jameslivingston Aug 26, 2012 11:34 PM (in response to peterwkc)What are you trying to achieve by setting the classpathh? AS 7 uses modular class loading (JBoss Modules) which means that adding classes to the class load usually isn't what you want to do.
If you want classes available automatically to all deployments, you might want a global module (https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-GlobalModules), but if you can explain the problem you're trying to solve there may be a better way.
-
2. Re: Set JBoss AS 7.1.1 java.class.path
peterwkc Aug 26, 2012 11:45 PM (in response to jameslivingston)The reason i would like to set class path is because I have a Web service EAR composes of WAR and odjbc6.jar is composes inside WAR project and there is SQLException: No suitable driver found for connection. I had verified the connection url is correct.
I don't want global modules class loading.
More info from here: SQLException
Thanks.
-
3. Re: Set JBoss AS 7.1.1 java.class.path
jameslivingston Aug 27, 2012 12:05 AM (in response to peterwkc)You shouldn't really package JDBC drivers inside a WAR, with any version. It can problems especially when you use hot-deployment, because DriverManager is global.
If it's JDBC4 compliant, you can just add the driver as a deployment - https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-InstalltheJDBCdriverasadeployment
If it's not JDBC 4 compliant, you can install it as a module - https://docs.jboss.org/author/display/AS7/Developer+Guide#DeveloperGuide-InstalltheJDBCdriverasacoremodule