title: Getting NoClassDefFoundError in Configjar execution when building OSB project using ANT
body: <p>I am changing my OSB 11g project build process to use configjar tools instead of ANT argument lines. This I am doing to make the build at individual resource level instead of project level.
  I have created settings file and build.xml for the same and trying to build the project. Also, I have set the environment variables using osb_env.sh file in the server classpath. 
  Still I am getting error with some logger class for which I have done no changes in the files.</p>
  
  <p>Please see error below:</p>
  
  <pre><code>clean:
  
  copylibs:
  
  createSbConfigJar:
       [echo] OSB project config creation started
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO] 
  [INFO] de:osb-services ......................... SUCCESS [1.000s]
  [INFO] de.osb-services:base64 .................. SUCCESS [3.459s]
  [INFO] de.osb-services:logging-common .......... SUCCESS [0.699s]
  [INFO] de.osb-services:logging ................. SUCCESS [2.884s]
  [INFO] de.osb-services:loggingOutbound ......... SUCCESS [1.396s]
  [INFO] de.osb-services:monitoring .............. SUCCESS [1.038s]
  [INFO] de.osb-services:build ................... FAILURE [0.572s]
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 11.546s
  [INFO] Finished at: Wed Jun 12 12:42:49 CEST 2019
  [INFO] Final Memory: 16M/249M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (deploy) on project build: An Ant BuildException has occured: The following error occurred while executing this line:
  [ERROR] /pkg/vddi9/home/oradi9/jenkins/jenkins-data/workspace/OSB-R19.9_dev_test_7/build/build.xml:38: java.lang.NoClassDefFoundError: weblogic/i18n/logging/NonCatalogLogger: weblogic.i18n.logging.NonCatalogLogger
  [ERROR] -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (deploy) on project build: An Ant BuildException has occured: The following error occurred while executing this line:
  /pkg/vddi9/home/oradi9/jenkins/jenkins-data/workspace/OSB-R19.9_dev_test_7/build/build.xml:38: java.lang.NoClassDefFoundError: weblogic/i18n/logging/NonCatalogLogger
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
  Caused by: org.apache.maven.plugin.MojoExecutionException: An Ant BuildException has occured: The following error occurred while executing this line:
  /pkg/vddi9/home/oradi9/jenkins/jenkins-data/workspace/OSB-R19.9_dev_test_7/build/build.xml:38: java.lang.NoClassDefFoundError: weblogic/i18n/logging/NonCatalogLogger
      at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:131)
      at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:98)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
  </code></pre>
  
  <p>Can you please tell what can be the issue here?
  Please see below the existing (working) build.xml and changed(non-working) build.xml code.</p>
  
  <p>(Old) build.xml:</p>
  
  <pre><code>&lt;target name="buildOsbProject"&gt;
  
          &lt;java dir="${osb.home}/lib" jar="${eclipse.home}/plugins/${equinox.launcher.jar}" fork="true" failonerror="true" maxmemory="768m" &gt;
              &lt;jvmarg line="-XX:MaxPermSize=256m" /&gt;
              &lt;arg line="-data ${workspace.dir}" /&gt;
              &lt;arg line="-application com.bea.alsb.core.ConfigExport" /&gt;
              &lt;arg line="-configProject OSBInboundServicesConfig" /&gt;
              &lt;arg line="-configJar ${osbProject.configJar}" /&gt;
              &lt;arg line="-configSubProjects OSBInboundServices" /&gt;
              &lt;arg line="-includeDependencies true" /&gt;
              &lt;arg line="--launcher.library plugins/${equinox.launcher.lib}" /&gt;
              &lt;sysproperty key="weblogic.home" value="${weblogic.home}" /&gt;
              &lt;sysproperty key="osb.home" value="${osb.home}" /&gt;
              &lt;sysproperty key="osgi.bundlefile.limit" value="750" /&gt;
              &lt;sysproperty key="harvester.home" value="${osb.home}/harvester" /&gt;
              &lt;sysproperty key="osgi.nl" value="en_US" /&gt;
              &lt;sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true" /&gt;
              &lt;sysproperty key="middleware.home" value="${middleware.home}" /&gt;
              &lt;sysproperty key="com.bea.plateng.common.util.logging.useJDKlogger" value="true"/&gt;
              &lt;sysproperty key="java.io.tmpdir" value="/tmp/salosb_tmp"/&gt;
          &lt;/java&gt;
      &lt;/target&gt;
  </code></pre>
  
  <p>(New) build.xml</p>
  
  <pre><code>    &lt;taskdef resource="net/sf/antcontrib/antlib.xml"&gt;
          &lt;classpath&gt;
              &lt;pathelement location="${workspace.dir}/build/lib/ant-contrib.jar"/&gt;
          &lt;/classpath&gt;
      &lt;/taskdef&gt;
  
      &lt;!--    Task Definition     --&gt;
      &lt;taskdef name="configjar" classname="com.bea.alsb.tools.configjar.ant.ConfigJarTask"&gt;
          &lt;classpath&gt;   
              &lt;pathelement location="${osb.home}/tools/configjar/configjar.jar"/&gt;
          &lt;/classpath&gt;
      &lt;/taskdef&gt;
  
      &lt;!-- This is the classpath for java runtime--&gt;
      &lt;path id="classpath.java"&gt;
          &lt;fileset dir="lib"&gt;
              &lt;include name="*.jar"/&gt;
          &lt;/fileset&gt;
      &lt;/path&gt;
  
      &lt;target name="createSbConfigJar"&gt;
          &lt;echo&gt;OSB project config creation started&lt;/echo&gt;
          &lt;property name="settingsFileFull" value="${workspace.dir}/build/settings-file.xml"/&gt;
          &lt;property name="targetDirectory" value="${workspace.dir}/build"/&gt;       
          &lt;configjar debug="false" failonerror="true" errorProperty="" settingsFile="${settingsFileFull}"/&gt;   
      &lt;/target&gt;
  
  &lt;target name="buildDeployExportDelete" depends="clean,copylibs,createSbConfigJar,deleteFromOSB, prepareCustomization, importToOSB, setAuthorizationInformation,exportFromOSB"&gt;
          &lt;antcall target="deleteFromOSB"&gt;
          &lt;/antcall&gt;
      &lt;/target&gt;
  </code></pre>
  
  <p>settings-file.xml</p>
  
  <pre><code>&lt;configjarSettings xmlns="http://www.bea.com/alsb/tools/configjar/config"&gt;
  
      &lt;source&gt;
      &lt;project dir="${workspace.dir}/OSBInboundServices"/&gt;
      &lt;system  dir="${workspace.dir}/OSBInboundServicesConfig"/&gt;
    &lt;/source&gt;
  
      &lt;configjar jar="${workspace.dir}/sbconfig.jar" overwrite="true"&gt;
          &lt;projectLevel includeSystem="true"/&gt;
      &lt;/configjar&gt;
  
  &lt;/configjarSettings&gt;
  </code></pre>
  
  <p>OSB_Env.sh</p>
  
  <pre><code>#!/bin/sh
  
  export MW_HOME=/pkg/home/nonarch/Oracle/Middleware
  export OSB_HOME=/pkg/home/nonarch/Oracle/Middleware/Oracle_OSB1
  export JAVA_HOME=/opt/java6
  export BEA_HOME=$MW_HOME
  export WL_HOME=$MW_HOME/wlserver_10.3
  export WLS_VER=10.3
  export COMMON_COMPONENTS_HOME=$MW_HOME/oracle_common
  export MODULES_DIR=$MW_HOME/modules
  
  export PATH=$WL_HOME/server/bin:$JAVA_HOME/jre/bin:$JAVA_HOME/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
  export MEM_ARGS="-Xms32m -Xmx200m -XX:MaxPermSize=128m"
  
  export CONFIGJAR_HOME="$OSB_HOME/tools/configjar"
  export JAVA_OPTS="-Dosb.home=$OSB_HOME -Dweblogic.home=$WL_HOME"
  export JAVA_OPTIONS=" -Xverify:none"
  
  CLASSPATH=$MW_HOME/modules/features/weblogic.server.modules_10.3.6.0.jar
  
  CLASSPATH=$CLASSPATH:$WL_HOME/server/lib/weblogic.jar
  </code></pre>
  
  <p>CLASSPATH=$CLASSPATH:$MW_HOME/oracle_common/modules/oracle.http_client_11.1.1.jar:$MW_HOME/oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar:$MW_HOME/oracle_common/modules/oracle.webservices_11.1.1/orawsdl.jar:$MW_HOME/oracle_common/modules/oracle.wsm.common_11.1.1/wsm-dependencies.jar</p>
  
  <p>CLASSPATH=$CLASSPATH:$OSB_HOME/modules/features/osb.server.modules_11.1.1.7.jar:$OSB_HOME/soa/modules/oracle.soa.common.adapters_11.1.1/oracle.soa.common.adapters.jar:$OSB_HOME/lib/external/log4j_1.2.8.jar:$OSB_HOME/lib/alsb.jar</p>
  
  <pre><code>CLASSPATH=$CLASSPATH:$CONFIGJAR_HOME/configjar.jar:$CONFIGJAR_HOME/L10N
  
  export CLASSPATH
  </code></pre>