6 Replies Latest reply on Jul 16, 2007 9:09 AM by krishna Gopu

    Class Cast Exception raised during Portal Initialization

    krishna Gopu Newbie

      Hi ,
      Can some one solve my problem, I am a newbie and trying to mix and work, around different examples of Portal from PortalSwap ("HelloWorld" things)

      JbossAS : ver 4.2
      Portal: ver 2.6

      Following is the stack trace of the exception raised when i diployed the Portal. It has the all the necessary components.

      11:42:52,509 INFO [TomcatDeployer] deploy, ctxPath=/BGportalInitial, warUrl=.../deploy/BGportalInitial.war/
      11:42:53,071 ERROR [STDERR] org.jboss.portal.portlet.container.PortletInitializationException: The portlet BGportalInitialPortlet
      threw a runtime exception during init
      11:42:53,071 ERROR [STDERR] at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:264)
      11:42:53,071 ERROR [STDERR] at org.jboss.portal.portlet.impl.container.PortletApplicationContextImpl.startPortletApplication(P
      ortletApplicationContextImpl.java:130)
      11:42:53,071 ERROR [STDERR] at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:
      153)
      11:42:53,071 ERROR [STDERR] at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:94)

      11:42:53,071 ERROR [STDERR] at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
      11:42:53,071 ERROR [STDERR] at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.start(PortalDeploymentInfo
      Context.java:211)
      11:42:53,071 ERROR [STDERR] at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:217)
      11:42:53,071 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      11:42:53,071 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      11:42:53,071 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
      11:42:53,071 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:42:53,071 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      11:42:53,071 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      11:42:53,071 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      11:42:53,071 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      11:42:53,071 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      11:42:53,071 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.j
      ava:142)
      11:42:53,071 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      11:42:53,071 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      11:42:53,071 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      11:42:53,071 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      11:42:53,071 ERROR [STDERR] at $Proxy198.deploy(Unknown Source)
      11:42:53,071 ERROR [STDERR] at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:259)
      11:42:53,081 ERROR [STDERR] at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:54)
      11:42:53,081 ERROR [STDERR] at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:
      160)
      11:42:53,081 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      11:42:53,081 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:42:53,081 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
      11:42:53,081 ERROR [STDERR] at $Proxy200.handleNotification(Unknown Source)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroad
      casterSupport.java:127)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadca
      sterSupport.java:108)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
      11:42:53,081 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
      11:42:53,081 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
      11:42:53,081 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:42:53,081 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.j
      ava:142)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      11:42:53,081 ERROR [STDERR] at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:
      238)
      11:42:53,081 ERROR [STDERR] at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerIntercept
      orSupport.java:188)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      11:42:53,081 ERROR [STDERR] at $Proxy183.start(Unknown Source)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      11:42:53,081 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
      11:42:53,081 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      11:42:53,081 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.j
      ava:142)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      11:42:53,081 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      11:42:53,081 ERROR [STDERR] at $Proxy9.deploy(Unknown Source)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentS
      canner.java:263)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentSca
      nner.java:274)
      11:42:53,081 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScan
      ner.java:225)
      11:42:53,081 ERROR [STDERR] Caused by: java.lang.ClassCastException: org.jboss.portlet.hello.HelloWorldJSPPortlet
      11:42:53,081 ERROR [STDERR] at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:231)
      11:42:53,081 ERROR [STDERR] ... 73 more
      11:42:53,101 WARN [PortletAppDeployment] Failed to create instance BGportalInitialInstance of portlet /BGportalInitial.BGportalIn
      itialPortlet because portlet /BGportalInitial.BGportalInitialPortlet is not available


      Thanks in advance.