Jay SenSharma

Jay SenSharma

Many times we get the following kind of error while explicitly compiling our Applications using weblogic.appc utility or the Ant version of this utility.

<Sep 15, 2010 1:59:07 PM IST> <Info> <J2EE> <BEA-160186> <Compiling EAR module ‘JsfLibraryWebApp.war’>
<Sep 15, 2010 1:59:08 PM IST> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>Unresolved WebApp library references defined in weblogic.xml, of module ‘JsfLibraryWebApp.war’ [Extension-Name: jstl, Specification-Version:
1.2, exact-match: true]
, [Extension-Name: jsf, Specification-Version: 1.2, exact-match: true]

Based on teh comment which gave me an idea to develop a Post on this http://middlewaremagic.com/weblogic/?page_id=2599#comment-1638 To get rid of it Please use the following Kind of ANT script.

Step1). Suppose your application “JsfLibraryDemoA.ear” has a “WEB-INFweblogic.xml” file has following kind of entry in it to refer to JSTL and JSF shared Libraries:

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://www.bea.com/ns/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://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">

Step2). So while compiling it using “weblogic.appc” utility make sure that you use the folowing command:

java weblogic.appc -source 1.5 -output OUT_A -library C:bea103wlserver_10.3commondeployable-librariesjsf-1.2.war,C:bea103wlserver_10.3commondeployable-librariesjstl-1.2.war JsfLibraryDemoA.ear

Note: Please provide the Comma Separated Path of your Shared Libraries as demonstrated above.
Step3). If you are using ANT build.xml file to compile your Application which refer to some Shared Libraries then Please do the following:

<project name="WeblogicCompilation" basedir="." default="appc">
<property name="wl.home" value="C:/bea103/wlserver_10.3" />
<property name="application.src" value="C:JSF_Lib_TestJsfLibraryDemoB.ear" />
<path id="wlappc.classpath">
<fileset dir="${wl.home}/server/lib">
<include name="*.jar"/>

<taskdef name="wlappc" classpathref="wlappc.classpath" classname="weblogic.ant.taskdefs.j2ee.Appc"/>

<target name="appc">
<wlappc source="${application.src}"   keepgenerated="true" verbose="true"
output="${application.src}_Output" />


Make sure that the “C:bea103wlserver_10.3commondeployable-libraries” directory has the Shared Libraries (It may be Any Directory which contains the required Shared Libraries EAR/WAR) :


Volume in drive C is OS Disk
Volume Serial Number is 7485-2B7F
Directory of C:bea103wlserver_10.3commondeployable-libraries
10/29/2008  05:52 AM         1,713,572 jsf-1.2.war
10/29/2008  05:52 AM         2,186,511 jsf-myfaces-1.1.1.war
10/29/2008  05:52 AM         3,547,446 jsf-myfaces-1.1.3.war
10/29/2008  05:52 AM         1,749,358 jsf-ri-1.1.1.war
10/29/2008  05:52 AM           373,961 jstl-1.1.2.war
10/29/2008  05:52 AM           331,287 jstl-1.2.war
10/29/2008  05:52 AM             5,681 pubsub-1.0.war
7 File(s)      9,907,816 bytes
3 Dir(s)  133,049,864,192 bytes free




Jay SenSharma

If you enjoyed this post, please considerleaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.