Bug 147028 - Can't find xerces from CLASSPATH
Summary: Can't find xerces from CLASSPATH
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc4
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-03 20:25 UTC by Aaron Luchko
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-04-19 19:19:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Test case for bug (293 bytes, text/plain)
2005-02-03 20:33 UTC, Aaron Luchko
no flags Details
Log from gcj4 run (2.19 KB, text/plain)
2005-02-03 20:37 UTC, Aaron Luchko
no flags Details

Description Aaron Luchko 2005-02-03 20:25:13 UTC
Description of problem:
javac is unable to resolve javax.xml even when /usr/share/java/xerces-j2.jar is
explicitly added to the CLASSPATH.

Version-Release number of selected component (if applicable):
java-1.4.2-gcj4-compat-1.4.2.0-3jpp
libgcj4-4.0.0-0.22
java-1.4.2-gcj4-compat-devel-1.4.2.0-3jpp
libgcj4-devel-4.0.0-0.22
xerces-j2-2.6.2-4jpp

How reproducible:
Always

Steps to Reproduce:
1. Add /usr/share/java/xerces-j2.jar to your CLASSPATH
2. Attempt to compile java code importing a library in xerces
  
Actual results:
Import cannot be resolve and build fails

Expected results:
Build should succeed without warnings

Additional info:
IBM and BEA both appear to have the xerces libraries (or at least javax) built in.

Comment 1 Aaron Luchko 2005-02-03 20:33:51 UTC
Created attachment 110614 [details]
Test case for bug

Ensure that /usr/share/java/xerces-j2.jar is on the CLASSPATH then attempt to
compile the code, you'll get,

----------
1. ERROR in Test.java (at line 1)
	import javax.xml.parsers.SAXParser;
	       ^^^^^^^^^
The import javax.xml cannot be resolved
----------
2. ERROR in Test.java (at line 2)
	import javax.xml.parsers.SAXParserFactory;
	       ^^^^^^^^^
The import javax.xml cannot be resolved
----------
3. ERROR in Test.java (at line 8)
	SAXParser parser = null;
	^^^^^^^^^
SAXParser cannot be resolved or is not a type
----------
4. ERROR in Test.java (at line 9)
	parser = SAXParserFactory.newInstance().newSAXParser();
		 ^^^^^^^^^^^^^^^^
SAXParserFactory cannot be resolved
----------
4 problems (4 errors)


IBM and BEA will both be able to compile and run the above code with out
errors.  GCJ4 will be able to neither comile it nor run a version compiled with
IBM or BEA.

Comment 2 Aaron Luchko 2005-02-03 20:37:31 UTC
Created attachment 110616 [details]
Log from gcj4 run

This is the output of running
/usr/lib/jvm/java-gcj4/bin/java Test
on a class file compiled by ibm javac.

Comment 3 Thomas Fitzsimmons 2005-03-14 03:12:46 UTC
Can you update to the latest java-1.4.2-gcj-compat and
java-1.4.2-gcj-compat-devel (note, gcj, not gcj4) in Rawhide and try again?

Comment 4 Aaron Luchko 2005-04-19 19:19:46 UTC
yup, was fixed in Rawhide


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