Understanding WebLogic Server Application Classloading
http://docs.oracle.com/cd/E24329_01/web.1211/e24368/classloading.htm
http://blog.eisele.net/2011/01/using-new-weblogic-classloader-analysis.html
https://blogs.oracle.com/jeffwest/entry/weblogic_1034_classloader_analysis_tool
Using JSF and JSTL With Web Applications
http://docs.oracle.com/cd/E24329_01/web.1211/e21049/configurejsfandjtsl.htmCreate new JSF2 test project using Eclipse OEPE
Deploy JSF project to WLS
Run CAT
WLS must not be in Production mode - disable in config.xml
<production-mode-enabled>false</production-mode-enabled>
System Classloaders
Type: sun.misc.Launcher$ExtClassLoader
HashCode: 27355241
Classpath:
/opt/weblogic/jdk160_29/jre/lib/ext/dnsns.jar
/opt/weblogic/jdk160_29/jre/lib/ext/localedata.jar
/opt/weblogic/jdk160_29/jre/lib/ext/sunjce_provider.jar
/opt/weblogic/jdk160_29/jre/lib/ext/sunpkcs11.jar
Type: sun.misc.Launcher$AppClassLoader
HashCode: 13288040
Classpath:
/opt/weblogic/jdk160_29/lib/tools.jar
/opt/weblogic/modules/features/weblogic.server.modules_12.1.1.0.jar
/opt/weblogic/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar
/opt/weblogic/modules/org.apache.ant_1.7.1/lib/ant-all.jar
/opt/weblogic/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/opt/weblogic/patch_oepe101/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/opt/weblogic/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/opt/weblogic/wlserver_12.1/common/derby/lib/derbyclient.jar
/opt/weblogic/wlserver_12.1/server/lib/weblogic.jar
/opt/weblogic/wlserver_12.1/server/lib/weblogic_sp.jar
/opt/weblogic/wlserver_12.1/server/lib/webservices.jar
/opt/weblogic/wlserver_12.1/server/lib/xqrl.jar
Type: weblogic.utils.classloaders.GenericClassLoader
HashCode: 33228044
Classpath:
Application classloaders
Type: weblogic.utils.classloaders.FilteringClassLoader
HashCode: 22012742
Filter: []
Classpath: empty
Type: weblogic.utils.classloaders.GenericClassLoader
HashCode: 12339795
Classpath:
Type: weblogic.utils.classloaders.FilteringClassLoader
HashCode: 30552408
Filter: []
Classpath: empty
Type: weblogic.utils.classloaders.ChangeAwareClassLoader
HashCode: 21104537
Classpath:
/home/dave/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/7qcgwh
/home/dave/workspace/testJSF2/build/classes
Add JSF 2.1 facet using OEPE
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd"
version="2.1">
<application>
<message-bundle>resources.application</message-bundle>
<locale-config>
<default-locale>en</default-locale>
</locale-config>
</application>
</faces-config>
Run CAT on JSF2.1 application
System Classloaders
Type: sun.misc.Launcher$ExtClassLoader
HashCode: 27355241
Classpath:
/opt/weblogic/jdk160_29/jre/lib/ext/dnsns.jar
/opt/weblogic/jdk160_29/jre/lib/ext/localedata.jar
/opt/weblogic/jdk160_29/jre/lib/ext/sunjce_provider.jar
/opt/weblogic/jdk160_29/jre/lib/ext/sunpkcs11.jar
Type: sun.misc.Launcher$AppClassLoader
HashCode: 13288040
Classpath:
/opt/weblogic/jdk160_29/lib/tools.jar
/opt/weblogic/modules/features/weblogic.server.modules_12.1.1.0.jar
/opt/weblogic/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar
/opt/weblogic/modules/org.apache.ant_1.7.1/lib/ant-all.jar
/opt/weblogic/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/opt/weblogic/patch_oepe101/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/opt/weblogic/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/opt/weblogic/wlserver_12.1/common/derby/lib/derbyclient.jar
/opt/weblogic/wlserver_12.1/server/lib/weblogic.jar
/opt/weblogic/wlserver_12.1/server/lib/weblogic_sp.jar
/opt/weblogic/wlserver_12.1/server/lib/webservices.jar
/opt/weblogic/wlserver_12.1/server/lib/xqrl.jar
Type: weblogic.utils.classloaders.GenericClassLoader
HashCode: 33228044
Classpath:
Application Classloaders
Type: weblogic.utils.classloaders.FilteringClassLoader
HashCode: 22012742
Filter: []
Classpath: empty
Type: weblogic.utils.classloaders.GenericClassLoader
HashCode: 12339795
Classpath:
Change JSF version to 1.2
Using Weblogic 12c deployable libsAdd Weblogic shared libraries for JSF1
JSF 1 config file
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
version="1.2">
<application>
<message-bundle>resources.application</message-bundle>
<locale-config>
<default-locale>en</default-locale>
</locale-config>
</application>
</faces-config>
refer to JSF 1.2 shared library in weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:weblogic-version>12.1.1</wls:weblogic-version>
<wls:context-root>testJSF1</wls:context-root>
<wls:library-ref>
<wls:library-name>jsf</wls:library-name>
<wls:specification-version>1.2</wls:specification-version>
<wls:exact-match>true</wls:exact-match>
</wls:library-ref>
</wls:weblogic-web-app>
WebApplication 2.5 web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>testJSF1</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
</web-app>
CAT for JSF 1 project
System Classloaders
Type: sun.misc.Launcher$ExtClassLoader
HashCode: 27355241
Classpath:
/opt/weblogic/jdk160_29/jre/lib/ext/dnsns.jar
/opt/weblogic/jdk160_29/jre/lib/ext/localedata.jar
/opt/weblogic/jdk160_29/jre/lib/ext/sunjce_provider.jar
/opt/weblogic/jdk160_29/jre/lib/ext/sunpkcs11.jar
Type: sun.misc.Launcher$AppClassLoader
HashCode: 13288040
Classpath:
/opt/weblogic/jdk160_29/lib/tools.jar
/opt/weblogic/modules/features/weblogic.server.modules_12.1.1.0.jar
/opt/weblogic/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar
/opt/weblogic/modules/org.apache.ant_1.7.1/lib/ant-all.jar
/opt/weblogic/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/opt/weblogic/patch_oepe101/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/opt/weblogic/patch_wls1211/profiles/default/sys_manifest_classpath/weblogic_patch.jar
/opt/weblogic/wlserver_12.1/common/derby/lib/derbyclient.jar
/opt/weblogic/wlserver_12.1/server/lib/weblogic.jar
/opt/weblogic/wlserver_12.1/server/lib/weblogic_sp.jar
/opt/weblogic/wlserver_12.1/server/lib/webservices.jar
/opt/weblogic/wlserver_12.1/server/lib/xqrl.jar
Type: weblogic.utils.classloaders.GenericClassLoader
HashCode: 33228044
Classpath:
Application Classloaders
Type: weblogic.utils.classloaders.FilteringClassLoader
HashCode: 30798826
Filter: []
Classpath: empty
Type: weblogic.utils.classloaders.GenericClassLoader
HashCode: 25758036
Classpath:
Type: weblogic.utils.classloaders.FilteringClassLoader
HashCode: 11509600
Filter: [javax.faces.*, com.sun.faces.*, com.bea.faces.*]
Classpath: empty
Type: weblogic.utils.classloaders.ChangeAwareClassLoader
HashCode: 28974499
Classpath:
/home/dave/domains/base_domain/servers/AdminServer/tmp/_WL_user/_auto_generated_ear_/7qcgwi
/home/dave/domains/base_domain/servers/AdminServer/tmp/_WL_user/jsf/2ndlrw/WEB-INF/lib/glassfish-jsf_1.0.0.0_1-2-15.jar
/home/dave/workspace/testJSF1/build/classes
/opt/weblogic/modules/features/../glassfish.jsf_1.0.0.0_1-2-15.jar
/opt/weblogic/modules/features/../javax.jsf_1.2.0.0_1-2.jar
/opt/weblogic/modules/features/weblogic.server.modules.jsf_12.1.1.0.jar
Required libs for JSF 1.2
JSF 1.2 requires java 1.5 or later, JSP 2.1, JSTL 1.2 and a Java Servlet 2.5 implementation. http://myfaces.apache.org/core12/index.html
Deploy JSF 1.2 shared libraries for WLS ( already contains filtering classloader in descriptor)
http://docs.oracle.com/cd/E24329_01/web.1211/e21049/configurejsfandjtsl.htm
List of WLS 12.1.1 shared libs
[dave@dave bin]$ ls /opt/weblogic/wlserver_12.1/common/deployable-libraries/
active-cache-1.0.jar jersey-bundle-1.1.5.1.war jsr311-api-1.1.1.war rome-1.0.war
jackson-core-asl-1.1.1.war jettison-1.1.war jstl-1.1.2.war toplink-grid-1.0.jar
jackson-jaxrs-1.1.1.war jsf-1.2.war jstl-1.2.war weblogic-sca-1.1.war
jackson-mapper-asl-1.1.1.war jsf-2.0.war pubsub-1.0.war
[dave@dave bin]$ cd /opt/weblogic/wlserver_12.1/common/deployable-libraries/
[dave@dave deployable-libraries]$ jar tvf jstl-1.1.2.war
0 Thu May 11 22:59:30 CEST 2006 META-INF/
385 Thu May 11 22:59:28 CEST 2006 META-INF/MANIFEST.MF
75 Thu May 11 22:59:30 CEST 2006 META-INF/javadoc.mf
0 Thu May 11 22:59:30 CEST 2006 WEB-INF/
11356 Thu May 11 22:59:30 CEST 2006 WEB-INF/LICENSE
0 Thu May 11 22:59:30 CEST 2006 WEB-INF/lib/
20682 Thu May 11 22:59:30 CEST 2006 WEB-INF/lib/jstl.jar
393259 Thu May 11 22:59:30 CEST 2006 WEB-INF/lib/standard.jar
202 Thu May 11 22:59:28 CEST 2006 WEB-INF/web.xml
577 Tue Feb 15 14:16:18 CET 2011 WEB-INF/weblogic.xml
[dave@dave deployable-libraries]$ jar tvf jstl-1.2.war
0 Wed Dec 07 08:45:48 CET 2011 META-INF/
397 Wed Dec 07 08:45:46 CET 2011 META-INF/MANIFEST.MF
0 Wed Dec 07 08:45:48 CET 2011 WEB-INF/
0 Wed Dec 07 08:45:48 CET 2011 WEB-INF/lib/
71 Wed Dec 07 08:45:48 CET 2011 META-INF/javadoc.mf
23977 Wed Dec 07 08:45:48 CET 2011 WEB-INF/lib/glassfish-jstl_1.2.0.2.jar
202 Wed Dec 07 08:45:48 CET 2011 WEB-INF/web.xml
[dave@dave deployable-libraries]$ jar tvf jsf-1.2.war
0 Wed Dec 07 08:45:44 CET 2011 META-INF/
416 Wed Dec 07 08:45:42 CET 2011 META-INF/MANIFEST.MF
0 Wed Dec 07 08:45:44 CET 2011 WEB-INF/
0 Wed Dec 07 08:45:44 CET 2011 WEB-INF/lib/
66 Wed Dec 07 08:45:44 CET 2011 META-INF/javadoc.mf
33554 Wed Dec 07 08:45:44 CET 2011 WEB-INF/lib/glassfish-jsf_1.0.0.0_1-2-15.jar
202 Wed Dec 07 08:45:44 CET 2011 WEB-INF/web.xml
758 Wed Dec 07 08:45:44 CET 2011 WEB-INF/weblogic.xml
[dave@dave deployable-libraries]$