Skip to Content
author's profile photo
Former Member

ClassCastException in Migrated iViews

Hi All,

I have migrated contents from EP5 to EP6 SR1. In the EP6 portal most of the Java iViews are giving same error which is ClassCastException in a java file called com.bearingpoint.portal.framework.Config.java. The exception is as below:

original exception : java.lang.ClassCastException at com.bearingpoint.portal.framework.Config.createConfig(Config.java:68) at com.bearingpoint.portal.sapportal.SapportalController.doContent(SapportalController.java:32) at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209) at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114) at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189) at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215) at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646) at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136) at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189) at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753) at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:232) at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522) at java.security.AccessController.doPrivileged(Native Method) at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37) at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162) .

The code line where this exception is coming is as below:

public static Config createConfig(Context applicationCtx, String base, String configFolder){

Object config = applicationCtx.getAttribute("fw.config");

if (config!= null){

return (Config) config; //HERE the ERROR comes

} else {

config = new Config(base, configFolder);

applicationCtx.setAttribute("fw.config",config);

return (Config) config; //HERE the ERROR comes

}

}

It is returning a Config object from the class with the same name i.e. from Config.java.

If anybody has any idea whatsoever on this issue please help me.

Regards,

Shubhadip

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Oct 06, 2005 at 08:55 AM

    Hi Shubhadip,

    sounds like you have deployed the Config class more than once (for example, within different PARs). It has been loaded by different classloaders, and so the first class cast tries to cast a Config object, where the class has been loaded by ClassLoader A, to a Config object, where the class has been loaded by ClassLoader B.

    Check this.

    Hope it helps

    Detlev

    Add comment
    10|10000 characters needed characters exceeded