Bug 796739 - Missing service provider configuration files in the woodstox jar files
Summary: Missing service provider configuration files in the woodstox jar files
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: woodstox-core
Version: 19
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-23 15:22 UTC by Juan Hernández
Modified: 2016-02-01 01:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-19 09:59:40 UTC


Attachments (Terms of Use)

Description Juan Hernández 2012-02-23 15:22:35 UTC
Description of problem:

The jar files provided in the woodstox-jar package don't contain the service provider configuration files needed to use the 

Version-Release number of selected component (if applicable):

woodstox-core-4.1.2-2.fc17.x86_64

How reproducible:

Always.

Steps to Reproduce:

1. Write and compile the following java program:

import javax.xml.stream.XMLInputFactory;

public class Test {
  public static void main(String[] args) throws Exception {
    System.out.println(XMLInputFactory.newInstance());
  }
}

2. Run it with the version of the "woodstox-core-asj.jar" provided by the RPM:

$ java -cp $(build-classpath woodstox-core stax2-api):. Test
  
Actual results:

com.sun.xml.internal.stream.XMLInputFactoryImpl@605df3c5

It is using the internal implementation provided by the JDK.

Expected results:

com.ctc.wstx.stax.WstxInputFactory@a5ae1e7

It should use the implementation provided by the woodstox-core package.

Additional info:

I believe that the problem is that the service provider configuration files that are available in the source of the package in the "src/resources" directory are not copied to the "META-INF/services" directory of the generated jar files.

This can be fixed with the following patch for the spec:

--- a/woodstox-core.spec
+++ b/woodstox-core.spec
@@ -64,7 +64,6 @@ sed -i "s/@REQ_STAX2_VERSION@/%{stax2_ver}/g" pom.xml pom-lgpl.xml
 # removing bundled stuff
 rm -rf lib
 rm -rf src/maven
-rm -rf src/resources
 rm -rf src/samples
 rm -rf src/java/org
 rm -rf src/test/org
@@ -76,6 +75,11 @@ mv -f src/java src/main/
 mkdir src/test/java
 mv -f src/test/wstxtest src/test/java/
 
+# Make sure that the service provider configuration files end up
+# in the META-INF/services directory of the resulting jar files:
+mkdir -p src/main/resources/META-INF/services
+cp src/resources/* src/main/resources/META-INF/services/.
+
 %build
 # stax2 missing -> cannot compile tests -> tests skipped
 mvn-rpmbuild -Dmaven.test.skip=true \

Comment 1 Fedora End Of Life 2013-04-03 15:10:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 2 Fedora End Of Life 2015-01-09 17:01:50 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.