本节介绍与 Application Server 8.2 产品附带的样例代码相关的已知问题和相应的解决方法。
在 <install_dir>/samples/webservices/jaxrpc/apps/managementws 上运行检验器时,将会出现以下警告消息:
[exec] WARNING: /var/tmp/exploded20051214111425/managementws/ \ managementwsEjb_jar contains library/castor-0.9.3.9-xml.jar in Class-Path manifest attribute, but it is not found in ear file [exec] Dec 14, 2005 11:14:30 AM Archive getBundledArchives [exec] WARNING: /var/tmp/exploded20051214111425/managementws/ \ managementwsEjb_jar contains library/castor-0.9.3.9-xml.jar in Class-Path manifest attribute, but it is not found in ear file |
已在 Application Server 8.2 发行版中更新了 Castor jar,因此对旧的 castor-0.9.3.9-xml.jar 的所有引用应更改为指向新的 castor-0.9.9.1.jar。具体来讲,需要将 MANIFEST.MF 文件中的引用更改为使用 castor-0.9.9.1.jar 而不是使用旧的 castor-0.9.3.9-xml.jar。
将以下对旧的 Castor jar 的引用更改为指向新的 Castor jar:
旧的:
src/conf/MANIFEST.MF:Class-Path: library/castor-0.9.3.9-xml.jar src/conf/MANIFEST.MF:Name: library/castor-0.9.3.9-xml.jar managementws-ejb/src/conf/MANIFEST.MF:Class-Path: \ library/castor-0.9.3.9-xml.jar |
新的:
src/conf/MANIFEST.MF:Class-Path: library/castor-0.9.9.1.jar src/conf/MANIFEST.MF:Name: library/castor-0.9.9.1.jar managementws-ejb/src/conf/MANIFEST.MF:Class-Path: \ library/castor-0.9.9.1.jar |
然后,清除 build.xml 文件,这样就不会通过该文件在部署期间将 Castor .jar 复制到 install_dir/lib,以及在取消部署期间删除 Castor .jar。以下是新旧 build.xml 文件的不同之处。
% cvs diff build.xml Index: build.xml
===================================================================
RCS file: /m/jws/samples/samples8x/webservices/jaxrpc/apps/managementws/ \
managementws-standalone-client/ Attic/build.xml,v retrieving revision \
1.1.2.3
diff -r1.1.2.3 build.xml
80,89d79
< <target name="remove_castor_from_classpath">
< <delete file="${com.sun.aas.installRoot}/lib/castor-0.9.9.1.jar"/>
< </target>
< <target name="add_castor_to_classpath">
< <delete file="${com.sun.aas.installRoot}/lib/castor-0.9.9.1.jar"/>
< <copy file="../lib/castor-0.9.9.1.jar" \
todir="${com.sun.aas.installRoot}/lib" />
< </target>
<
< <target name="setup" depends="add_castor_to_classpath, restart.server"/>
< jbenoit/galapago 196 >pwd
/net/galapago.east/files/share/8.2ws/samples/samples8x/webservices/jaxrpc \
/apps/managementws/managementws-standalone-client
jbenoit/galapago 197 >cd ..
jbenoit/galapago 198 >cvs diff build.xml
Index: build.xml
===================================================================
RCS file: /m/jws/samples/samples8x/webservices/jaxrpc/apps/managementws/ \
Attic/build.xml
v retrieving revision 1.1.2.4
diff -r1.1.2.4 build.xml
28,36d27
< <target name="setup">
< <ant antfile="build.xml" inheritAll="true" dir="${sample.name}$ \
{standalone-client-dir-suffix}" target="setup"/>
< </target>
<
< <target name="unsetup">
< <ant antfile="build.xml" inheritAll="true" dir="${sample.name}$ \
{standalone-client-dir-suffix}" target="remove_castor_from_classpath"/>
< </target>
<
<
53,54c44,45
< <target name="deploy" depends="select_binary_common, deploy_common,
setup" />
< <target name="undeploy" depends="init, undeploy_common, unsetup"/>
---
> <target name="deploy" depends="select_binary_common, deploy_common" />
> <target name="undeploy" depends="init, undeploy_common"/>