Bug 147028 - Can't find xerces from CLASSPATH
Can't find xerces from CLASSPATH
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-03 15:25 EST by Aaron Luchko
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-19 15:19:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Aaron Luchko 2005-02-03 15:25:13 EST
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 15:33:51 EST
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 15:37:31 EST
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-13 22:12:46 EST
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 15:19:46 EDT
yup, was fixed in Rawhide

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