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'
solved with last ant-core-1.6.5-r14 and ant-tasks-1.6.5-r3 ebuild Thanks Bye
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).
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
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.
>> (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
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.
Created attachment 94189 [details] Diff for fixing compiler version, slot and blocking against the -bin version
Note: Someone needs to block the binary version against this to make it work out.
(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.
(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!
(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).
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 ......
Fixed with JAVA_PKG_STRICT=true eant .....
Ropening for doing it with some function instead of setting a variable as nichoj suggested, needs eclass changes.
Here too. Just need to unmerge the sun-javamail-bin to make it work...
Changed from JAVA_PKG_STRICT to passing -Dbuild.sysclasspath=ignore since JAVA_PKG_STRICT has more features and can change etc.