public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/20941] New: Incorrect case for META-INF with fastjar
@ 2005-04-11  8:08 phil at mkdoc dot com
  2005-04-11  8:11 ` [Bug java/20941] " phil at mkdoc dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: phil at mkdoc dot com @ 2005-04-11  8:08 UTC (permalink / raw)
  To: java-prs

This case came to light making service provider property files for
GNU JAXP: org.xml.sax.driver etc. These should be created in the 
META-INF/services path of the JAR. Reproduce this error by creating a 
META-INF/services directory at the root of your compiled class hierarchy and 
adding one or more property files (attached) and call fastjar without the M 
argument. Compiled classes in /build with the service provider at:

/build/META-INF/services/org.xml.sax.driver

cd /build

jar cvf /lib/gnu-jaxp.jar .

GNU fastjar takes the file system directory name META-INF and 
correctly creates the service provider directory in the JAR, but it 
also creates a default manifest file at meta-inf/Manifest.mf.

When I run my JAXP application with gij, it seems to read meta-inf 
by default, ignore the META-INF path and cannot resolve a SAX driver to
instantiate. If I suppress the default manifest with the fastjar M
argument, no lowercase meta-inf path is created, the uppercase META-INF
path is processed and the SAX driver is loaded.

jar cvfM /lib/gnu-jaxp.jar .

The Sun JAR specification [1] does not say META-INF must be 
uppercase, but all the examples are in upper case and broader reading
suggests that uppercase path is expected. The attached test case confirms the 
Sun JVM expects an uppercase META-INF, so it seems gij is not at fault.

gij --classpath .:$CLASSPATH:/lib/gnu-jaxp.jar XMLReaderTest

java -classpath g:\lib\gnu-jaxp.jar XMLReaderTest

XMLReader created with hard-coded value.



[1] http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html

-- 
           Summary: Incorrect case for META-INF with fastjar
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: phil at mkdoc dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug java/20941] Incorrect case for META-INF with fastjar
  2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
@ 2005-04-11  8:11 ` phil at mkdoc dot com
  2005-04-11  8:56 ` phil at mkdoc dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: phil at mkdoc dot com @ 2005-04-11  8:11 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From phil at mkdoc dot com  2005-04-11 08:11 -------
Created an attachment (id=8583)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8583&action=view)
SAX driver service provider file

Driver class: gnu.xml.aelfred2.SAXDriver

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug java/20941] Incorrect case for META-INF with fastjar
  2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
  2005-04-11  8:11 ` [Bug java/20941] " phil at mkdoc dot com
@ 2005-04-11  8:56 ` phil at mkdoc dot com
  2005-04-11  9:13 ` phil at mkdoc dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: phil at mkdoc dot com @ 2005-04-11  8:56 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From phil at mkdoc dot com  2005-04-11 08:56 -------
Created an attachment (id=8584)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8584&action=view)
Test case for org.xml.sax.driver service provider property

First checks any service provider configuration using
XMLReaderFactory.createXMLReader(), then with a system property or a hard coded
value to confirm the class can be loaded one way or another.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug java/20941] Incorrect case for META-INF with fastjar
  2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
  2005-04-11  8:11 ` [Bug java/20941] " phil at mkdoc dot com
  2005-04-11  8:56 ` phil at mkdoc dot com
@ 2005-04-11  9:13 ` phil at mkdoc dot com
  2005-04-11  9:18 ` phil at mkdoc dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: phil at mkdoc dot com @ 2005-04-11  9:13 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From phil at mkdoc dot com  2005-04-11 09:13 -------
Created an attachment (id=8585)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8585&action=view)
GNU JAXP pure Java source, no natives

GNU JAXP source classes, compile using the attached script.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug java/20941] Incorrect case for META-INF with fastjar
  2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
                   ` (2 preceding siblings ...)
  2005-04-11  9:13 ` phil at mkdoc dot com
@ 2005-04-11  9:18 ` phil at mkdoc dot com
  2005-04-11  9:21 ` phil at mkdoc dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: phil at mkdoc dot com @ 2005-04-11  9:18 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From phil at mkdoc dot com  2005-04-11 09:18 -------
Created an attachment (id=8586)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8586&action=view)
GCJ compile script for GNU JAXP

Compiles GNU JAXP source to classes. Requires environment variables $mk_home, a
path in which the source is at $mk_home/lib-src/jaxp, and $mk_build, which is a
temporary build directory.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug java/20941] Incorrect case for META-INF with fastjar
  2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
                   ` (3 preceding siblings ...)
  2005-04-11  9:18 ` phil at mkdoc dot com
