-----Original Message-----
From: Anissa Lam <Anissa.Lam_at_Sun.COM>
To: dev_at_glassfish.dev.java.net
Date: Tue, 13 Feb 2007 08:59:03 -0800
Subject: Re: AdminGUI Custom Security Realms problem
>
> Hi,
> Gui is trying to do a class.forName( customClassname) and then try to
> determine if the custom class extends
> "com.sun.enterprise.security.auth.realm.IASRealm".
> Looks like that class.forName() is throwing NPE.
>
> try {
> realm = Class.forName(className);
> } catch (ClassNotFoundException ex) {
> //TODO Fine Log
> System.out.println("ClassNotFound Exception for " + className);
> handlerCtx.setOutputValue("result", false);
> }
>
> Are you sure the custom class is accessible ?
Yes, my realm works fine.
> Just now, i tried with a
> dummy class name, and got the NPE instead of ClassNotFoundException.
> I have filed
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=2404 to resolve
> this problem. Please add yourself to the cc list.
ok
>
> thanks
> Anissa.
>
> Dmitry Mozheyko wrote:
> > Hello all!
> > I use gf build b31 and custom security realms(my own classname, jaas-context etc..).
> > I can create and look realms in domain.xml without errors.
> > I can create through AdminGUI and my changes correctly writing into domain.xml.
> > But i can't view/edit custom realms with error:
> > [#|2007-02-13T10:13:49.866+0300|WARNING|sun-appserver9.1|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=13;_ThreadName=httpWorkerThread-4848-1
> > ;_RequestID=48333515-3b20-4d25-ad05-0392fe4d1cdf;|executePhase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl_at_7a893543) threw exception
> > java.lang.RuntimeException: java.lang.RuntimeException while attempting to process a 'beforeCreate' event for 'propertySheet'.
> > at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:344)
> > at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:316)
> > at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:331)
> > at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:270)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:345)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:360)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:360)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:360)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:360)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:177)
> > at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:196)
> > at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
> > at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
> > at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:79)
> > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
> > at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
> > at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:203)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
> > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
> > at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
> > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
> > at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
> > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:186)
> > at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
> > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
> > at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
> > at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:252)
> > at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
> > at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
> > at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
> > at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
> > at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
> > at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
> > at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
> > at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:103)
> > Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'propertySheet'.
> > at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:344)
> > at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:441)
> > at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:342)
> > ... 42 more
> > Caused by: java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > 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:421)
> > at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:342)
> > ... 44 more
> > Caused by: java.lang.NullPointerException
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Class.java:169)
> > at com.sun.enterprise.tools.admingui.handlers.FileUserHandler.hasManageUserButton(FileUserHandler.java:299)
> > ... 50 more
> > |#]
> >
> > [#|2007-02-13T10:13:49.946+0300|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=13;_ThreadName=httpWorkerThread-4848-1;_RequestID=4833
> > 3515-3b20-4d25-ad05-0392fe4d1cdf;|StandardWrapperValve[FacesServlet]: PWC1406: Servlet.service() for servlet FacesServlet threw exception
> > java.lang.NullPointerException
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Class.java:169)
> > at com.sun.enterprise.tools.admingui.handlers.FileUserHandler.hasManageUserButton(FileUserHandler.java:299)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > 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:421)
> > at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:342)
> > at com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:441)
> > at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:342)
> > at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:316)
> > at com.sun.jsftemplating.layout.descriptors.LayoutComponent.beforeCreate(LayoutComponent.java:331)
> > at com.sun.jsftemplating.layout.descriptors.LayoutComponent.getChild(LayoutComponent.java:270)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:345)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:360)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:360)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:360)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:360)
> > at com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:177)
> > at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:196)
> > at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
> > at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
> > at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:79)
> > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
> > at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
> > at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:203)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
> > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
> > at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
> > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
> > at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
> > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:186)
> > at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
> > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
> > at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
> > at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:252)
> > at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
> > at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
> > at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
> > at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
> > at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
> > at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
> > at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
> > at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:103)
> > |#]
> >
> > Non-custom buildin realms works fine.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>