Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143246 - emerge sun-javamail-1.4 fails
Summary: emerge sun-javamail-1.4 fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-08 13:20 UTC by Massimo Fantin
Modified: 2007-04-02 18:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Diff for fixing compiler version, slot and blocking against the -bin version (sun-javamail-1.4.ebuild.diff,593 bytes, text/plain)
2006-08-13 19:05 UTC, Peter Ansell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Massimo Fantin 2006-08-08 13:20:41 UTC
I can't compile sun-javamail-1.4

For now i'm using bin version of 1.4 for working with new jaf in my tomcat 
application...(http://java.sun.com/products/javamail/downloads/index.html)

Thanks .
Massimo
--------------------------------------------------------------------------

Calculating dependencies... done!
>>> Emerging (1 of 1) dev-java/sun-javamail-1.4 to /
>>> checking ebuild checksums ;-)
>>> checking auxfile checksums ;-)
>>> checking miscfile checksums ;-)
>>> checking sun-javamail-1.4.tar.bz2 ;-)
 * Using: sun-jdk-1.5
>>> Unpacking source...
>>> Unpacking sun-javamail-1.4.tar.bz2 to /var/tmp/portage/sun-javamail-1.4/work
>>> Source unpacked.
Rewriting ./build.xml
>>> Compiling source in /var/tmp/portage/sun-javamail-1.4/work/mail ...
Buildfile: build.xml

init:
     [echo] Building component mail
    [mkdir] Created dir: /var/tmp/portage/sun-javamail-1.4/work/mail/build

