modules/enterprise/server/appserver/src/main/module-resources/ojdbc6-readme.jar |binary modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-)
New commits: commit bef0cee698306aa8732b7fed719746742fe72783 Author: Jay Shaughnessy jshaughn@redhat.com Date: Tue Feb 5 11:55:49 2013 -0500
[Bug 907407 - RHQ master build fails starting - Failed to load module: deployment.rhq.ear.rhq-enterprise-server-ejb3.jar:main] Server JAR has a dependency on the OJDBC driver because Quartz sometimes needs to load a BLOB class from the driver. Postgres installs will not have (and don't need) the Oracle driver, so we declared the dependency "optional" in jboss-deployment-structure.xml. But "optional" just means AS7 will ignore the fact that the module may not exist at all. Our build and install process is simplified by always creating the oracle driver module structure. But "optional" will not ignore the fact that the module directory is empty (no jar file). So, this commit ensures an empty/mock OJDBC driver jar will be placed in the module directory if the driver is not available at build time.
The JAR has a readme file inside describing the process of how to install a real driver (by providing a wiki link). We felt it was easier to provide the whole structure and just let users drop in the real driver as opposed to not providing the module structure at all, and making them build it. For users following the Oracle setup/prerequiste docs the steps are unchanged. For postgres installs these changes should just make things work.
diff --git a/modules/enterprise/server/appserver/src/main/module-resources/ojdbc6-readme.jar b/modules/enterprise/server/appserver/src/main/module-resources/ojdbc6-readme.jar new file mode 100644 index 0000000..98e0f70 Binary files /dev/null and b/modules/enterprise/server/appserver/src/main/module-resources/ojdbc6-readme.jar differ diff --git a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml index 620a7f9..8e9531b 100644 --- a/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml +++ b/modules/enterprise/server/appserver/src/main/scripts/rhq-container.build.xml @@ -172,8 +172,13 @@ dest="${jboss.modules.dir}" />
<echo>Adding JDBC modules to ${jboss.modules.dir} ...</echo> + <!-- make sure we have an oracle driver jar so the AS7 module is valid and loadable, this is empty --> + <copy file="src/main/module-resources/ojdbc6-readme.jar" + toFile="${jboss.modules.dir}/org/rhq/oracle/main/${ojdbc6.version}/ojdbc6-${ojdbc6.version}.jar" + failonerror="false" verbose="true" /> + <!-- if we have access to the real driver then overwrite the dummy version--> <copy file="${settings.localRepository}/com/oracle/ojdbc6/${ojdbc6.version}/ojdbc6-${ojdbc6.version}.jar" - toDir="${jboss.modules.dir}/org/rhq/oracle/main" failonerror="false" verbose="true" /> + toDir="${jboss.modules.dir}/org/rhq/oracle/main" overwrite="true" failonerror="false" verbose="true" /> <echo file="${jboss.modules.dir}/org/rhq/oracle/main/module.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.1" name="org.rhq.oracle"> <resources>
rhq-commits@lists.fedorahosted.org