Creation of a second server runtime fails
Description
Environment
Attachments
- 31 Jan 2011, 12:30 AM
- 28 Oct 2010, 12:04 AM
- 27 Oct 2010, 11:43 PM
Activity

Gregory Amerson February 3, 2011 at 4:36 PM
Fixed, now using classpath entry that will not get confused by files also in workspace when resolving classpath entries.

Gregory Amerson January 31, 2011 at 4:29 PM
Found the issue, and I should be able to get a fix for this in the next version of the IDE.

Matthias Maiershofer January 31, 2011 at 12:30 AM
Added screenshot of the dialog showing the error and the server's full path.

Gregory Amerson January 28, 2011 at 9:18 AM
Hi Matthias,
When you add the new server and you have clicked "Add" to add a new runtime location and you browse to the location of the runtime within your workspace and then you get the error you have mentioned, can you post a screenshot of the dialog? I want to see the exact path or location that is entered into the Liferay Tomcat Directory field.
Somehow it seems that the IRuntime class created by eclipse has the runtime location set to /Servers/core-snap.... instead of /path/to/Workspace/Servers/core-snap... as it should be. I am wondering how this has happened. When you click the "browse button" are you navigating to the abolute location of your core-snap... directory or the workspace relative path?

Matthias Maiershofer January 28, 2011 at 1:55 AM
I still get the same error. This is what I did:
(I already had two Liferay server instances in my Servers-List, both somewhere outside of the Eclipse Workspace but inside my home folder. Both work.)
Update to the latest nightly of the plugin (1.2.0.v201101270221), restart Eclipse
Unpack a new Liferay-Tomcat-6.0.5 instance to Workspace/Servers
In Eclipse, Rightclick on the Servers-List, New -> Server
Choose "Liferay v6.0 CE Server (Tomcat 6)" as server type
"Add..."
Browse to the new instance within the Workspace/Servers directory (I had two server folders in there: "core-base-0.0.5-SNAPSHOT" and "core-base-0.0.5-SNAPSHOT-2", both identical to the liferay-tomcat-6.0.5 package)
Message "Portal server not supported. Expecting Liferay Portal Community Edition" appears and the "Finish" button is greyed out
Exception in Workspace/.metadata/.log appears:
!ENTRY com.liferay.ide.eclipse.core 4 0 2011-01-28 10:33:24.043
!MESSAGE The archive: /Servers/core-base-0.0.5-SNAPSHOT-2/tomcat-6.0.26/lib/ext/portal-service.jar which is referenced b
y the classpath, does not exist.
!STACK 1
org.eclipse.core.runtime.CoreException: The archive: /Servers/core-base-0.0.5-SNAPSHOT-2/tomcat-6.0.26/lib/ext/portal-se
rvice.jar which is referenced by the classpath, does not exist.
at org.eclipse.jdt.launching.JavaRuntime.abort(JavaRuntime.java:1354)
at org.eclipse.jdt.launching.JavaRuntime.abort(JavaRuntime.java:1340)
at org.eclipse.jdt.launching.JavaRuntime.resolveRuntimeClasspathEntry(JavaRuntime.java:928)
at org.eclipse.jdt.launching.StandardClasspathProvider.resolveClasspath(StandardClasspathProvider.java:75)
at org.eclipse.jdt.launching.JavaRuntime.resolveRuntimeClasspath(JavaRuntime.java:1214)
at org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.getClasspath(AbstractJavaLaunchConfiguratio
nDelegate.java:417)
at org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:71)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:695)
at com.liferay.ide.eclipse.ui.util.LaunchHelper.launch(LaunchHelper.java:178)
at com.liferay.ide.eclipse.ui.util.LaunchHelper.launch(LaunchHelper.java:202)
at com.liferay.ide.eclipse.server.tomcat.core.PortalTomcatRuntime.loadServerInfoFile(PortalTomcatRuntime.java:43
1)
[ ... and some more ... ]
Notice the exception message referring to the wrong path. serverInfo.txt and version.txt inside the .metadata/.plugin/com.liferay.ide.eclipse.server.tomcat.core/-folder have size 0.
When I try to add a new (existing) server runtime through the "New Server Runtime Environment" dialog, the liferay tomcat directory doesn't seem to get scanned properly. Instead, the message "Portal server not supported. Expecting Liferay Portal Community Edition" is shown.
The server can be added after manually editing the plugin config files serverInfo.properties and version.properties (by duplicating the entries for the first server).