[
https://issues.apache.org/jira/browse/GUACAMOLE-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16221033#comment-16221033
]
Michael Jumper commented on GUACAMOLE-425:
------------------------------------------
It looks like the issue here is indeed Glassfish. Scrounging through the
Glassfish code, I found [the code which produces that
{{RuntimeException}}|http://grepcode.com/file/repo1.maven.org/maven2/org.glassfish.web/war-util/3.0/org/glassfish/web/loader/WebappClassLoader.java#944]:
{code:java}
...
try {
...
} catch (Throwable t) {
String msg = rb.getString(
"webappClassLoader.unableToLoadClass");
msg = MessageFormat.format(msg, name, t.toString());
throw new RuntimeException(msg, t);
}
...
{code}
Glassfish' internal class loader implementation has a blanket catch-all for any
{{Throwable}} that isn't handled by the class loader itself, in this case a
{{NoClassDefFoundError}}, which rethrows everything as a {{RuntimeException}}.
This will mask all but a few exception classes, breaking any web application
which relies on actually catching {{NoClassDefFoundError}}, such as Guacamole.
If newer versions of Glassfish suffer from the same problem, I guess we'll have
to broaden the exception handling within the WebSocket support detection
modules to defend against such things. In the meantime, using a different
servlet container like Tomcat or Jetty should work great.
> guacamole client cannot deploy on sun glassfish
> -----------------------------------------------
>
> Key: GUACAMOLE-425
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-425
> Project: Guacamole
> Issue Type: Bug
> Components: guacamole-client
> Affects Versions: 0.9.13-incubating
> Environment: Centos 5
> Reporter: Umut Yerci
> Attachments: guacamole_war_deploy.log
>
>
> I tried deploy guacamole.war file to sun glassfish it throw a error. Is it
> possible to deploy it into sun glassfish?
> command;
> {noformat}
> /opt/sun-glassfish/bin/asadmin deploy ~/guacamole.war
> {noformat}
> error;
> {noformat}
> com.sun.enterprise.admin.cli.CommandException: remote failure: Exception
> while loading the app : java.lang.Exception: java.lang.IllegalStateException:
> ContainerBase.addChild: start: org.apache.catalina.LifecycleException:
> com.google.inject.CreationException: Guice creation errors:
> 1) An exception was caught and reported. Message: Unable to load class with
> name
> [org.apache.guacamole.tunnel.websocket.jetty8.RestrictedGuacamoleWebSocketTunnelServlet],
> reason: java.lang.RuntimeException: Unable to load class with name
> [org.apache.guacamole.tunnel.websocket.jetty8.GuacamoleWebSocketTunnelServlet],
> reason: java.lang.NoClassDefFoundError:
> org/eclipse/jetty/websocket/WebSocketServlet
> at
> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
> 1 error
> Command deploy failed.
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)