Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Eclipse remote help server (BindException)
Eclipse remote help server (BindException) [message #470160] Wed, 24 October 2007 17:33 Go to next message
Lyndsey Padget is currently offline Lyndsey PadgetFriend
Messages: 2
Registered: July 2009
Junior Member
One of the documented limitations of Java Web Start is that the Eclipse
help system cannot be deployed [1]. As a workaround, Eclipse suggests
running your own help server (also known as running help in “infocenter”
mode), which I have done on the server serving our application [2]. This
server can be reached by hitting
http://<serverName>:<portNumber>/help/index.jsp in a browser. Note that
I'm using version 3.2.0 to 3.2.2 for most of my Eclipse plugins.

Now I would like to configure our application to use this help server
rather than trying to start its own help server. I have tried to
accomplish this in two ways:

1) use the org.eclipse.help.appserver product customization options as
defined here [3] and

2) use the host and port fields in the Help Server preference page [4]

Of course, I use <serverName> as the host name and <portNumber> as the
server port in both cases. However, when I try to start help by going to
Help -> Help Contents in the workbench, I get a message stating the
following:

“Help cannot be displayed. The embedded application server could not run
help web application. Check the log for details.”

I find a stack trace in the log file, but it seems vague to me:

!ENTRY org.eclipse.help.base 4 0 2007-10-23 13:19:28.273
!MESSAGE The embedded application server could not run help web
application.
!STACK 1
org.eclipse.core.runtime.CoreException: Exception occurred starting
application server.
at
org.eclipse.tomcat.internal.TomcatAppServer.start(TomcatAppS erver.java:271)
at
org.eclipse.help.internal.appserver.AppserverPlugin.startWeb appServer(AppserverPlugin.java:162)
at
org.eclipse.help.internal.appserver.AppserverPlugin.getAppSe rver(AppserverPlugin.java:50)
at
org.eclipse.help.internal.appserver.WebappManager.start(Weba ppManager.java:63)
at
org.eclipse.help.internal.base.BaseHelpSystem.ensureWebappRu nning(BaseHelpSystem.java:246)
at
org.eclipse.help.internal.base.HelpDisplay.displayHelpURL(He lpDisplay.java:164)
…
!SUBENTRY 1 org.eclipse.tomcat 4 0 2007-10-23 13:19:28.273
!MESSAGE Exception occurred starting application server.


I found this, which describes where the REAL exception can be found:
http://www.eclipsezone.com/eclipse/forums/t59199.html

Looking in the Tomcat Catalina log (as described in the link), I see the
following exception. Note that this log file is on the client (the one
trying to connect to the help server), not the machine running the help
server. Replace <portNumber> with the actual port number below. I’ve
tried several different ports, and there is a specific exception I should
be seeing if the port was already in use. Since I’m not seeing that
exception, it must be something else…

LifecycleException: Protocol handler initialization failed:
java.net.BindException: Cannot assign requested address:
JVM_Bind:<portNumber>
at
org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteC onnector.java:1231)
at
org.apache.catalina.startup.Embedded.addConnector(Embedded.j ava:432)
at
org.eclipse.tomcat.internal.TomcatAppServer.start(TomcatAppS erver.java:239)
at
org.eclipse.help.internal.appserver.AppserverPlugin.startWeb appServer(AppserverPlugin.java:143)
at
org.eclipse.help.internal.appserver.AppserverPlugin.getAppSe rver(AppserverPlugin.java:41)
at
org.eclipse.help.internal.appserver.WebappManager.start(Weba ppManager.java:58)

Any insight would be appreciated.
Thanks!

