Bug 684536 - classpathx-jaf: FTBFS - uses deprecated API
Summary: classpathx-jaf: FTBFS - uses deprecated API
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: classpathx-jaf
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Mikolaj Izdebski
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-13 11:06 UTC by Zenon Panoussis
Modified: 2020-10-14 16:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-15 12:54:53 UTC
Target Upstream Version:


Attachments (Terms of Use)
Patch to fix building on RHEL6. (1012 bytes, patch)
2011-05-30 02:59 UTC, Mathieu Bridon
no flags Details | Diff
Proposed spec file patch (1.35 KB, patch)
2011-07-20 20:24 UTC, Jeff Johnston
no flags Details | Diff
Patch to MimeType.java so it builds with OpenJDK (1.02 KB, patch)
2011-07-20 20:25 UTC, Jeff Johnston
no flags Details | Diff

Description Zenon Panoussis 2011-03-13 11:06:47 UTC
/usr/lib/jvm/java/bin/javac -g -classpath ./classes:./source -d ./classes source/javax/activation/ActivationDataFlavor.java
Note: source/javax/activation/ActivationDataFlavor.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
<snip>
/usr/lib/jvm/java/bin/javac -g -classpath ./classes:./source -d ./classes source/javax/activation/MailcapCommandMap.java
Note: source/javax/activation/MailcapCommandMap.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/usr/lib/jvm/java/bin/javac -g -classpath ./classes:./source -d ./classes source/javax/activation/MimeType.java
source/javax/activation/MimeType.java:256: cannot find symbol
symbol  : constructor MimeTypeParseException(java.lang.String,java.lang.String)
location: class javax.activation.MimeTypeParseException
            throw new MimeTypeParseException(message, token);
                  ^
source/javax/activation/MimeType.java:261: cannot find symbol
symbol  : constructor MimeTypeParseException(java.lang.String,java.lang.String)
location: class javax.activation.MimeTypeParseException
                throw new MimeTypeParseException(message, token);
                      ^
Note: ./source/javax/activation/MimeTypeParameterList.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
===

Several java packages that are shipped with EL6 cannot be rebuilt on EL6, all for the same reason; search bugzilla for other identical summaries.

Comment 2 RHEL Program Management 2011-03-13 11:37:38 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Mathieu Bridon 2011-05-30 02:59:17 UTC
Created attachment 501688 [details]
Patch to fix building on RHEL6.

Looking into this issue, I found that the unfound constructor is the only one that isn't explicitly public in the MimeTypeParseException class definition.

Perhaps the default access modifier changed between Java 1.4 (presumably when this package was built, as this is what was in Fedora 12 IIRC) and Java 1.5 (which RHEL6 now has) ?

Trivial patch attached that fixes the issue.

Comment 4 Mathieu Bridon 2011-07-19 09:54:20 UTC
Any news?

I'm not expecting this package to be updated just for this fix as it is not a critical issue, but a simple comment from the maintainer (even if it is "that patch makes no sense") is always appreciated. :)

Comment 5 Jeff Johnston 2011-07-19 16:56:00 UTC
(In reply to comment #4)
> Any news?
> 
> I'm not expecting this package to be updated just for this fix as it is not a
> critical issue, but a simple comment from the maintainer (even if it is "that
> patch makes no sense") is always appreciated. :)

The constructor should be left as-is.  It should not be made public.  The default access modifier should work in this case to allow package-level access and the classes are in the same package.  I have confirmed with an OpenJDK developer that the behaviour should not have changed for Java 1.5.  I will try and recreate with a small test.

Comment 6 Jeff Johnston 2011-07-20 20:23:34 UTC
The problem turns out to be that the javax/activation classes are in rt.jar and originally this package was built by gcj which did not have the javax.activation classes in it.  When MimeType.java is compiled, it is using the rt.jar version of MimeTypeParseException which does not have the added package-level constructor.

The fix is to patch MimeType.java so it does not require the special constructor.  This is easy to do by simply recreating the String formed from the two parameters and passing it to the public single String constructor.

I will include a proposed patch file and patch to classpathx-jaf.spec that fixes the problem.

Comment 7 Jeff Johnston 2011-07-20 20:24:33 UTC
Created attachment 514079 [details]
Proposed spec file patch

Comment 8 Jeff Johnston 2011-07-20 20:25:40 UTC
Created attachment 514080 [details]
Patch to MimeType.java so it builds with OpenJDK

Comment 9 RHEL Program Management 2011-07-20 20:37:49 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 10 Zenon Panoussis 2011-07-20 20:46:35 UTC
Would this also fix bug #685464 and bug #684533 ?

Comment 11 Jeff Johnston 2011-07-20 21:08:50 UTC
(In reply to comment #10)
> Would this also fix bug #685464 and bug #684533 ?

The fix I proposed just removes the 2 compile errors so the package builds.  This package should not be required unless you are using gnu.activation.viewers classes.  All other classes in this package are now supplied by the current OpenJDK JVM.

Comment 12 Mathieu Bridon 2011-07-28 07:43:15 UTC
Thanks for the investigation and the patch Jeff!

I can confirm it fixes the build issue here.

I don't suppose this is a priority fix that will be pushed to the repository as soon as possible? :)

Comment 13 Mikolaj Izdebski 2012-07-19 11:53:41 UTC
I cannot reproduce this on RHEL 6.3 -- the package builds fine.

Comment 15 Mikolaj Izdebski 2012-07-19 12:21:54 UTC
We are unable to reproduce this bug in current Red Hat Enterprise Linux release. I am closing this bug as NOTABUG.

If you still have this problem then please contact your Red Hat Support representative and open a support request through Red Hat GSS. Bugzilla is not quite the correct forum for Support requests, Bugzilla is an engineering tool.

Comment 16 Alexander Kurtakov 2015-12-15 12:54:53 UTC
Actually mark the bug as NOTABUG.

Comment 17 Techies India Inc. 2020-10-14 16:38:18 UTC
CLOSED NOTABUG

Thanks https://bugzilla.redhat.com/

<a href="BugZilla">https://bugzilla.redhat.com/</a>


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