Thursday, September 25, 2014

Ant script - Pre-compile JSPX files - ADF application

I happened to work on implementing the pre-compile jsps for our application and on doing a web search I came across the following blog

https://blogs.oracle.com/groundside/entry/appc_from_ant and it was spot on

and had to just re-use it.

I made the changes according to our application and run the ant task.

Started compiling jspx files but suddenly it fallover with the following error.

There are 1 nested errors:

The type javax.servlet.jsp.tagext.BodyTagSupport cannot be resolved. It is indirectly referenced from required .class files
The type javax.el.ValueExpression cannot be resolved. It is indirectly referenced from required .class files


For some reason it was not able to figure out BodyTagSupport class or may be it could not find the class at designated place.

I have changed the script to include weblogic.jar to the class path and it was all fine.


<?xml version="1.0" encoding="UTF-8" ?>

<project name="AppcTest" default="precompile" basedir=".">
  <description>Sample build file using Ant to call WLS APPC</description>
  <property name="wls_root" value="/oracle/fmwhome"/>
  <property name="wls_home" value="${wls_root}/wlserver_10.3"/>
  <property name="adf_lib_root"
                    value="${wls_root}/oracle_common/modules"/>
  <property name="java_home" value="/oracle/javahome"/>
  <property name="common_lib_root"
                    value="${wls_home}/common/deployable-libraries"/>

  <property name="ear_root"   value="${ear.root}"/>

  <path id="wls.classpath">
    <pathelement path="${wls_home}/server/lib/weblogic.jar"></pathelement>
  </path>
  <echo message="Setting path"></echo>
  <property name="project.class.path.property" refid="wls.classpath"/>
  <echo>PATH = "${project.class.path.property}"</echo>
  <taskdef name="wlappc" classpathref='wls.classpath'
                  classname="weblogic.ant.taskdefs.j2ee.Appc"/>
  <target name="precompile" description="Calls WLS APPC to pre-compile an EAR">
    <wlappc source="${ear_root}/deploy/ear-file-name.ear" verbose="true"
            classpath="${adf_lib_root}/oracle.adf.share_11.1.1  
                               /adfsharembean.jar:${wls_root}/wlserver_10.3/server  
                               /lib/weblogic.jar">

      <library file="${common_lib_root}/jstl-1.2.war"/>
      <library file="${common_lib_root}/jsf-1.2.war"/>
      <library file="${adf_lib_root}/oracle.adf.view_11.1.1
                               /adf.oracle.domain.webapp.war"/>
      <library file="${adf_lib_root}/oracle.adf.model_11.1.1
                               /adf.oracle.domain.ear"/>
      <library file="${wls_root}/Oracle_SOA1/soa/modules
                         /oracle.soa.workflow_11.1.1/oracle.soa.workflow.wc.jar"/>
      <library file="${wls_root}/Oracle_SOA1/soa/modules
            /oracle.soa.worklist.webapp_11.1.1/oracle.soa.worklist.webapp.war"/>
    </wlappc>
  </target>
</project>

No comments:

Post a Comment