Fórumok

Mail.jar --- Linkage error

thumbnail
Muniraj saravanan, módosítva 8 év-val korábban

Mail.jar --- Linkage error

Junior Member Bejegyzések: 95 Csatlakozás dátuma: 2011.06.01. Legújabb bejegyzések
Hi All,

I try to use the Liferay utility class MailEngine to generate a email notification for the custom portlets. Add the Maven as follows <groupId>javax.mail</groupId>,<artifactId>mail</artifactId>,<version>1.4</version>,<scope>provided</scope>.

Since Liferay has mail.jar in the lib\ext folder , Maven Scope mentioned as "provided" . Compilation are successful . But on the runtime , it throws "java.lang.linkageerror" due to incompatible class used for compilation and runtime.

I think Liferay used Mail.jar 1.3 version , but Maven repository have 1.4 and above .

How to resolve this issue
thumbnail
David H Nebinger, módosítva 8 év-val korábban

RE: Mail.jar --- Linkage error

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Your coworker posted the same thing.

Use 1.6 for your target jdk during compile and 1.7 for runtime.

1.8 is not supported (well it is, but probably only in the very latest and I'm not even sure if it works for CE).