Enterprise grade Java.
You'll read about Conferences, Java User Groups, Java, Integration, Reactive, Microservices and other technologies.

Tuesday, July 27, 2010

Updating GlassFish Server Adapter with Eclipse 3.5 (Galileo) and 3.6 (Helios)

12:53 Tuesday, July 27, 2010 Posted by Markus Eisele
A coworker asked for this recently. If he tries to download the additional server adapter for GlassFish Java EE 5, Java EE 6 1.0.54 with his 3.5 Eclipse he gets the following error:
[... truncated to the relevant parts ;)]
Cannot complete the install because of a conflicting dependency.
Only one of the following can be installed at once:
Sun Application Servers and GlassFish Servers support 1.0.52
GlassFish Java EE 5, Java EE 6 1.0.54

He tried "check for updates" on the complete distribution but this does not work. Even downloading the packages and replacing them directly within Eclipse does not work. After some research, I believed I found a solution:

If you try to simply "install the 1.0.54 as a "new extension", you will get the above error because of the already installed .52.
What you really need is an update. Lets give it a try:

1) Start Eclipse 3.5.x. or 3.6.Mx (Make sure that the WTP (Web Tools Platform) plugins are installed.)
2) Start the installation procedure : select the Help>Software Updates>Find and Install... menu item.
3) Select "Search for new features to install" option and click Next.
4) Click New Remote Site...
5) Give a name (ie GlassFish Eclipse Site), enter the URL: https://ajax.dev.java.net/eclipse
6) Select this new site in the Sites to include in search list and click Next.
7) Select "GlassFish v2.x Java EE 5 and v3 Java EE 6 support" in the "Select the features to install" list and click Next.
8) Review the "Your original request has been modified." window and click Next.
9) Accept the terms of the license agreements and click Finish.
10) Wait for the installation to complete

This should be everything to do. But unfortunatualy this update fails due to a missing Manifest.mf within com.sun.enterprise.jst.server.sunappsrv_1.0.54.jar.
An error occurred while loading the manifest D:\Program Files\eclipse-jee-galileo-win32\plugins\com.sun.enterprise.jst.server.sunappsrv_1.0.54.jar.
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:114)

And: btw. This even does not work with 3.6. :(

If you are running Helios (3.6) you can make a new try. All the above steps with a different URL: http://download.java.net/glassfish/eclipse/helios.
The 11th step is to confirm that you are willing to install unsigned content. if you choose yes, you are asked to restart Eclipse. This works and you are done.

You are now able to create new Server Runtimes:
  • GlassFish 2.1 Java EE 5
  • GlassFish Server Open Source Edition 3 (Java EE 6)
  • Sailfin v2

I did not manage to get all this working with 3.5 :( Seems as if the whole server adaptor plugins situation is a mess at the moment. I hope, that this will be resolved shortly. Mainly because the GlassFish Plugins will move to the Oracle Enterprise Pack for Eclipse (OEPE) (compare this bug entry) and will be available at this url http://download.oracle.com/otn_software/oepe/helios/wtp in the future. This will happen with the next OEPE release (which is expected to arrive shortly). At the moment this page is not available.

Oracle: if you are reading this: Please provide updates for 3.5 also. Don't expect anybody to
a) use OEPE or
b) always update to the latest environments

If anybody knows a solution to this .. let me know ..