A wild guess would be try to cast it to the interface and not directly to the implementation ??

If you can give the entire trace, that would probably help better.

Amit

----Original Message Follows----
From: Zhonghui Ning <[EMAIL PROTECTED]>
Reply-To: "Jetspeed Users List" <jetspeed-user@jakarta.apache.org>
To: jetspeed-user@jakarta.apache.org,  [EMAIL PROTECTED]
Subject: Error in ClassCastException
Date: Thu, 17 Feb 2005 12:20:32 +0000

Hello everyone,

I want to implement a portlet in jetspeed 2 + tomcat 5.0.28 + linux. My code can compile but I got a runtime error after I deploy my portlet in jetspeed. The error is java.lang.ClassCastException: org.apache.jetspeed.container.JetspeedPortletConfig.The error part of my code is in the following.
Any help? Thanks.
Zhonghui


// PortletConfigImpl.java

package com.star.portlet;
import javax.portlet.PortletConfig;
public class PortletConfigImpl implements PortletConfig {
......
}

// StrutsPortlet.java
package com.star.portlet;
import javax.portlet.PortletConfig;
public class StrutsPortlet extends GenericPortlet {

      private PortletConfigImpl _portletConfig;

public void init(PortletConfig config) throws PortletException {
super.init(config); _portletConfig = (PortletConfigImpl)config; // Error: java.lang.ClassCastException


       _editAction = getInitParameter("edit-action");
       _helpAction = getInitParameter("help-action");
       _viewAction = getInitParameter("view-action");

       _copyRequestParameters = GetterUtil.get(
           getInitParameter("copy-request-parameters"), true);
   }

......
}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to