This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. Geronimo tips
Table of Contents [-]
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.