Starting Geronimo #

If you start Geronimo using 'bin/start-server', all java options set in 'setenv' will be NOT applied to the Geronimo server process, but to the gsh (some Geronimo shell tool) that is invoked first and that invokes server later.

Therefore start Geronimo using 'geronimo run'.

Mail implementation #

Geronimo is not using Sun mail implementation. Instead, it uses its own mail implementation (geronimo-mail). This means that some mail related portlets (e.g. some versions of mail-portlet) and functionalities will not work on Geronimo. Exception may look like:

java.lang.ClassNotFoundException: com.sun.mail.imap.IMAPFolder in classloader liferay/mail-portlet/6.1.0.1/car
        at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:407)
        at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:257)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at com.liferay.mail.mailbox.IMAPMailbox.<init>(IMAPMailbox.java:69)

The obvious solution is not to use classes from Sun implementation (from com.sun. packages). Instead, just use classes from javax.mail. packages.

It is not possible to simple remove Geronimo mail implementation as it is wired using osgi with the server infastructure. Doing this might give the ClassCastExceptions.

Replacement solution (sort of) #

If you really need to to replace Geronimo's implementation with Sun do the following:

  • Go to folder: /bundles/geronimo-2.2.1/repository/org/apache/geronimo/javamail/geronimo-javamail_1.4_mail/1.8.2/
  • Backup original: geronimo-javamail_1.4_mail-1.8.2.jar
  • Replace it with attached jar.

Note that this is a bit of hack, not a full-proof solution. It works for older versions of our mail-portlet, but replacing Geronimo implementation may affect some other deployed applications.

1 Allegato
14212 Visualizzazioni
Media (0 Voti)
La media del punteggio è 0.0 stelle su 5.
Commenti