bugCERTI - Bugs: bug #29436, cannot build jcerti at Fedora 8

 
 

bug #29436: cannot build jcerti at Fedora 8

Submitted by:  Petr Gotthard <gotthardp>
Submitted on:  Sun 04 Apr 2010 12:28:17 PM UTC  
 
Category: JavaCERTISeverity: 5 - Blocker
Item Group: Compilation errorStatus: Ready For Test
Privacy: PublicAssigned to: Petr Gotthard <gotthardp>
Open/Closed: ClosedRelease: CVS
Reproducibility: Every TimeFixed Release: J-1.0.0

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 05 Apr 2010 03:22:50 PM UTC, comment #7:

My GNU Java cannot be removed as ant depends on it. Moreover the ant requires the 'javac' alternative to be properly set.

Problem solved. I updated README accordingly.

Thanks for your help.

Petr Gotthard <gotthardp>
Project MemberIn charge of this item.
Sun 04 Apr 2010 06:53:58 PM UTC, comment #6:

Yes either use
yum remove gij

or you can force appropriate java alternative
using (as root):

update-alternatives --config java

then select appropriate alternative as the default.

Eric NOULARD <erk>
Project Administrator
Sun 04 Apr 2010 05:24:28 PM UTC, comment #5:

thanks; I'm making steps forward

I had only gij; that was the problem-- it should be highighted somewehere that only Sun is supported at the moment

now I have installed both the gij and the Sun's Java, but I don't know how to convince ant to use the latter; any ideas?

Petr Gotthard <gotthardp>
Project MemberIn charge of this item.
Sun 04 Apr 2010 04:41:15 PM UTC, comment #4:

On Fedora 8 the default installed jdk may well
be "gij" i.e. the gcc java frontend.

You can check using:
java -version

If the answer contains something with "gij" please try
to install a "genuine" jdk either a Sun JDK or OpenJDK.

see
http://fedorasolved.org/browser-solutions/sun-jdk
or
http://fedoraproject.org/wiki/JavaFAQ

Supporting gij may be possible but I suggest we try that
target later.

Before concerning the 1.4 vs 1.5 java version problem
may be you can try change the build.xml
file and replace the
target="1.5"
source="1.5"
with 1.4
but I would advise not to rely on Java 1.4 support since
Java 1.5 (aka "Java 5") is out for a while and Java 6 is now
the current version (with Java 7 coming):
see
http://en.wikipedia.org/wiki/Java_version_history

Relying on more than 8 years old java version wouldn't be wise.

Eric NOULARD <erk>
Project Administrator
Sun 04 Apr 2010 02:19:34 PM UTC, comment #3:

This is definitely a JDK/ANT issue. Probably some kind of configuration problems. I do not know what version of JDK you have and what is the proper way to install newest JDK and configure it on Fedora 8.

if you have your JDK up to date
*try to set JAVA_HOME to your path of jdk 5 or higher
*try to set ANT_HOME to your ant configuration
if not

  • try to install newest JDK at your box and see if that helps

Just for info (this is ubuntu 9.10 64bit):
"nymfe05:/home/xpancik1/jcerti>$ printenv JAVA_HOME
/packages/run.64/jdk-1.6.0_16
nymfe05:/home/xpancik1/jcerti>$ printenv ANT_HOME
/packages/share/ant-1.7.0
nymfe05:/home/xpancik1/jcerti>$ ant -version
Apache Ant version 1.7.0 compiled on December 13 2006
nymfe05:/home/xpancik1/jcerti>$ ant --noconfig -version
Apache Ant version 1.7.0 compiled on December 13 2006"

Andrej Pancik <apancik>
Project Member
Sun 04 Apr 2010 01:57:01 PM UTC, comment #2:

I literally followed the README file ;-)

I didn't have xml-commons-apis installed. After installing this package, the warning disappeared, but the errors still persist. I tried to google solutions and some posts suggested this is a java 1.4 vs java 5 issue. Could it be?

[root@localhost jcerti]# ant -version
Apache Ant version 1.7.0 compiled on August 16 2007
[root@localhost jcerti]# ant --noconfig -version
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: org.apache.tools.ant.launch.Launcher. Program will exit.
[root@localhost jcerti]# echo $ANT_HOME

[root@localhost jcerti]# echo $JAVA_HOME

Petr Gotthard <gotthardp>
Project MemberIn charge of this item.
Sun 04 Apr 2010 01:09:36 PM UTC, comment #1:

I am not able to reproduce the bug.

It seems to be JDK/ANT issue. Do you have package xml-commons-apis installed? ( https://admin.fedoraproject.org/pkgdb/acls/name/xml-commons-apis )

If yes, do you have multiple ants installed? What is your ANT_HOME and JAVA_HOME?
What does 'ant -version' and 'ant --noconfig -version' return?

Andrej Pancik <apancik>
Project Member
Sun 04 Apr 2010 12:28:17 PM UTC, original submission:

/usr/bin/build-classpath: error: Could not find xml-commons-apis Java extension for this JVM
/usr/bin/build-classpath: error: Some specified jars were not found
Buildfile: build.xml

main:

build:

[javac] Compiling 272 source files to /root/projects/certi/jcerti/build/class
[javac] ----------
[javac] 1. ERROR in /root/projects/certi/jcerti/src/certi/communication/CertiExceptionType.java (at line 1)
[javac] // ----------------------------------------------------------------------------
[javac] ^
[javac] The type java.lang.Enum cannot be resolved. It is indirectly referenced from required .class files
[javac] ----------
[javac] 2. ERROR in /root/projects/certi/jcerti/src/certi/communication/CertiExceptionType.java
[javac] (at line 1)
[javac] // ----------------------------------------------------------------------------
[javac] ^
[javac] The type Enum is not generic; it cannot be parameterized with arguments <CertiExceptionType>
[javac] ----------
[javac] 2 problems (2 errors)

BUILD FAILED
/root/projects/certi/jcerti/build.xml:26: The following error occurred while executing this line:
/root/projects/certi/jcerti/build.xml:33: Compile failed; see the compiler error output for details.

Petr Gotthard <gotthardp>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by erk (Posted a comment)
  • -unavailable- added by apancik (Posted a comment)
  • -unavailable- added by gotthardp (Submitted the item)
  • -unavailable- added by gotthardp
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 12 Nov 2010 08:12:59 AM UTCerkOpen/ClosedOpen=>Closed
      Fixed ReleaseUnknown=>J-1.0.0
    Thu 11 Nov 2010 11:16:11 AM UTCerkReleaseUnknown=>CVS
    Mon 05 Apr 2010 03:22:50 PM UTCgotthardpStatusNone=>Ready For Test
      Assigned toapancik=>gotthardp
    Sun 04 Apr 2010 01:09:36 PM UTCapancikAssigned toNone=>apancik
    Sun 04 Apr 2010 12:28:17 PM UTCgotthardpCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1