[1]
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/java_web_start.htm
[2]
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/ua_help_setup_infocenter.htm
[3]
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/ua_help_setup_preferences.htm
[4]
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.user/reference/help_preferences_server.htm
Re: Eclipse remote help server (BindException) [message #470929 is a reply to message #470160] Wed, 21 November 2007 16:38 Go to previous messageGo to next message
Dieter Cailliau is currently offline Dieter CailliauFriend
Messages: 10
Registered: July 2009
Junior Member
Bypass tomcat, insert your own IWebappServer.

<extension
point="org.eclipse.help.appserver.server">
<server
class="com.barco.compose.mode.RemoteWebServer"
default="false"/>
</extension>

package com.barco.compose.mode;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.help.internal.appserver.AppserverPlugin;
import org.eclipse.help.internal.appserver.IWebappServer;

public class RemoteWebServer implements IWebappServer {

public RemoteWebServer() {
System.out.println("YEPLA");
}

private boolean running = true;

public String getHost() {
return
AppserverPlugin.getDefault().getPluginPreferences().getStrin g( "host");
}

public int getPort() {
return
AppserverPlugin.getDefault().getPluginPreferences().getInt("port ");
}

public boolean isRunning() {
return running;
}

public void start(int port, String host) throws CoreException {
}

public void start(String webappName, IPath path, ClassLoader
customLoader) throws CoreException {
}

public void stop() throws CoreException {
running = false;
}

public void stop(String webappName) throws CoreException {
}

}
Re: Eclipse remote help server (BindException) [message #470930 is a reply to message #470929] Wed, 21 November 2007 17:36 Go to previous messageGo to next message
Dieter Cailliau is currently offline Dieter CailliauFriend
Messages: 10
Registered: July 2009
Junior Member
This doesn't work after all, because the code still prefers tomcat over my
extension, because it only inspects the first plugin (from
AppserverPlugin), in stead of iterating them: the [0] is too bad...

// We need to pick up the non-default configuration
IConfigurationElement[] elements =
extensions[0].getConfigurationElements();

What does work is this: set the AppserverPlugin.appServer field to your
implementation, using reflection.

Field field = AppserverPlugin.class.getDeclaredField("appServer");
field.setAccessible(true);
field.set(AppserverPlugin.getDefault(),new RemoteWebServer());

The problem here is, that we need to get this done before any other code
calls that plugin: otherwise tomcat will be launched before we bypassed
it.

For example if the help view is open at startup-time, it reaches
AppserverPlugin faster, than my hack, giving trouble.
Re: Eclipse remote help server (BindException) [message #470932 is a reply to message #470930] Wed, 21 November 2007 19:26 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=124831 for a
discussion of this problem.

Dieter Cailliau wrote:
> This doesn't work after all, because the code still prefers tomcat over
> my extension, because it only inspects the first plugin (from
> AppserverPlugin), in stead of iterating them: the [0] is too bad...
> // We need to pick up the non-default configuration
> IConfigurationElement[] elements =
> extensions[0].getConfigurationElements();
>
> What does work is this: set the AppserverPlugin.appServer field to your
> implementation, using reflection.
> Field field = AppserverPlugin.class.getDeclaredField("appServer");
> field.setAccessible(true);
> field.set(AppserverPlugin.getDefault(),new RemoteWebServer());
>
> The problem here is, that we need to get this done before any other code
> calls that plugin: otherwise tomcat will be launched before we bypassed it.
> For example if the help view is open at startup-time, it reaches
> AppserverPlugin faster, than my hack, giving trouble.
>
>
Re: Eclipse remote help server (BindException) [message #594304 is a reply to message #470160] Wed, 21 November 2007 16:38 Go to previous message
Dieter Cailliau is currently offline Dieter CailliauFriend
Messages: 10
Registered: July 2009
Junior Member
Bypass tomcat, insert your own IWebappServer.

<extension
point="org.eclipse.help.appserver.server">
<server
class="com.barco.compose.mode.RemoteWebServer"
default="false"/>
</extension>

package com.barco.compose.mode;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.help.internal.appserver.AppserverPlugin;
import org.eclipse.help.internal.appserver.IWebappServer;

public class RemoteWebServer implements IWebappServer {

public RemoteWebServer() {
System.out.println("YEPLA");
}

private boolean running = true;

public String getHost() {
return
AppserverPlugin.getDefault().getPluginPreferences().getStrin g( "host");
}

public int getPort() {
return
AppserverPlugin.getDefault().getPluginPreferences().getInt("port ");
}

public boolean isRunning() {
return running;
}

public void start(int port, String host) throws CoreException {
}

public void start(String webappName, IPath path, ClassLoader
customLoader) throws CoreException {
}

public void stop() throws CoreException {
running = false;
}

public void stop(String webappName) throws CoreException {
}

}
Re: Eclipse remote help server (BindException) [message #594310 is a reply to message #470929] Wed, 21 November 2007 17:36 Go to previous message
Dieter Cailliau is currently offline Dieter CailliauFriend
Messages: 10
Registered: July 2009
Junior Member
This doesn't work after all, because the code still prefers tomcat over my
extension, because it only inspects the first plugin (from
AppserverPlugin), in stead of iterating them: the [0] is too bad...

// We need to pick up the non-default configuration
IConfigurationElement[] elements =
extensions[0].getConfigurationElements();

What does work is this: set the AppserverPlugin.appServer field to your
implementation, using reflection.

Field field = AppserverPlugin.class.getDeclaredField("appServer");
field.setAccessible(true);
field.set(AppserverPlugin.getDefault(),new RemoteWebServer());

The problem here is, that we need to get this done before any other code
calls that plugin: otherwise tomcat will be launched before we bypassed
it.

For example if the help view is open at startup-time, it reaches
AppserverPlugin faster, than my hack, giving trouble.
Re: Eclipse remote help server (BindException) [message #594318 is a reply to message #470930] Wed, 21 November 2007 19:26 Go to previous message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=124831 for a
discussion of this problem.

Dieter Cailliau wrote:
> This doesn't work after all, because the code still prefers tomcat over
> my extension, because it only inspects the first plugin (from
> AppserverPlugin), in stead of iterating them: the [0] is too bad...
> // We need to pick up the non-default configuration
> IConfigurationElement[] elements =
> extensions[0].getConfigurationElements();
>
> What does work is this: set the AppserverPlugin.appServer field to your
> implementation, using reflection.
> Field field = AppserverPlugin.class.getDeclaredField("appServer");
> field.setAccessible(true);
> field.set(AppserverPlugin.getDefault(),new RemoteWebServer());
>
> The problem here is, that we need to get this done before any other code
> calls that plugin: otherwise tomcat will be launched before we bypassed it.
> For example if the help view is open at startup-time, it reaches
> AppserverPlugin faster, than my hack, giving trouble.
>
>
Previous Topic:Help on Eclipse Help System
Next Topic:Embedding HTML Entities in Table of Contents?
Goto Forum:
  


Current Time: Fri Apr 26 03:14:29 GMT 2024

Powered by FUDForum. Page generated in 0.03529 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top