@ 2005-04-11  9:21 ` phil at mkdoc dot com
  2005-04-11  9:23 ` phil at mkdoc dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: phil at mkdoc dot com @ 2005-04-11  9:21 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From phil at mkdoc dot com  2005-04-11 09:21 -------
Created an attachment (id=8587)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8587&action=view)
Fastjar archive script for GNU JAXP

Creates a JAR of the compiled GNU JAXP classes. Requires environment variables
$mk_home, a path in which the source is at $mk_home/lib-src/jaxp, and
$mk_build, which is a temporary build directory.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug java/20941] Incorrect case for META-INF with fastjar
  2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
                   ` (4 preceding siblings ...)
  2005-04-11  9:21 ` phil at mkdoc dot com
@ 2005-04-11  9:23 ` phil at mkdoc dot com
  2005-04-11  9:47 ` phil at mkdoc dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: phil at mkdoc dot com @ 2005-04-11  9:23 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From phil at mkdoc dot com  2005-04-11 09:23 -------
Created an attachment (id=8588)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8588&action=view)
Check you have the necessary environment variables

Checks the $mk_home and $mk_build environment variables are set.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug java/20941] Incorrect case for META-INF with fastjar
  2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
                   ` (5 preceding siblings ...)
  2005-04-11  9:23 ` phil at mkdoc dot com
@ 2005-04-11  9:47 ` phil at mkdoc dot com
  2005-04-11 12:57 ` [Bug libgcj/20941] " pinskia at gcc dot gnu dot org
  2005-05-30 15:35 ` [Bug fastjar/20941] " pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: phil at mkdoc dot com @ 2005-04-11  9:47 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From phil at mkdoc dot com  2005-04-11 09:47 -------
Lots of attachments, but it's simple really:

1. Set two environment variables: $mk_home, a path in which the source is at 
$mk_home/lib-src/jaxp, and $mk_build, which is a temporary build directory

2. Put all the bash scripts in the same directory, say $mk_home/bin (chmod +x)

3. Extract the GNU JAXP source to $mk_home/lib-src/jaxp

4. Run $mk_home/bin/jar-jaxp.sh to compile and archive the classes: the JAR is 
created at $mk_home/lib/gnu-jaxp.jar

5. Compile XMLReaderTest.java with $mk_home/lib/gnu-jaxp.jar in the classpath.

6. Run XMLReaderTest with with $mk_home/lib/gnu-jaxp.jar in the classpath, 
default package, no arguments.

The source JAR does not include the service provider directory. To test with the 
service provider:

7. Save the service provider file at $mk_home/lib-src/META-INF/services/org.xml.
sax.driver

8. Re-run $mk_home/bin/jar-jaxp.sh

9. Re-run XMLReaderTest with with $mk_home/lib/gnu-jaxp.jar in the classpath.

To test fastjar with the M argument, add it to $mk_home/jar-jaxp.sh and repeat 7 
and 8 above.


Correction to my original report: the Sun JVM is case insensitive to META-INF, 
gij is case sensitive.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libgcj/20941] Incorrect case for META-INF with fastjar
  2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
                   ` (6 preceding siblings ...)
  2005-04-11  9:47 ` phil at mkdoc dot com
@ 2005-04-11 12:57 ` pinskia at gcc dot gnu dot org
  2005-05-30 15:35 ` [Bug fastjar/20941] " pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-11 12:57 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|java                        |libgcj


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug fastjar/20941] Incorrect case for META-INF with fastjar
  2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
                   ` (7 preceding siblings ...)
  2005-04-11 12:57 ` [Bug libgcj/20941] " pinskia at gcc dot gnu dot org
@ 2005-05-30 15:35 ` pinskia at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-30 15:35 UTC (permalink / raw)
  To: java-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libgcj                      |fastjar


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20941


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-05-30 15:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-11  8:08 [Bug java/20941] New: Incorrect case for META-INF with fastjar phil at mkdoc dot com
2005-04-11  8:11 ` [Bug java/20941] " phil at mkdoc dot com
2005-04-11  8:56 ` phil at mkdoc dot com
2005-04-11  9:13 ` phil at mkdoc dot com
2005-04-11  9:18 ` phil at mkdoc dot com
2005-04-11  9:21 ` phil at mkdoc dot com
2005-04-11  9:23 ` phil at mkdoc dot com
2005-04-11  9:47 ` phil at mkdoc dot com
2005-04-11 12:57 ` [Bug libgcj/20941] " pinskia at gcc dot gnu dot org
2005-05-30 15:35 ` [Bug fastjar/20941] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).