Я изменяю процесс сборки проекта OSB 11g, чтобы использовать инструменты configjar вместо строк аргументов ANT.Это я делаю, чтобы сделать сборку на уровне отдельных ресурсов, а не на уровне проекта.Я создал файл настроек и build.xml для того же и пытаюсь построить проект.Кроме того, я установил переменные среды, используя файл osb_env.sh в classpath сервера.Тем не менее я получаю сообщение об ошибке с некоторым классом логгера, для которого я не внес изменений в файлы.
Пожалуйста, смотрите ошибку ниже:
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] -> [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)
Подскажите, пожалуйста, в чем может быть проблема здесь?Пожалуйста, смотрите ниже существующий (рабочий) build.xml и измененный (нерабочий) код build.xml.
(Старый) build.xml:
<target name="buildOsbProject">
<java dir="${osb.home}/lib" jar="${eclipse.home}/plugins/${equinox.launcher.jar}" fork="true" failonerror="true" maxmemory="768m" >
<jvmarg line="-XX:MaxPermSize=256m" />
<arg line="-data ${workspace.dir}" />
<arg line="-application com.bea.alsb.core.ConfigExport" />
<arg line="-configProject OSBInboundServicesConfig" />
<arg line="-configJar ${osbProject.configJar}" />
<arg line="-configSubProjects OSBInboundServices" />
<arg line="-includeDependencies true" />
<arg line="--launcher.library plugins/${equinox.launcher.lib}" />
<sysproperty key="weblogic.home" value="${weblogic.home}" />
<sysproperty key="osb.home" value="${osb.home}" />
<sysproperty key="osgi.bundlefile.limit" value="750" />
<sysproperty key="harvester.home" value="${osb.home}/harvester" />
<sysproperty key="osgi.nl" value="en_US" />
<sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true" />
<sysproperty key="middleware.home" value="${middleware.home}" />
<sysproperty key="com.bea.plateng.common.util.logging.useJDKlogger" value="true"/>
<sysproperty key="java.io.tmpdir" value="/tmp/salosb_tmp"/>
</java>
</target>
(Новая) сборка.xml
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${workspace.dir}/build/lib/ant-contrib.jar"/>
</classpath>
</taskdef>
<!-- Task Definition -->
<taskdef name="configjar" classname="com.bea.alsb.tools.configjar.ant.ConfigJarTask">
<classpath>
<pathelement location="${osb.home}/tools/configjar/configjar.jar"/>
</classpath>
</taskdef>
<!-- This is the classpath for java runtime-->
<path id="classpath.java">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="createSbConfigJar">
<echo>OSB project config creation started</echo>
<property name="settingsFileFull" value="${workspace.dir}/build/settings-file.xml"/>
<property name="targetDirectory" value="${workspace.dir}/build"/>
<configjar debug="false" failonerror="true" errorProperty="" settingsFile="${settingsFileFull}"/>
</target>
<target name="buildDeployExportDelete" depends="clean,copylibs,createSbConfigJar,deleteFromOSB, prepareCustomization, importToOSB, setAuthorizationInformation,exportFromOSB">
<antcall target="deleteFromOSB">
</antcall>
</target>
settings-file.xml
<configjarSettings xmlns="http://www.bea.com/alsb/tools/configjar/config">
<source>
<project dir="${workspace.dir}/OSBInboundServices"/>
<system dir="${workspace.dir}/OSBInboundServicesConfig"/>
</source>
<configjar jar="${workspace.dir}/sbconfig.jar" overwrite="true">
<projectLevel includeSystem="true"/>
</configjar>
</configjarSettings>
OSB_Env.sh
#!/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
CLASSPATH = $ CLASSPATH: $ MW_HOME / oracle_common / modules / oracle.http_client_11.1.1.jar: $ MW_HOME / oracle_common / модули / oracle.xdk_11.1.0 / xmlparserv2.jar: $ MW_HOME / oracle_common / модули / oracle.webservices_11.1.1 / orawsdl.jar: $ MW_HOME / oracle_common / модули / oracle.wsm.common_11.1.1 / wsm-dependencies.jar
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
CLASSPATH=$CLASSPATH:$CONFIGJAR_HOME/configjar.jar:$CONFIGJAR_HOME/L10N
export CLASSPATH