Setting a WebCenter Maintenance Page

When you shutdown WebCenter, the apache weblogic mod takes over the control of error pages and shows:

Failure of server APACHE bridge:
No backend server available for connection: timed out after 10 seconds or idempotent set to OFF.

Let’s face it that’s not user friendly and needs to be replaced with a nice page.

Solution
You can set a custom error page following the steps below:

*if you haven’t got OHS_HOME, I recommend you set up this environment variable. The path should look similar to the below:
/apps/oracle/product/middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1

First copy your custom html to the server.
Move the files to
$OHS_HOME/htdocs/
For example you have a file called
maintenance.html

Next modify the config file for the weblogic mod
nano $OHS_HOME/mod_wl_ohs.conf
within the Webcenter location add


LOCATION STUFF
ErrorPage http://[hostname]/maintenance.html

Now to test the change, restart OHS. (if you’re in clustered mode run with 1 spaces, 1 OHS only for now)
Stop Spaces.
Go to WebCenter home.
New html maintenance page displays.
Restart spaces in WLS console.
Spaces displays correctly.

Ensure you copy the files/change in every OHS if you’re in a clustered deployment.

——————————————————————————————————————–

You can set up the maintenance page when at the Web server level when the application is down in the App layer. Here is the reference for Oracle HTTP server, same you can do it for any other web server too..!!

You can achieve this by configuring an error page at the WebServer (part of web-tier).

For example, in the case of a Oracle HTTP Server (OHS), you could do the following:

1. Place your maintenance page at /config/OHS//htdocs.

For Example, /config/OHS//htdocs/errorPage500.html

2. Open the OHS httpd.conf located at /config/OHS/ in an editor and search for the string ‘ErrorDocument 403′ which can be seen as commented text. Next to the commented text line, add the below lines for configuring the Error

Pages (500 —> backend server unavailable, 403 —> forbidden request, 404 –> Resource Not available). For the below example, we had 3 html pages errorPage500.html, errorPage403.html and errorPage404.html are deployed in OHS htdocs.

ErrorDocument 500 /errorPage500.html
ErrorDocument 403 /errorPage403.html
ErrorDocument 404 /errorPage404.html

3. Save the changes to the httpd.conf file.

4. Restart OHS server

———————————————————————————————————————-

Maintenance page for weblogic server

In Apache httpd.conf file put the below , replace the /console with proper context root and same with the host and port no.


SetHandler weblogic-handler
WebLogicHost 192.168.50.57
WebLogicPort 7001
ErrorPage /maintain.html

Place your customized maintain.html in the Root directory.

Happy learning with Vinay in techartifact….

Deploy ADF application as shared library in weblogic

Shared library – WebLogic Shared Library is an Enterprise Application Archive, a stand-alone EJB, a Web Application module, or a JAR file that is registered with Oracle WebLogic Server as a shared library. The library resources can be shared between multiple applications, alleviating the need to have duplicate copies of the resources in each application. For an example, we can all dependency as shared libraries in weblogic.

Normally in bigger application, best practice is to use common features application or dependency as shared library in weblogic. For example, taking an webcenter portal application
we are making custom taskflow and using it in webcenter portal application. We can deploy these adf taskflow as shared libraries and can reference in weblogic.xml for Portal application.

We have two option.
– Deploy adf app as jar and then deploy as shared library or wrap jar into war profile and deploy as shared library.
– We can directly deploy adf application as war shared lib in Weblogic.

Following is the process for ADF/ Webcenter Application in jdeveloper

1) Create deployment profile as war file.
2) Create an MANIFEST.MF file as META-INF/MANIFEST.MF

Manifest-Version: 1.0
Implementation-Title: ADF_Shared_Lib
Implementation-Version: 1.0
Specification-Title: ADF_Shared_Lib
Specification-Version: 1.0
Extension-Name: ADF_Shared_Lib

3) Edit war deployment profile and add MANIFEST.MF in war options.

555

4) Deploy ADF taskflow to weblogic(assuming you have made connection with weblogic in jdeveloper) to specific managed server or admin server.
5) mark option as deploy as shared library instead of application.

11

222

444

6) In master (Portal) application enter reference of your shared library as follows

ADF_Shared_Lib 1.0
1.0
true

This way you can directly deploy from the jdeveloper. Other options is to deploy as war file and find war file from specified location and go to weblogic admin console
and install as shared library

11111

Note: If you deploying shared library again, make sure, you increase implementation version every time to specify version no.

Video –

Troubleshoot :

IOException: ‘Invalid header field; with manifest
Solution – Make sure name is name is correct. There is proper spacing after colon in manifest file content.

Unresolved WebApp library references defined in weblogic.xml
Solution- Make sure you have same implementation version and specification version of shared library, If there is mismatch you will get this error.

Till then happy deployment in Weblogic with Vinay…..