compile:
    [javac] Compiling 185 source files to /var/tmp/portage/sun-javamail-1.4/work/mail/build
    [javac] /var/tmp/portage/sun-javamail-1.4/work/mail/src/java/com/sun/mail/imap/IMAPFolder.java:1889: setQuota(javax.mail.Quota) in com.sun.mail.imap.protocol.IMAPProtocol cannot be applied to (com.sun.mail.imap.Quota)
    [javac]                 p.setQuota(quota);
    [javac]                      ^
    [javac] /var/tmp/portage/sun-javamail-1.4/work/mail/src/java/com/sun/mail/imap/IMAPStore.java:120: com.sun.mail.imap.IMAPStore is not abstract and does not override abstract method setQuota(javax.mail.Quota) in javax.mail.QuotaAwareStore
    [javac] public class IMAPStore extends Store
    [javac]        ^
    [javac] /var/tmp/portage/sun-javamail-1.4/work/mail/src/java/com/sun/mail/imap/IMAPStore.java:1310: getQuota(java.lang.String) in com.sun.mail.imap.IMAPStore cannot implement getQuota(java.lang.String) in javax.mail.QuotaAwareStore; attempting to use incompatible return type
    [javac] found   : com.sun.mail.imap.Quota[]
    [javac] required: javax.mail.Quota[]
    [javac]     public Quota[] getQuota(String root) throws MessagingException {
    [javac]                    ^
    [javac] /var/tmp/portage/sun-javamail-1.4/work/mail/src/java/com/sun/mail/imap/IMAPStore.java:1316: incompatible types
    [javac] found   : javax.mail.Quota[]
    [javac] required: com.sun.mail.imap.Quota[]
    [javac]         qa = p.getQuotaRoot(root);
    [javac]                                ^
    [javac] /var/tmp/portage/sun-javamail-1.4/work/mail/src/java/com/sun/mail/imap/IMAPStore.java:1346: setQuota(javax.mail.Quota) in com.sun.mail.imap.protocol.IMAPProtocol cannot be applied to (com.sun.mail.imap.Quota)
    [javac]         p.setQuota(quota);
    [javac]              ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 5 errors

BUILD FAILED
/var/tmp/portage/sun-javamail-1.4/work/mail/build.xml:55: Compile failed; see the compiler error output for details.

Total time: 3 seconds

!!! ERROR: dev-java/sun-javamail-1.4 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  sun-javamail-1.4.ebuild, line 32:   Called eant 'jar' '-Djavaee.jar=activation.jar'
  java-utils-2.eclass, line 1267:   Called die

!!! eant failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.5  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.5.0.07"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac"
and of course, the output of emerge --info
!!! This ebuild is from an overlay: '/usr/portage/local/layman/java-experimental'
Comment 1 Massimo Fantin 2006-08-09 04:01:24 UTC
solved with last ant-core-1.6.5-r14 and ant-tasks-1.6.5-r3 ebuild

Thanks
Bye
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-09 05:04:36 UTC
Weird. For the record, I don't see how the changes in those ant-* revisions would fix this. Yesterday there was someone on IRC with the same problem, and it got fixed when he stopped using migration-overlay and gcj-overlay. I couldn't reproduce it (all that was with previous ant revisions).
Comment 3 Massimo Fantin 2006-08-11 13:18:11 UTC
you are right is not related to ant* !!  (my bad assumption)

but in other machine i found that i have to 
emerge -C sun-javamail-bin 
before 
emerge sun-javamail
else i have the error reported...

I have also find that the compilation go OK but the jar is not compatible with the old 1.3 because of getQuota setQuota method are not implemented (as the first error show) 
Infact i have an installed openexchange webapps the use the sun-jaf and sun-javamail jars and with this new 1.4 version don't work: in tomcat logging i have :

-----------------------------------------------------------------------
Exception in thread "ComfireThread 0" java.lang.NoSuchMethodError: com.sun.mail.imap.IMAPFolder.getQuota()[Lcom/sun/mail/imap
        at com.openexchange.webmail.FolderSettings.loadFolder(FolderSettings.java:181)
        at com.openexchange.webmail.Management.onBeforeHtmlLoad(Management.java:314)
        at com.openexchange.thread.ComfireThread.validateSession(ComfireThread.java:407)
        at com.openexchange.thread.ComfireThread.run(ComfireThread.java:162)
        at java.lang.Thread.run(Thread.java:595)
--------------------------------------------------------------

It suspect that getQuote e setQuote are not compiled right on the new  sun-javamail.jar 

Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-11 16:38:48 UTC
Ahh so that's it! Because ant loads sun-javamail-bin classpath if it's in your system, it affects the compilation of sun-javamail (unless you have JAVA_PKG_STRICT=true). I've already suspected and tried to reproduce it, but it happens only if sun-javamail-bin is version 1.3.*! (tested with 1.3.1 here, because it's the stable one so I suppose you have that one). I was trying only with 1.4 version of the -bin. Seems they are indeed incompatible and need to be slotted.
Comment 5 Massimo Fantin 2006-08-12 03:01:20 UTC
>>  (tested with 1.3.1 here, because it's the stable one so I suppose you have that one)


True, your supposition is right !! 

So the 2 version are not compatible ?
(well maybe i have to upgrade my version of openexchange to the last one )

Thanks 

 
Comment 6 Peter Ansell 2006-08-13 19:00:54 UTC
The problem would be fixed for the compilation of the package if sun-javamail-bin was set as a blocker for this package. Attaching an svn diff file for the change.

Also changed in the file so that it will not use my java 6 compiler without me explicitly changing it to do so in the future.
Comment 7 Peter Ansell 2006-08-13 19:05:51 UTC
Created attachment 94189 [details]
Diff for fixing compiler version, slot and blocking against the -bin version
Comment 8 Peter Ansell 2006-08-13 19:08:35 UTC
Note: Someone needs to block the binary version against this to make it work out.
Comment 9 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-13 22:05:07 UTC
(In reply to comment #6)
> The problem would be fixed for the compilation of the package if
> sun-javamail-bin was set as a blocker for this package. Attaching an svn diff
> file for the change.

Yeah it used to be blocking but it was causing problems because now some packages dep on sun-javamail-bin and some on sun-javamail... they can well coexist on the system. It should ultimately replace -bin, though. And bulding with ant is being changed so that its runtime classpath doesn't affect the source being compiled.
 
> Also changed in the file so that it will not use my java 6 compiler without me
> explicitly changing it to do so in the future.
 
Hm why? It's building well with sun-jdk-1.6 here.
Comment 10 Peter Ansell 2006-08-13 23:13:00 UTC
(In reply to comment #9)
> (In reply to comment #6)
> > The problem would be fixed for the compilation of the package if
> > sun-javamail-bin was set as a blocker for this package. Attaching an svn diff
> > file for the change.
> 
> Yeah it used to be blocking but it was causing problems because now some
> packages dep on sun-javamail-bin and some on sun-javamail... they can well
> coexist on the system. It should ultimately replace -bin, though. And bulding
> with ant is being changed so that its runtime classpath doesn't affect the
> source being compiled.

Thats a nice change if it can be done. How exactly is that possible?

> Hm why? It's building well with sun-jdk-1.6 here.

I think it was only the 1.3 -bin version that gave me problems with sun-jdk-1.6. Apologies for that!
Comment 11 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-14 08:41:13 UTC
(In reply to comment #10)
> > with ant is being changed so that its runtime classpath doesn't affect the
> > source being compiled.
> 
> Thats a nice change if it can be done. How exactly is that possible?
 
See bug 142538 comments upto 4 (note the java-strict had changed from FEATURE to settin variable JAVA_PKG_STRICT=true in make.conf).
Comment 12 Josh Nichols (RETIRED) gentoo-dev 2006-08-15 23:59:29 UTC
For the sun-javamail ebuild, we could do:

JAVA_PKG_STRICT=true eant .....

this way, we can force the strict behavior for this particular package. Or perhaps, some function to enable it for a particular command, ie

java-pkg_one-time-strict eant ......
Comment 13 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-27 15:43:15 UTC
Fixed with JAVA_PKG_STRICT=true eant .....
Comment 14 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-28 03:25:12 UTC
Ropening for doing it with some function instead of setting a variable as nichoj suggested, needs eclass changes.
Comment 15 Alon Bar-Lev (RETIRED) gentoo-dev 2006-09-28 05:34:08 UTC
Here too.
Just need to unmerge the sun-javamail-bin to make it work...
Comment 16 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-04-02 18:33:52 UTC
Changed from JAVA_PKG_STRICT to passing -Dbuild.sysclasspath=ignore since JAVA_PKG_STRICT has more features and can change etc.