dev@glassfish.java.net

reload gfv3 module

From: Claudio Miranda <claudio_at_claudius.com.br>
Date: Sat, 17 Jan 2009 13:52:39 -0200

I want to reload a module I have copied to modules directory.
glassfish is running.
I open the felix shell, issue the ps command, locate the ID related to
my module.
I have tried 2 commands: stop/start and uninstall/install
The stop/start command, has no effect.
After uninstall, I need to install the module, so I do: install
file:///opt/glassfishv3/glassfish/modules/console-certmanager.jar
ps command, shows the module is active
[ 127] [Active ] [ 1] Certificate Admin Console Plugin (3.0.0.SNAPSHOT)

Then, I try to load the admin web console, it throws an exception

PWC1406: Servlet.service() for servlet FacesServlet threw exception
java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException while attempting to
process a 'afterCreate' event for 'head'.
        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.afterCreate(LayoutComponent.java:363)
......[exception cut]
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedMethodAccessor579.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:422)
        at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
        ... 54 more
Caused by: java.lang.IllegalStateException: The bundle is uninstalled.
        at org.apache.felix.framework.Felix.getBundleResource(Felix.java:1362)
        at org.apache.felix.framework.BundleImpl.getResource(BundleImpl.java:187)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2.getResource(OSGiModuleImpl.java:367)
        at org.jvnet.hk2.osgiadapter.OSGiModulesRegistryImpl$1.findResource(OSGiModulesRegistryImpl.java:254)
        at java.lang.ClassLoader.getResource(ClassLoader.java:978)
        at org.glassfish.web.loader.WebappClassLoader.getResource(WebappClassLoader.java:1172)
        at java.lang.ClassLoader.getResource(ClassLoader.java:973)
        at com.sun.jsftemplating.util.FileUtil.searchForFile(FileUtil.java:170)
        at com.sun.jsftemplating.layout.xml.XMLLayoutDefinitionManager.accepts(XMLLayoutDefinitionManager.java:110)
        at com.sun.jsftemplating.layout.LayoutDefinitionManager.getLayoutDefinitionManager(LayoutDefinitionManager.java:344)
        at com.sun.jsftemplating.layout.LayoutDefinitionManager.getLayoutDefinition(LayoutDefinitionManager.java:150)
        at org.glassfish.admingui.handlers.PluginHandlers.includeIntegrationPoint(PluginHandlers.java:317)

So, what is the correct way to reload a module ?

-- 
  Claudio Miranda
  _______________________________________________
  http://www.claudius.com.br   claudio(o)claudius.com.br