Error Seen On Re-Running Predeployment Tool With Webcenter 10.1.3.4 (Doc ID 1287249.1)

Last updated on JUNE 07, 2017

Applies to:

Oracle WebCenter Portal - Version 10.1.3.4.0 to 10.1.3.4.0 [Release AS10gR3]
Information in this document applies to any platform.

Goal


Is there any way to avoid this error when re-deploying a Webcenter 10.1.3.4 Application?

500 Internal Server Error

java.lang.IllegalStateException:

ClassLoader "MyDashboard.web.MyDashboard:0.0.0" (from <web-module> in /u01/app/oracle/product/10.1.3/webcenter/j2ee/dashboards_oc4j/applications/MyDashboard/MyDashboard/): This loader has been closed and should not be in use. at oracle.classloader.util.ClassLoadAsserts.fail(ClassLoadAsserts.java:154) at oracle.classloader.PolicyClassLoader.checkState(PolicyClassLoader.java:1994)....


Steps to reproduce
================
- Open JDeveloper
- Select New Application from the menu.
- Name your application MyDashboard.
- For the Application Template, select WebCenter Application from the menu.
- Add a portlet producer (in this case a standard jsp186 portlet created by the wizard with the following jsp code:

<%@ page contentType="text/html"
pageEncoding="UTF-8"
import="javax.portlet.*,java.util.*,portlet.HelloWorldDemo,portlet.resource.HelloWorldDemoBundle"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<portlet:defineObjects/>
<p class="portlet-font">Welcome, this is the <%= renderRequest.getPortletMode().toString() %> mode.</p>



- Right click ViewController, select project Preferences and change the view name to something unique such as myDashboard.view
- Now Right click ViewController, choose New and select JSF > JSF JSP.
- In the Applications Navigator, right-click the ViewController project and select New from the context menu.
- In New Gallery under Categories, expand the General node and select Deployment Profiles.
- In New Gallery under Items, select WebCenter Application War. Click OK. You will now see a few more directories that are created.
- Look in web.xml for:

<servlet>
<servlet-name>jsp</servlet-name>


- Inside the <servlet> tag, make sure that the debug_mode is set to true:
- In the Applications Navigator right-click the newly created deployment profile, and select properties
from the context menu.
- Select the Specify the web context root option and enter a value for the field, for
example, MyDashboard.
- Right click the deployment profile and select Deploy to EAR file, which will store the EAR locally on your harddrive.
- Next, you will need to move the EAR file to the appserver manually. You can do this with, for example WinSCP.
- Move the file to $ORACLE_HOME.
- Now create a targeted EAR from the generic ear by running the following script from $ORACLE_HOME:

$ORACLE_HOME/jdk/bin/java –jar $ORACLE_HOME/adfp/lib/portlet-client-deploy.jar –predeploy –source <genericEAR> -target <targetedEAR>


It doesn’t matter where you put it the ear or the targeted ear, as you will browse to the targeted ear later on.

- When promted for MDS type:

$ORACLE_HOME/j2ee/<oc4j-instance>/dashboards-mds-mydashboard


- Then, press enter for all the remaining questions (we will keep the default settings).
- Now go to the container in Enterprise Manager.
- Select the container you want to deploy to, for example dashboards_OC4J, and under the Applications tab, press deploy.

- Now under archive chose the radiobutton: Archive is already present on the server where Application Server Control is running, and enter the absolute path for your targeted EAR. Click Next.
Choose a name and Context root for your application. Click Next.
- Keep the default values for the time being and Click Deploy.
- For now you can keep the default deployment properties – but make sure you select an application name and a context root.
- Now Lets say you make some adjustments - rerun the predeployment tool to create a new targeted ear (and a new mds directory - I have tried using the old one and creating a new one).

- Redeploy a JSF Web application by using the buttons in the Webcenter Enterprise manager and providing a targeted EAR.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms