Skip to Main Content

java.lang.ClassCastException: com.bea.portlet.container.PortletContextImpl cannot be cast to javax.s

2834801Oct 20 2016 — edited Oct 20 2016

Hi all,

I'm using JDeveloper (on Windows) and WebCenter Portal 12.2.1.

I'm attempting to deploy a ADF portlet (that's been portletized using the ADF portlet bridge method) but keep getting a repeating error message that I can't seem to progress past, yet I've been following all the Oracle documentation to a tee. I'm trying to create a very simple hello world type application using an "ADF Fusion Web Application" project template, to which I add a simple .jsf page with some output text and then click "Create Portlet Entry" to portletize the app. From here on I do the following:

  • Deploy the portlet from an application level as an .ear which is running on a managed WebLogic sever created from the "" domain creation script using all the portal / portlet related templates.
  • I'm given the following url: to access my portlet's producer test page (which I can)
  • I can then successfully access and test my portlet at this point directly via browser as a servlet.
  • To deploy to WebCenter, I open up WebCenter "Administration" > "Tools & Services" > "Portlet Producers" and register my given WSDL v2 url successfully (i.e. I've tested it)
  • Attempt to add the portlet to a portal page in the edit page catalog. <- At this point the portlet deployment fails.

I click on the portlet in the catalog to add it, and after a couple seconds of loading the portlet container is displaying the error message "Remote Portlet Error". I've attached an image showing this.

The weblogic server throws a repeating error message, I've also attached the complete log:

<Oct 20, 2016, 6:12:28,20 PM BST> <Error> <oracle.adfinternal.controller.application.AdfcExceptionHandler> <ADFC-50018>

java.lang.ClassCastException: com.bea.portlet.container.PortletContextImpl cannot be cast to javax.servlet.ServletContex

I don't understand why this isn't working with a completely fresh, essentially "hello world" type ADF application. I've successfully deployed and consumed JSR 286 portlets from the "WebCenter Portlet Producer Application" template using .jsp and not .jsf usinig an identical approach, of course, minus the ADF portlet bridge part.

Thank you in advance for any help,


Post Details
Locked due to inactivity on Nov 17 2016
Added on Oct 20 2016