Bug 681367

Summary: xml-commons-apis.jar dependency
Product: Red Hat Enterprise Linux 6 Reporter: Matthew Harmsen <mharmsen>
Component: pki-coreAssignee: Matthew Harmsen <mharmsen>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1CC: alee, benl, dpal, jdennis, jgalipea, shaines
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pki-core-9.0.3-5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 680420 Environment:
Last Closed: 2011-05-19 13:44:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 680420    
Bug Blocks:    
Attachments:
Description Flags
Patch + spec file changes awnuk: review+

Description Matthew Harmsen 2011-03-01 23:07:30 UTC
+++ This bug was initially created as a clone of Bug #680420 +++

Fedora 15 has brought to light a new jar dependency. We use xerces-j2 for xml parsing. xerces-j2 has a dependency on xml-commons-apis.jar which we had not previously been making available to the webapp class loader.

We had not detected a need for xml-commons-apis because we had not seen any NoClassDefFound errors related to it. The xerces project does not document their jar dependencies but the upstream source has a clear reference to it as a dependency. Therefore since we're using xerces-j2 we should have always provided the xml-commons-apis and it is technically correct to provide it even in OS versions were we had not previously seen a NoClassDefFound error related to the xml-commons-apis.jar contents because it is a defined dependency.

--- Additional comment from jdennis on 2011-02-25 08:55:16 EST ---

Created attachment 480999 [details]
provide xml-commons-apis.jar to webapp classloader

--- Additional comment from jdennis on 2011-03-01 18:05:15 EST ---

Sending        base/setup/pkicreate
Transmitting file data .
Committed revision 1874.

Comment 1 Matthew Harmsen 2011-03-02 19:58:07 UTC
IPA_v2_RHEL_6_1_ERRATA_BRANCH:

# cd pki

# svn status | grep -v ^$ | grep -v ^P | grep -v ^X | grep -v ^?
M       base/setup/pkicreate

# svn commit base/setup/pkicreate
Sending        base/setup/pkicreate
Transmitting file data .
Committed revision 1875.

Comment 2 Matthew Harmsen 2011-03-02 21:55:10 UTC
Extrapolating from Bugzilla Bug #676873:

    ./pki/scripts/pki_patch_maker 1865 1875 pki-core 9.0.3
        pki-core-9.0.3-r1875.patch

Comment 3 Matthew Harmsen 2011-03-02 22:07:36 UTC
Created attachment 481952 [details]
Patch + spec file changes

Comment 4 Matthew Harmsen 2011-03-02 22:15:42 UTC
IPA_v2_RHEL_6_1_ERRATA_BRANCH:

# cd pki

# svn status | grep -v ^$ | grep -v ^P | grep -v ^X | grep -v ^?
A       patches/pki-core-9.0.3-r1875.patch
M       specs/pki-core.spec

# svn commit
Adding         patches/pki-core-9.0.3-r1875.patch
Sending        specs/pki-core.spec
Transmitting file data ..
Committed revision 1876.

Comment 6 Matthew Harmsen 2011-03-04 19:35:52 UTC
Published patch to http://pki.fedoraproject.org/pki/sources/pki-core/

Comment 7 Jenny Severance 2011-04-18 18:06:42 UTC
Is this sufficient to verify this issue?

# yum deplist xerces-j2
Loaded plugins: product-id, subscription-manager
Updating Red Hat repositories.
Finding dependencies: 
package: xerces-j2.x86_64 2.7.1-12.5.el6
  dependency: xml-commons-resolver >= 1.1
   provider: xml-commons-resolver.x86_64 1.1-4.18.el6
  dependency: libgcj_bc.so.1()(64bit)
   provider: libgcj.x86_64 4.4.5-6.el6
  dependency: libdl.so.2()(64bit)
   provider: glibc.x86_64 2.12-1.25.el6
  dependency: java-gcj >= 1.5.0
   provider: java-1.5.0-gcj.x86_64 1.5.0.0-29.1.el6
  dependency: libz.so.1()(64bit)
   provider: zlib.x86_64 1.2.3-25.el6
  dependency: rtld(GNU_HASH)
   provider: glibc.i686 2.12-1.25.el6
   provider: glibc.x86_64 2.12-1.25.el6
  dependency: librt.so.1()(64bit)
   provider: glibc.x86_64 2.12-1.25.el6
  dependency: libm.so.6()(64bit)
   provider: glibc.x86_64 2.12-1.25.el6
  dependency: libc.so.6()(64bit)
   provider: glibc.x86_64 2.12-1.25.el6
  dependency: xml-commons-apis >= 1.3
   provider: xml-commons-apis.x86_64 1.3.04-3.6.el6
  dependency: libgcc_s.so.1(GCC_3.0)(64bit)
   provider: libgcc.x86_64 4.4.5-6.el6
  dependency: /bin/sh
   provider: bash.x86_64 4.1.2-8.el6
  dependency: libpthread.so.0()(64bit)
   provider: glibc.x86_64 2.12-1.25.el6
  dependency: libc.so.6(GLIBC_2.2.5)(64bit)
   provider: glibc.x86_64 2.12-1.25.el6
  dependency: libgcc_s.so.1()(64bit)
   provider: libgcc.x86_64 4.4.5-6.el6
  dependency: chkconfig
   provider: chkconfig.x86_64 1.3.47-1.el6

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.1 Beta (Santiago)

