Unable to Include Common WebCenter Jars in Shared Library (Doc ID 866987.1)

Last updated on NOVEMBER 22, 2016

Applies to:

Oracle WebCenter - Version: 10.1.3.2.0 to 10.1.3.5.0 - Release: AS10gR3 to AS10gR3
Information in this document applies to any platform.

Symptoms

Any application created in JDeveloper using the WebCenter template includes below mentioned JAR files in WEB-INF/lib/ folder:

- adf-faces-impl.jar
- custComps.jar
- jsf-impl.jar
- portlet-client-adf.jar

The first jar file itself is about 4 MB.  As due to some project prerequisites the ear/war files should be kept at a certain size and would be too big if those jars would be packaged into the ear file of each application, a shared library was created to contain those 4 jar files.

The application can be deployed successfully but when running the page, it returns the following error in the browser:

500 Internal Server Error
java.lang.NullPointerException at
javax.faces.webapp.FacesServlet.init(FacesServlet.java:165) at
com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0)].server.http.HttpApplication.loadServlet(HttpApplication.java:2361) at
com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0)].server.http.HttpApplication.findServlet(HttpApplication.java:4810) at
com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0)].server.http.HttpApplication.findServlet(HttpApplication.java:4734) at
com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0)].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2957)
at
com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0)].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:736)
at
com.evermind[Oracle Containers for J2EE 10g
(10.1.3.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448) at
com.evermind[Oracle Containers for J2EE 10g
(10.1.3.1.0)].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
at
com.evermind[Oracle Containers for J2EE 10g
(10.1.3.1.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117) at
com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110) at
 oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at
 oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at
 oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at
 oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at
com.evermind[Oracle Containers for J2EE 10g
(10.1.3.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298) at java.lang.Thread.run(Thread.java:595)

-- Steps To Reproduce:
1. create a simple WebCenter application 'Application_Test'(a JSR-168 Portlet on a jspx page) in JDev using the webcener template

2. create Shared Library in
JDEV_HOME\j2ee\home\shared-lib\WebCenterSharedLib\1.0

3. move the following jar files from
JDEV_HOME\jdev\mywork\Application_Test\ViewController\public_html\WEB-INF\lib to the shared library created in step 2:

+ adf-faces-impl.jar
+ custComps.jar
+ jsf-impl.jar
+ portlet-client-adf.jar

4. add the following entry to <OC4J_HOME>/j2ee/home/config/server.xml file:

<shared-library name="WebCenterSharedLib" version="1.0">
<code-source path="adf-faces-impl.jar"/>
<code-source path="custComps.jar"/>
<code-source path="jsf-impl.jar"/>
<code-source path="portlet-client-adf.jar"/>
</shared-library>


5. in the Project properties select libraries and add your library
(Class Path and Source Path need to contain the paths to the 4 jar files)

6. save and deploy

7. run the page

-> you will see the error

Cause

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