After upgrading my GlassFish server from 3.0 to 3.1 using its updatetool the admin console was no longer working. When accessing the admin console, I only got an empty page. In the domain server.log file I noticed the following error:
[#|2011-05-07T20:58:45.708+0200|WARNING|glassfish3.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=102;_ThreadName=Thread-1;|ApplicationDispatcher[] PWC1231: Servlet.service() for servlet FacesServlet threw exception java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'event1'. at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:422) at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:394) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:348) at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:288) ...
After a little searching I found that this issue was apparently already reported and fixed (GLASSFISH-16087). Unfortunately on my server the problem still existed and the suggested workaround didn’t work for me. Fortunately directly changing the domain’s config/server.xml file directly did work. I shutdown Glassfix and lookup the following entry:
<property name="restAuthURL" value="http://localhost:${ADMIN_LISTENER_PORT}/management/sessions"/>
as I understood from the reported issue the server was no longer listening to localhost I changed it into (please note I added both the hostname and changed the protocol to https):
<property name="restAuthURL" value="https://prod.glassfish.mydomain.tld:${ADMIN_LISTENER_PORT}/management/sessions"/>
and after restarting my Glassfish server the admin console worked normally again.