dev@glassfish.java.net

Re: admingui java.lang.NoClassDefFoundError: com/sun/web/security/SSLSocketFactory

From: V B Kumar Jayanti <Vbkumar.Jayanti_at_Sun.COM>
Date: Mon, 18 Aug 2008 17:21:24 +0530

Amy Roh wrote:

> I have the latest workspace from this morning with clean build but
> cannot create http-listener using admingui
>
> Caused by: java.lang.NoClassDefFoundError:
> com/sun/web/security/SSLSocketFactory
> at
> org.glassfish.admingui.handlers.SSLHandlers.getSupportedCipherSuites(SSLHandlers.java:541)
>
> at
> org.glassfish.admingui.handlers.SSLHandlers.getSSLProperties(SSLHandlers.java:185)
>
> ... 73 more
> |#]
>
I have filed Issue :
https://glassfish.dev.java.net/issues/show_bug.cgi?id=5521, for this.

Please use the following code now :

1. In your admingui pom.xml remove dependency on :
<groupId>org.glassfish.security</groupId>
    <artifactId>websecurity</artifactId>

2. Add dependency on :
<groupId>org.glassfish.security</groupId>
    <artifactId>securitycommon</artifactId>
3. replace the code that was accessing SSLSocketFactory with the
following :

  import com.sun.enterprise.security.ssl.SSLUtils;

  Habitat habitat = ....
  SSLUtils sslUtils = habitat.getComponent(SSLUtils.class);
  String[] cipherSuites = sslUtils.getSupportedCipherSuites();

Let me know if this works for you. You can also try and @Inject (HK2)
SSLUtils since it is a HK2 Service.


regards,
kumar

> Is this a known issue / workaround?
>
> Full log -
>
> [#|2008-08-14T13:31:14.672-0700|SEVERE||javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=20;_ThreadName=Thread-3;INVOKE_APPLICATION
> 5;/web/configuration/listenersSslNew.jsf;javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl_at_c5c32e];|JSF1054:
> (Phase ID: INVOKE_APPLICATION 5, View ID:
> /web/configuration/listenersSslNew.jsf) Exception thrown during phase
> execution:
> javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl_at_c5c32e]|#]
>
>
> [#|2008-08-14T13:31:14.691-0700|SEVERE||javax.enterprise.system.container.web|_ThreadID=20;_ThreadName=Thread-3;|StandardWrapperValve[FacesServlet]:
> PWC1406: Servlet.service() for servlet FacesServlet threw exception
> java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException while attempting to
> process a 'command' event for 'nextButton'.
> 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.event.CommandActionListener.invokeCommandHandlers(CommandActionListener.java:132)
>
> at
> com.sun.jsftemplating.layout.event.CommandActionListener.processAction(CommandActionListener.java:80)
>
> at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
> at
> javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771)
> at javax.faces.component.UICommand.broadcast(UICommand.java:372)
> at
> com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
> at
> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
> at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
> at
> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
>
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
> at
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
> at
> com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:80)
>
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
> at
> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:337)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
>
> at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
>
> at
> org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:451)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
> at
> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
>
> at
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
>
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
>
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
> at
> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:304)
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:223)
>
> at
> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:621)
>
> at
> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:552)
>
> at
> com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:800)
>
> at
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
>
> at
> com.sun.enterprise.v3.services.impl.HttpProtocolFilter.execute(HttpProtocolFilter.java:82)
>
> at
> com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:70)
>
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
>
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
>
> at
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
>
> at
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
>
> at
> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:169)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> com.sun.jsftemplating.layout.descriptors.handler.Handler.invoke(Handler.java:422)
>
> at
> com.sun.jsftemplating.layout.descriptors.LayoutElementBase.dispatchHandlers(LayoutElementBase.java:420)
>
> ... 50 more
> Caused by: java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException while attempting to
> process a 'beforeCreate' event for 'sun_propertySheetSection140'.
> 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:287)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:552)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:581)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:581)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:581)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:581)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.buildUIComponentTree(LayoutViewHandler.java:581)
>
> at
> com.sun.jsftemplating.layout.LayoutViewHandler.createView(LayoutViewHandler.java:251)
>
> at
> com.sun.jsftemplating.handlers.NavigationHandlers.navigate(NavigationHandlers.java:162)
>
> ... 56 more
>
> Thanks,
> Amy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>