1 Reply Latest reply on Jan 6, 2014 4:47 AM by Vu Viet Phuong

    Exception while calling service list in GateIn 3.6

    Anish Antony Newbie

      I write the following code for list out all the service in GateIn (I am using GateIn 3.6 with JBOSS AS7 as server)

      List serviceList = ExoContainerContext.getCurrentContainer().getComponentInstances();

      When i am calling this code i got following exception

      12:01:26,379 ERROR [exo.kernel.container.MX4JComponentAdapter] (http-localhost-127.0.0.1-8087-1) Failed to instanciate plugin LogoutFilter for component org.gatein.sso.integration.SSOFilterIntegratorImpl@32bc15b4: null: java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_37]
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_37]
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_37]
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_37]
           at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:422) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
           at org.exoplatform.container.jmx.MX4JComponentAdapter.addComponentPlugin(MX4JComponentAdapter.java:155) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
           at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:114) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
           at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
           at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:468) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
           at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstancesOfType(ConcurrentPicoContainer.java:366) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
           at org.exoplatform.container.CachingContainer.getComponentInstancesOfType(CachingContainer.java:111) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
           at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstances(ConcurrentPicoContainer.java:350) [exo.kernel.container-2.4.3-GA.jar:2.4.3-GA]
           at com.new.myimpl.view.util.UserDashboardService.addDefaultPortlet(UserDashboardService.java:30) [classes:]
           at com.new.myimpl.view.util.myimplGenericPortlet.doView(myimplGenericPortlet.java:729) [classes:]
           at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:354) [portlet-api-2.0.jar:]
           at javax.portlet.GenericPortlet.render(GenericPortlet.java:259) [portlet-api-2.0.jar:]
           at com.new.myimpl.view.util.myimplGenericPortlet.render(myimplGenericPortlet.java:113) [classes:]
           at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:592) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.exoplatform.portal.application.ApplicationMonitoringFilter.doFilter(ApplicationMonitoringFilter.java:65) [exo.portal.webui.portal-3.6.0.Final.jar:3.6.0.Final]
           at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:529) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.aspects.EventPayloadInterceptor.invoke(EventPayloadInterceptor.java:197) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.wsrp.payload.WSRPEventPayloadInterceptor.invoke(WSRPEventPayloadInterceptor.java:153)
           at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.aspects.RequestAttributeConversationInterceptor.invoke(RequestAttributeConversationInterceptor.java:119) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.aspects.CCPPInterceptor.invoke(CCPPInterceptor.java:65) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:49) [pc-bridge-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.aspects.SessionInvalidatorInterceptor.invoke(SessionInvalidatorInterceptor.java:55) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.access$201(ContextDispatcherInterceptor.java:46) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor$CallableImpl.call(ContextDispatcherInterceptor.java:119) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
           at org.exoplatform.portal.webui.application.ExoServerContext$1.doCallback(ExoServerContext.java:49) [exo.portal.webui.portal-3.6.0.Final.jar:3.6.0.Final]
           at org.gatein.wci.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:82) [wci-wci-2.3.1.Final.jar:2.3.1.Final]
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_37]
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_37]
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_37]
           ....
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
           at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]
      Caused by: java.lang.RuntimeException: Unable to load class ${gatein.sso.filter.logout.class} with classloaders ModuleClassLoader for Module "deployment.myimpl.war:main" from Service Module Loader, ModuleClassLoader for Module "deployment.myimpl.war:main" from Service Module Loader and Class.forName
           at org.gatein.sso.integration.SSOUtils$2.run(SSOUtils.java:114) [sso-integration-1.3.3.Final.jar:1.3.3.Final]
           at org.gatein.sso.integration.SSOUtils$2.run(SSOUtils.java:77) [sso-integration-1.3.3.Final.jar:1.3.3.Final]
           at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.6.0_37]
           at org.gatein.sso.integration.SSOUtils.loadClass(SSOUtils.java:76) [sso-integration-1.3.3.Final.jar:1.3.3.Final]
           at org.gatein.sso.integration.SSOFilterIntegratorPlugin.(SSOFilterIntegratorPlugin.java:70) [sso-integration-1.3.3.Final.jar:1.3.3.Final]
           ... 223 more
      Caused by: java.lang.ClassNotFoundException: ${gatein.sso.filter.logout.class} from [Module "deployment.myimpl.war:main" from Service Module Loader]
           at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
           at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
           at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
           at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_37]
           at java.lang.Class.forName(Class.java:169) [rt.jar:1.6.0_37]
           at org.gatein.sso.integration.SSOUtils$2.run(SSOUtils.java:110) [sso-integration-1.3.3.Final.jar:1.3.3.Final]
           ... 227 more
      
      
        • 1. Re: Exception while calling service list in GateIn 3.6
          Vu Viet Phuong Novice

          I wonder why this exception relates to this code snipet

          List serviceList = ExoContainerContext.getCurrentContainer().getComponentInstances();


          I see that this is the root of issue:

          Caused by: java.lang.ClassNotFoundException: ${gatein.sso.filter.logout.class}

          You may need to re-configure SSO, pls look at the gatein document for details. The config file is TOMCAT/gatein/conf/configuration.properties