Thursday, August 16, 2012

OSB 11g ANT Build Scripts

Please reference to the follow blog.
http://biemond.blogspot.ca/2010/07/osb-11g-ant-deployment-scripts.html

Notes:
Use setDomainEnv.cmd to set the env properly.

http://www.javamonamour.org/2011/07/oracle-service-bus-configuration-jar.html

https://cn.forums.oracle.com/forums/thread.jspa?threadID=943099

Problem
In general this OSB export works fine, this error occures only if any OSB project contains proxy/business services using JCA transport e.g. used by the DB or SAP adapter.
Solution Summary
Add system property "com.bea.plateng.common.util.logging.useJDKlogger" set to "true" for configexport task, so that ANT target body look like:


<java \[...] jar="\[...]/org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar">
\[...]
<sysproperty key="com.bea.plateng.common.util.logging.useJDKlogger" value="true"/>
</java>


Solution Description
The problem is in OSB module "com.bea.cie.comdev", which provides custom logging abstraction classes. Class com.bea.plateng.common.util.logging.LogFactory dynamically detects log4j library. If it is found, returns Log4jLogger, otherwise Jdk14Logger. The problem is that it uses context class loader for log4j detection and current class loader for Log4jLogger instantiation. In runtime, detection finds log4j installed in plugins/ directory (version 1.2.13), but instantiation finds none.

Specified parameter disables log4j detection.