Comment 8 John Dennis 2011-04-18 18:41:27 UTC
remove the symlink to xml-commons-apis.jar from wherever it appears under /var/lib/pki-ca

Comment 9 Jenny Severance 2011-04-18 20:17:36 UTC
Verified

version:
pki-ca-9.0.3-10.el6.noarch

ls -al /var/lib/pki-ca/webapps/ca/WEB-INF/lib/xml-commons-apis.jar
lrwxrwxrwx. 1 pkiuser pkiuser 36 Apr 18 16:00 /var/lib/pki-ca/webapps/ca/WEB-INF/lib/xml-commons-apis.jar -> /usr/share/java/xml-commons-apis.jar

Removing this symlink causes the following on removing the pki instance ..

Unconfiguring CA
root        : CRITICAL failed to uninstall CA instance Command '/usr/bin/pkiremove -pki_instance_root=/var/lib -pki_instance_name=pki-ca --force' returned non-zero exit status 255


[2011-04-18 16:07:52] [debug] remove_file(/var/lib/pki-ca/webapps/ca/WEB-INF/lib/jakarta-commons-collections.jar)
[2011-04-18 16:07:52] [error] remove_file(): failed to remove file "/var/lib/pki-ca/webapps/ca/WEB-INF/lib/jakarta-commons-collections.jar" (No such file or directory)
[2011-04-18 16:07:52] [debug] remove_file(/var/lib/pki-ca/webapps/ca/WEB-INF/lib/jakarta-commons-lang.jar)
[2011-04-18 16:07:52] [error] remove_file(): failed to remove file "/var/lib/pki-ca/webapps/ca/WEB-INF/lib/jakarta-commons-lang.jar" (No such file or directory)
[2011-04-18 16:07:52] [debug] remove_file(/var/lib/pki-ca/webapps/ca/WEB-INF/lib/ldapjdk.jar)
[2011-04-18 16:07:52] [error] remove_file(): failed to remove file "/var/lib/pki-ca/webapps/ca/WEB-INF/lib/ldapjdk.jar" (No such file or directory)
[2011-04-18 16:07:52] [debug] remove_file(/var/lib/pki-ca/webapps/ca/WEB-INF/lib/osutil.jar)
[2011-04-18 16:07:52] [error] remove_file(): failed to remove file "/var/lib/pki-ca/webapps/ca/WEB-INF/lib/osutil.jar" (No such file or directory)
[2011-04-18 16:07:52] [debug] remove_file(/var/lib/pki-ca/webapps/ca/WEB-INF/lib/pki-ca.jar)
[2011-04-18 16:07:52] [error] remove_file(): failed to remove file "/var/lib/pki-ca/webapps/ca/WEB-INF/lib/pki-ca.jar" (No such file or directory)
[2011-04-18 16:07:52] [debug] remove_file(/var/lib/pki-ca/webapps/ca/WEB-INF/lib/pki-certsrv.jar)
[2011-04-18 16:07:52] [error] remove_file(): failed to remove file "/var/lib/pki-ca/webapps/ca/WEB-INF/lib/pki-certsrv.jar" (No such file or directory)
[2011-04-18 16:07:52] [debug] remove_file(/var/lib/pki-ca/webapps/ca/WEB-INF/lib/pki-cms.jar)
[2011-04-18 16:07:52] [error] remove_file(): failed to remove file "/var/lib/pki-ca/webapps/ca/WEB-INF/lib/pki-cms.jar" (No such file or directory)
[2011-04-18 16:07:52] [debug] remove_file(/var/lib/pki-ca/webapps/ca/WEB-INF/lib/pki-cmsbundle.jar)

Comment 10 errata-xmlrpc 2011-05-19 13:44:08 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0627.html