Generating a manifest CLASSPATH using Ant

I'm using Ant 1.5.4 to build my applications. When I create a JAR file to deploy I ask Ant to add a main class and CLASSPATH to the manifest, like this:
<target name="deploy" depends="report" description="deploy the application">
    <buildnumber />
    <copy todir="${deploy}">
        <fileset dir="${src.lib}" />
    </copy>
    <pathconvert property="manifest.jars" pathsep=" ">
        <path id="manifest.class.path">
            <fileset dir="${deploy}">
                <patternset>
                    <include name="**/*.jar" />
                </patternset>
            </fileset>
        </path>
        <map from="${basedir}/${deploy}/" to=""/>
    </pathconvert>
    <manifest file="META-INF/manifest.mf">
        <attribute name="Implementation-Title" value="${project}" />
        <attribute name="Built-By" value="${user.name}"/>
        <attribute name="Build-Date" value="${TODAY}" />
        <attribute name="Major-Version" value="${major}" />
        <attribute name="Minor-Version" value="${minor}" />
        <attribute name="Build-Number" value="${build.number}" />
        <attribute name="Main-Class" value="${manifest.main}"/>
        <attribute name="Class-Path" value="${manifest.jars}"/>
    </manifest>
    <jar jarfile="${deploy}/${project}.jar"
         manifest="${manifest}/manifest.mf">
        <fileset dir="${output.classes}" excludes="**/*TestCase*.class, **/*TestSuite*.class"/>
    </jar>
</target>This particular app has several third-party JARs. When I look at the manifest contents, they look like this:
Class-Path: activation.jar imap.jar junit.jar my-common.jar mail.ja
r mailapi.jar pop3.jar smtp.jar xalan.jar xerces.jar xml-apis.jar xsl
tc.jar
Has anybody else done this with Ant for a long CLASSPATH with many JARs? Are those line breaks inside JAR names a problem? It looks strange to me, and I'm not sure that it's correct or useful. Thanks - MOD

I'm using Ant 1.5.4 to build my applications. When I create a JAR file to deploy I ask Ant to add a main class and CLASSPATH to the manifest, like this:
<target name="deploy" depends="report" description="deploy the application">
    <buildnumber />
    <copy todir="${deploy}">
        <fileset dir="${src.lib}" />
    </copy>
    <pathconvert property="manifest.jars" pathsep=" ">
        <path id="manifest.class.path">
            <fileset dir="${deploy}">
                <patternset>
                    <include name="**/*.jar" />
                </patternset>
            </fileset>
        </path>
        <map from="${basedir}/${deploy}/" to=""/>
    </pathconvert>
    <manifest file="META-INF/manifest.mf">
        <attribute name="Implementation-Title" value="${project}" />
        <attribute name="Built-By" value="${user.name}"/>
        <attribute name="Build-Date" value="${TODAY}" />
        <attribute name="Major-Version" value="${major}" />
        <attribute name="Minor-Version" value="${minor}" />
        <attribute name="Build-Number" value="${build.number}" />
        <attribute name="Main-Class" value="${manifest.main}"/>
        <attribute name="Class-Path" value="${manifest.jars}"/>
    </manifest>
    <jar jarfile="${deploy}/${project}.jar"
         manifest="${manifest}/manifest.mf">
        <fileset dir="${output.classes}" excludes="**/*TestCase*.class, **/*TestSuite*.class"/>
    </jar>
</target>This particular app has several third-party JARs. When I look at the manifest contents, they look like this:
Class-Path: activation.jar imap.jar junit.jar my-common.jar mail.ja
r mailapi.jar pop3.jar smtp.jar xalan.jar xerces.jar xml-apis.jar xsl
tc.jar
Has anybody else done this with Ant for a long CLASSPATH with many JARs? Are those line breaks inside JAR names a problem? It looks strange to me, and I'm not sure that it's correct or useful. Thanks - MOD

Similar Messages

  • Manifesting Classpath Issues + Ant

    Having some problems with classpath and manifest file.
    I'm using ant to build manifest in jar. The classpath seems to be set OK in the manifest.
    I include an external jar(log4j) in my app jar, and it seems to go in the correct place in my app jar(lib directory).
    The manifest file seems to be created OK, and is put in the MANIFEST-INF directory in app jar.
    I can compile and build everything OK.
    The main issue is that at runtime, it does not seem to pickup the log4j jar. I get a NoClassDefFoundError when trying to create a Logger class.
    Any help would be appreciated. I will include relevant information below.
    ant stuff          <jar jarfile="${dist}/lib/mosaixsegment8-${DSTAMP}.jar" basedir="${build}">
                   <manifest>
                        <attribute name="Built-By" value="${user.name}"/>
                        <attribute name="Main-Class" value="com.company.TestClient"/>
                        <attribute name="Class-Path" value="lib/log4j-1.2.8.jar"/>
                   </manifest>
              </jar>
    Manifest File CreatedManifest-Version: 1.0
    Ant-Version: Apache Ant 1.5.4
    Created-By: 1.4.2_01-b06 (Sun Microsystems Inc.)
    Built-By: user
    Main-Class: com.company.TestClient
    Class-Path: lib/log4j-1.2.8.jar
    Code Snippitimport org.apache.log4j.Logger;
    public class TestClient{
         public static void main (String argv [])
              // Get Logger
              org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger("name");
    Error Message
    [java] java.lang.NoClassDefFoundError: org/apache/log4j/Logger
    [java] at com.company.TestClient.main(Unknown Source)
    [java] Exception in thread "main"
    [java] Java Result: 1

    pkwooster,
    If there are complex solutions then the problem must be complex and perhaps I did not understand the problem (it takes a few hits on my head for the problem domain to get cleared up :). Reason I say this is because my problem is not complex & neither is the solution.
    What I have is this:
    1. Manually created (I know ANT does this; but I didn't use ant; I used a sh script) the MF file with just the Class-Path defined.
    Here is the MF entry from my standalone application (it is really a messaging application):
    Class-Path: log4j-1.2.7.jar bta_notify-facade-client.jar bta_notify-ex
    ception.jar bta_notify-vo.jar
    2. IN my sh script I use the following command to create my jar:
    jar cvfm $BTA_ADAPTER_JAR_OUT \
         meta-inf/adapter-manifest.mf \
         $BTA_ADAPTER_CLASSES/*.class \
         $BTA_EXCEPTION_CLASSES/*.class \
         $BTA_MESSAGE_CLASSES/*.class \
         $BTA_VO_CLASSES/*.class \
         $BTA_GRAIN_BEAN_CLASSES/*.class \
         -C $BTA_SRC_CONFIG_DIR log4j.xml \
         -C $LOG4J_DIR $LOG4J_JAR
    (the BTA_EXCEPTION_CLASSES & BTA_VO_CLASSES are not the same as the jars mentioned in the mf classpath).
    That is all that I did. The adapter.jar contains log4j.jar (without the path) & the mf (meta-inf/ as the path).
    I did something very similar on a j2ee app that is deployed as an EAR file in weblogic. That is where I have ear containing jar1 which contains log4j, other jars & jar1's mf which lists these contained jars (log4j & others) in its classpath.
    I presume my problem & the problem that is being solved by these other complex solutions are not the same.

  • Generate SAR using  ant  or using Jdeveloper

    Hi!
    I 'm generating the sar file using the ant-sca-package.xml file but when I compare it with the jar generated with the "deploy to sar" option from the IDE Jdeveloper, they are different. The jar file generated with Jdeveloper excludes some folders and also modified the composite.xml file :S
    Why is that? which is the correct way to generate a Sar file?
    Thanks in advance
    NH

    Hi NH,
    You seems to be doing the right way... AFAIK ant-sca-package.xml is the way to go...
    Biemond's blog is a good reference...
    http://biemond.blogspot.com.au/2009/09/deploy-soa-suite-11g-composite.html
    Cheers,
    Vlad
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts)
    https://forums.oracle.com/forums/ann.jspa?annID=893

  • Using Ant with CDT

    I am using ARM's Eclipse for DS-5 for developing my embedded C projects. We were asked by a customer if we can generate ANT build files using Eclipse. Looking through the manual, it seems like I should be able to Export the project to Ant.
    My Workspace contains several projects. So, I select the project I want to export, then click the menu File -> Export... -> General -> Ant Buildfiles, then click Next>.
    The next dialogue that opens is the Generate Ant Buildfiles, but the list of projects to select from is empty! The Check projects for Ant compatibility box is checked by default, but even when I uncheck it, the list remain empty.
    1. Can Ant be used to build C projects?
    2. How do I export a project to Ant from CDT?
    3. If (1) is "No" and (2) is "Can't", then why is this option included in CDT?

    I tried this and it doesn't work. It will include the file Manifest.mf in
    the jar along with the default manifest file MANIFEST.MF. If you try to use
    the support tag to include a file MANIFEST.MF, an IOException is received.
    Has anybody found a way to get ejbjar to use a custom manifest file?
    "Nils Winkler" <[email protected]> wrote in message
    news:[email protected]..
    I'm using pretty much the same combination, and it works just fine.
    Here's what I'm doing:
    <ejbjar srcdir="${build}"
    descriptordir="${dd}"
    destdir="${dist}">
    <support dir="">
    <include name="META-INF/Manifest.mf"/>
    </support>
    <!-- The WebLogic subcommand -->
    <weblogic destdir="${dist}"
    newCMP="true"
    compiler="jikes"
    args="-g">
    <classpath>
    [snip...]
    </classpath>
    </weblogic>
    <!-- include the standard descriptor files only, ignore the WebLogic
    files. -->
    <include name="**/*-ejb-jar.xml" />
    <exclude name="**/*weblogic*.xml" />
    </ejbjar>
    As you can see, I add the manifest file using the support nested tag.
    The manifest file is on my harddisk, in a directory called "META-INF",
    which is in the project's main directory.
    Hope that helps,
    Nils
    john wrote:
    I am using 6.1 with sp1, and version 1.4.1 of ant
    Rob Woollen <[email protected]> wrote:
    Make sure that you are running WLS 6.1 (I believe earlier versions will
    clobber the
    manifest.)
    -- Rob
    john wrote:
    I am trying to specify a manifest file in the <ejbjar> element, andit appears
    that weblogic.ejbc is overwriting the manifest (ant does find the MF,but weblogic
    seems to be clobbering it)
    has anybody run into this before?
    thanks
    ============================
    [email protected]

  • Error while Executing stored procedure using ant

    Hi,
    I am trying to execute a stored procedure using ant ..
    My build.xml is like this...
    <project name="myproject" default="db.build">
    <target name="db.build">
    <sql driver="oracle.jdbc.driver.OracleDriver"
    url="jdbc:oracle:thin:@idm.orademo.com:1521:orcl"
    userid="test"
    password="oracle11g"
    print="yes"
    classpath="E:\\ojdbc14.jar"
    src="E:\\upg_9102BP07.sql" />
    <!--
    <classpath>
    <pathelement path=""\\>
    <\\classpath> -->
    </target>
    </project>
    I have my stored procedure in upg_9102BP07.sql as shown in above src..
    When im executing ant cmd I got the following exception
    E:\>ant -f test.xml
    Buildfile: test.xml
    db.build:
    *[sql] Executing resource: E:\upg_9102BP07.sql*
    *[sql] Failed to execute: declare cnt int*
    BUILD FAILED
    E:\test.xml:12: java.sql.SQLException: ORA-06550: line 1, column 15:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    *:= . ( @ % ; not null range default character*
    Total time: 44 seconds
    I have no clue.. But this sql ran successfully when did manually..
    Please help me in solving the issue...
    -- Marias

    Here is my script bit lengthy...
    Rem
    Rem $Header: oim/server/Database/Oracle/Upgrade/Release91x/910x/List/9102_ddl_AddcolumnToRCE_Oracle.sql st_oim_devjain_bug-9003841/1 2009/10/09 02:24:19 devjain Exp $
    Rem
    Rem 9102_ddl_AddcolumnToRCE_Oracle.sql
    Rem
    Rem Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
    Rem
    Rem NAME
    Rem 9102_ddl_AddcolumnToRCE_Oracle.sql - <one-line expansion of the name>
    Rem
    Rem DESCRIPTION
    Rem Create a new column 'RCE_DELETE' in RCE table
    Rem
    Rem MODIFIED (MM/DD/YY)
    Rem blaksham 09/30/09 - Created
    Rem
    declare cnt int;
    Begin
         Select Count(1) into cnt From User_Tab_Columns Where TABLE_NAME='RCM' And COLUMN_NAME='RCM_DELETE';
         IF cnt=0 Then
         Begin
              Execute Immediate 'ALTER TABLE RCM ADD RCM_DELETE VARCHAR2(1)';
         End;
         Else
              DBMS_OUTPUT.PUT_LINE('Column already exists in the DB');
         End IF;
    End;
    Rem
    Rem $Header: oim/server/Database/Oracle/Upgrade/Release91x/910x/List/9102_dml_odf_source_name.sql st_oim_devjain_bug-9003841/1 2009/10/09 02:44:45 devjain Exp $
    Rem
    Rem 9103_dml_odf_source_name.sql
    Rem
    Rem Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
    Rem
    Rem NAME
    Rem 9103_dml_odf_source_name.sql - <one-line expansion of the name>
    Rem
    Rem DESCRIPTION
    Rem <short description of component this file declares/defines>
    Rem
    Rem NOTES
    Rem <other useful comments, qualifications, etc.>
    Rem
    Rem MODIFIED (MM/DD/YY)
    Rem vpotukuc 09/17/09 - Bug8796435: Increase the size of odf_source-name
    Rem vpotukuc 09/17/09 - Created
    Rem
    SET ECHO ON
    SET FEEDBACK 1
    SET NUMWIDTH 10
    SET LINESIZE 80
    SET TRIMSPOOL ON
    SET TAB OFF
    SET PAGESIZE 100
    declare
    collen NUMBER := 0;
    begin
    select char_length into collen from user_tab_columns where table_name = 'ODF' and column_name = 'ODF_SOURCE_NAME';
    IF (collen < 400) then
    execute immediate 'alter table ODF modify ODF_SOURCE_NAME varchar2(400)';
    END IF;
    END;
    File name: 91_dml_update_reviewers_With_NoEmail_attestation.sql
    Purpose: Modify the email template to replace the 'Delegated By Last Name' with 'Reviewer Last Name' and 'Delegated By User Id' to 'Reviewer User Id'.
    Author: Babu Lakshamanaiah
    Description: Modify the email template 'Attestation Reviewers With No E-mail Addresses Defined'
    declare
    cnt int;
    begin
    Select Count(1) into cnt From emd Where emd_name='Attestation Reviewers With No E-mail Addresses Defined' and emd_language='en' and emd_country='US';
    IF cnt=0 Then
    Begin
    DBMS_OUTPUT.PUT_LINE('There is no record with emd_name Attestation Reviewers With No E-mail Addresses Defined ');
    End;
    Else
    update emd set emd_body='The following attestation reviewers do not have email addresses defined. Attestation requests have been generated for these reviewers and can be accessed by loging in to Oracle Identity Manager. However, notification emails were not sent.' ||chr(10) || chr(10) ||
    'Attestation process: <Attestation Definition.Process Name>' || chr(10) ||
    'Attestation Request ID: request <Attestation Request.Request Id>' || chr(10) ||
    'Request date: <Attestation Request.Request Creation Date>' || chr(10) || chr(10) ||
    'Reviewers Without E-mail Address: <reviewers> ' || chr(10) ||
    '<Attestation Task.Reviewer First Name> <Attestation Task.Reviewer Last Name> [<Attestation Task.Reviewer User Id>]' Where emd_name='Attestation Reviewers With No E-mail Addresses Defined' and emd_language='en' and emd_country='US';
    End IF;
    commit;
    end;
    Please help me out.....
    --Marias                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Set path and classpath in ANT

    by using ANT, how can set the JDK path and classpath..
    jdk version exists in the : C:\Program Files\Java\jdk1.6.0
    This is the build.xml that i need to modify!
    -Do i need to have a serperate JAVA_HOME variable?
    <?xml version="1.0"?>
    <!--
    Build file for 'Chat Client'
    Version: $Revision: 4.10 $ $Date: 2003/05/28 $
    Author:  Rajat Gupta
    -->
    <project name="Chat" default="jar" basedir=".">
       <!-- ================================================================== -->
       <!-- Initialization of all property settings                            -->
       <!-- ================================================================== -->
       <target name="init">
          <property name="appname"        value="chat"   />
          <property name="src.dir"        value="src"               />
          <property name="lib.dir"        value="lib"              />
          <property name="build.dir"      value="Chat"            />
          <property name="build.compiler" value="classic"          />
       </target>
       <!-- ================================================================== -->
       <!-- Makes sure the needed directory structure is in place              -->
       <!-- ================================================================== -->
       <target name="prepare" depends="init">
          <mkdir dir="${lib.dir}" />
          <mkdir dir="${lib.dir}/META-INF" />
          <mkdir dir="${build.dir}" />
       </target>
       <!-- ================================================================== -->
       <!-- Compilation of the web part of the application                     -->
       <!-- ================================================================== -->
       <target name="classes" depends="prepare">
          <javac srcdir="${src.dir}/oracle/otnsamples/oc4jjms"
                 destdir="${lib.dir}"
                 includes="**" />
       </target>
       <!-- ================================================================== -->
       <!-- Compilation of the complete J2EE application (both web and EJB)    -->
       <!-- ================================================================== -->
       <target name="j2ee-meta-inf" depends="classes, prepare">
          <copy file="${src.dir}/META-INF/application-client.xml"
                tofile="${lib.dir}/META-INF/application-client.xml" />
          <copy file="${src.dir}/images/oralogo.gif"
                tofile="${lib.dir}/oralogo.gif" />
       </target>
       <target name="jar" depends="j2ee-meta-inf">
       <jar jarfile="${build.dir}/${appname}.jar"
           basedir="${lib.dir}" manifest="${src.dir}/META-INF/MANIFEST.MF"/>
          <delete dir="${lib.dir}" />
       </target>
    </project>Message was edited by:
    jugp

    [url ='http://www.jguru.com/forums/home.jsp?topic=Ant']answer here

  • Deploying servlet on Tomcat using "ant install" not working. Please help.

    Hello. Normally I can find answers by using search, but I can't today for some reason. So please bare with me if this has been mentioned before. I will try to provide as much info as possible so that helping me isn't too much a chore. Thank you.
    I have downloaded and installed the JWSDP 1.3. and Tomcat is running. I am also using Ant 1.5.4 (previous installation - not one included with JWSDP) and modeled my build.xml file after the template provided here:
    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt.
    When I run ant on my respository, everything builds fine. But when I run Ant with the install target, I get the following error:
    BUILD FAILED
    file:C:/owl/build.xml:366: java.io.IOException: Server returned HTTP response co
    de: 401 for URL: http://localhost:8080/manager/deploy?path=%2Fowl&war=file%3A%2F
    %2FC%3A%5Cowl%2Fbuild
    Here is line 366 build.xml:
    localWar="file://${build.home}"/>
    ...which is included in this block for the target "install":
    <target name="install" depends="compile"
    description="Install application to servlet container">
    <deploy url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"
    localWar="file://${build.home}"/>
    </target>
    When I point my brower to the url located in the error verbose, I get the following:
    FAIL - Encountered exception java.lang.NullPointerException
    I am trying to get my environment set up correctly before I start spending time developing servlets, but I am getting tempted to just develop to servlets and "manually" installing/deploying them either by copying and pasting or by using the Tomcat manager. I would really like to do everything from Ant though if possible. Please help.

    I don't think this is at all correct:
    localWar="file://${build.home}"/>You've got to create a real WAR file - a JAR file with WEB-INF and all its minions inside it:
    http://access1.sun.com/techarticles/simple.WAR.html
    That's the file you need to refer to there. You can manage that with Ant too, of course.
    Here's what my Ant build.xml looks like for Web apps (there's a build-web.properties file that follows):
    build-web.xml
    <project name="Tomcat Build Tasks" default="clean" basedir=".">
        <target name="init-props">
            <tstamp>
                <format property="touch.time" pattern="MM/dd/yyyy hh:mm aa" />
            </tstamp>
            <filterset id="ant.filters">
                <filter token="DATE" value="${TODAY}" />
                <filter token="TIME" value="${TSTAMP}" />
            </filterset>
            <!-- Load in all the settings in the properties file -->
            <property file="build.properties" />
            <!-- Load in all Tomcat settings in the properties file -->
            <property file="build-web.properties" />
        </target>
        <target name="prepare" depends="init-props">
            <mkdir dir="${war.classes}"/>
            <mkdir dir="${war.lib}"/>       
            <mkdir dir="${manifest}" />
        </target>
        <target name="clean" depends="init-props" description="clean up temporary files">
            <delete file="${project}.war" />   
            <delete dir="${war.root}"/>
            <delete dir="${manifest}" />
        </target>
        <target name="set-tomcat-classpath" depends="prepare">
            <path id="tomcat.class.path">                  
                <fileset dir="${tomcat.home}/bin">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
                <fileset dir="${tomcat.home}/shared/lib">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
                <fileset dir="${tomcat.home}/common/lib">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
                <fileset dir="${tomcat.home}/server/lib">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
                <fileset dir="${ant.home}/lib">
                    <patternset>
                        <include name="**/*.jar" />
                    </patternset>
                </fileset>
            </path>              
        </target>
        <target name="create" depends="set-tomcat-classpath" description="create the war file">
            <!-- All files at root level -->       
            <!-- Temporarily put the JSPs at root until you figure this out -->
            <copy todir="${war.root}">
                <fileset dir="${src.jsp}"/>
            </copy>
    <!--
            <copy todir="${war.root}">
                <fileset dir="${src.html}" includes="*.html"/>
            </copy>
    -->
            <copy todir="${war.root}/css">
                <fileset dir="${src.css}"/>
            </copy>
            <copy todir="${war.root}/images">
                <fileset dir="${src.images}"/>
            </copy>
            <copy todir="${war.root}/js">
                <fileset dir="${src.js}"/>
            </copy>
            <!-- All files at the WEB-INF level and below -->       
            <copy todir="${war.web}">
                <fileset dir="${src.etc}" includes="web.xml"/>
            </copy>
            <!-- All files in the CLASSPATH lib -->
            <copy todir="${war.web}/lib">
                <fileset dir="${src.lib}" includes="**/*.jar" excludes="**/*-tests.jar, **/junit.jar"/>
            </copy>
            <!-- Put the dispatcher XML in WEB-INF/config -->
            <copy todir="${war.web}/config">
                <fileset dir="${src.etc}" includes="${project}-config.xml"/>
            </copy>
            <!-- Put XSL stylesheets in WEB-INF/xsl -->
            <copy todir="${war.web}/xsl">
                <fileset dir="${src.xsl}" includes="**/*.xsl"/>
            </copy>
            <!-- Put the project JAR file in WEB-INF/lib -->
            <copy todir="${war.web}/lib">
                <fileset dir="${deploy}" includes="**/${project}.jar"/>
            </copy>
            <!-- Create the manifest -->
            <buildnumber />
            <manifest file="${manifest}/manifest.mf">
                <attribute name="Implementation-Title"      value="${project}" />
                <attribute name="Built-By"                  value="${user.name}"/>
                <attribute name="Build-Date"                value="${TODAY}" />
                <attribute name="Major-Version"             value="${major}" />
                <attribute name="Minor-Version"             value="${minor}" />
                <attribute name="Build-Number"              value="${build.number}" />
            </manifest>
            <!-- Create the WAR file -->
            <jar jarfile="${project}.war"
                 manifest="${manifest}/manifest.mf">
                <fileset dir="${war.root}"/>
                <metainf dir="${src.etc}" includes="context.xml"/>
            </jar>
        </target>
        <target name="create-tomcat-admin-tasks" depends="set-tomcat-classpath">
    <!--
            <pathconvert targetos="windows" refid="tomcat.class.path" property="converted.class.path" />
            <echo message="CLASSPATH: ${converted.class.path}" />
    -->       
            <taskdef name="install"     classname="org.apache.catalina.ant.InstallTask"     classpath="tomcat.class.path"/>
            <taskdef name="remove"      classname="org.apache.catalina.ant.RemoveTask"      classpath="tomcat.class.path"/>       
            <taskdef name="reload"      classname="org.apache.catalina.ant.ReloadTask"      classpath="tomcat.class.path"/>
            <taskdef name="deploy"      classname="org.apache.catalina.ant.DeployTask"      classpath="tomcat.class.path"/>       
            <taskdef name="undeploy"    classname="org.apache.catalina.ant.UndeployTask"    classpath="tomcat.class.path"/>       
            <taskdef name="start"       classname="org.apache.catalina.ant.StartTask"       classpath="tomcat.class.path"/>       
            <taskdef name="stop"        classname="org.apache.catalina.ant.StopTask"        classpath="tomcat.class.path"/>       
            <taskdef name="list"        classname="org.apache.catalina.ant.ListTask"        classpath="tomcat.class.path"/>       
            <taskdef name="resources"   classname="org.apache.catalina.ant.ResourcesTask"   classpath="tomcat.class.path"/>       
            <taskdef name="roles"       classname="org.apache.catalina.ant.RolesTask"       classpath="tomcat.class.path"/>
        </target>
        <target name="install" depends="create-tomcat-admin-tasks" description="install the war file on Tomcat">
            <install    url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}"
                        config="file:/${basedir}/${src.etc}/context.xml"
                        war="file:/${basedir}/${project}.war" />
        </target>
        <target name="remove" depends="create-tomcat-admin-tasks" description="remove the war file on Tomcat">
            <remove     url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}" />
        </target>
        <target name="reload" depends="create-tomcat-admin-tasks" description="reload the war file on Tomcat">
            <reload     url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}" />
        </target>
        <target name="deploy" depends="create-tomcat-admin-tasks" description="deploy the war file on Tomcat">
            <deploy    url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}"
                        config="file:/${basedir}/${src.etc}/context.xml"
                        war="file:/${basedir}/${project}.war" />
        </target>
        <target name="undeploy" depends="create-tomcat-admin-tasks" description="undeploy the war file on Tomcat">
            <undeploy   url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}" />
        </target>
        <target name="start" depends="create-tomcat-admin-tasks" description="start an application on Tomcat">
            <start      url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}"/>
        </target>
        <target name="stop" depends="create-tomcat-admin-tasks" description="stop an application on Tomcat">
            <stop       url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        path="/${project}" />
        </target>
        <target name="list" depends="create-tomcat-admin-tasks" description="list all applications running on Tomcat">
            <list       url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"/>
        </target>
        <target name="resources" depends="create-tomcat-admin-tasks" description="list all resources on Tomcat">
            <resources  url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"/>
        </target>
        <target name="data-sources" depends="create-tomcat-admin-tasks" description="list all data sources on Tomcat">
            <resources  url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"
                        type="javax.sql.DataSource"/>
        </target>
        <target name="roles" depends="create-tomcat-admin-tasks" description="list all user roles on Tomcat">
            <roles      url="${tomcat.manager.url}"
                        username="${tomcat.username}"
                        password="${tomcat.password}"/>
        </target>
    </project>
    build.properties
    # Properties file for setting up an Ant build.xml
    # Project specific items that change each time
    project=api-prototype
    major=1
    minor=0
    version=${major}.${minor}
    jar.name=${project}
    versiondate=${TODAY}
    # Directory structure (these should never change)
    bin=bin
    deploy=deploy
    doc=doc
    manifest=META-INF
    xml=xml
    # Everything under src should come out of a repository
    src=src
    src.bin=${src}/bin
    src.config=${src}/config
    src.data=${src}/data
    src.dtd=${src}/dtd
    src.java=${src}/java
    src.lib=${src}/lib
    src.profile=${src}/profile
    src.properties=${src}/properties
    src.schema=${src}/schema
    src.sql=${src}/sql
    src.templates=${src}/templates
    src.testdata=${src}/testdata
    src.xml=${src}/xml
    src.xsl=${src}/xsl
    # These are created and deleted by Ant each time
    javadocs=javadocs
    reports=reports
    output=output
    output.classes=${output}/classes
    output.lib=${output}/lib
    # Required for proper use of XDoclet
    xdoclet.home = C:/Tools/xdoclet-1.2b3
    build-web.properties
    war.root=war-root
    war.pages=${war.root}/pages
    war.web=${war.root}/WEB-INF
    war.classes=${war.web}/classes
    war.css=${war.web}/css
    war.js=${war.web}/js
    war.lib=${war.web}/lib
    war.tld=${war.web}/tld
    # Properties needed by Tomcat tasks
    ant.home =
    tomcat.home         =
    tomcat.manager.url  = http://localhost:8080/manager
    tomcat.username     =
    tomcat.password     = MOD

  • How to compile a class from a Servlet using ant!!!

    Hi I have the following problem:
    I have a Servlet that must compile a java class.
    Here is the code that i use to compile:
    File buildFile = new File(build.xml path);
    String[] arg = { "-buildfile", buildFile.toString(), "compile" };
    Properties userProps = null;
    ClassLoader loader = ClassLoader.getSystemClassLoader();
    Main.start(arg, userProps, loader);
    The build.xml file was written correctly, infact if i lunch the command ant by dos it is correctly done.
    When I put my application in tomcat/webapps and try to compile with code above I have the following error:
    BUILD FAILED C:\......: Could not create task or type of type: property.
    Ant could not find the task or a class this task relies upon.
    This is common and has a number of causes; the usual
    solutions are to read the manual pages then download and
    install needed JAR files, or fix the build file:
    - You have misspelt 'property'.
    Fix: check your spelling.
    - The task needs an external JAR file to execute
    and this is not found at the right place in the classpath.
    Fix: check the documentation for dependencies.
    Fix: declare the task.
    - The task is an Ant optional task and the JAR file and/or libraries implementing the functionality were not found at the time you yourself built your installation of Ant from the Ant sources.
    Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the task and make sure it contains more than merely a META-INF/MANIFEST.MF.
    If all it contains is the manifest, then rebuild Ant with the needed libraries present in ${ant.home}/lib/optional/ , or alternatively,
    download a pre-built release version from apache.org
    - The build file was written for a later version of Ant Fix: upgrade to at least the latest release version of Ant
    - The task is not an Ant core or optional task and needs to be declared using <taskdef>.
    - You are attempting to use a task defined using <presetdef> or <macrodef> but have spelt wrong or not defined it at the point of use
    Remember that for JAR files to be visible to Ant tasks implemented in ANT_HOME/lib, the files must be in the same directory or on the classpath
    Please neither file bug reports on this problem, nor email the Ant mailing lists, until all of these causes have been explored, as this is not an Ant bug.

    Java code Snippet
    import org.apache.tools.ant.*;// ant.jar
    String SourceDir="c:\java";
         String DestinationDir="c:\classes";
         Project project = new Project();
         try
    String baseDir = getServletContext().getRealPath( "/WEB-INF/build/");//Build.xml should be in this folder or else make use of the build folder here
         File buildFile = new File( baseDir, "build.xml");
         project.setUserProperty( "SourceDir", SourceDir);
         project.setUserProperty( "DestinationDir", DestinationDir);
         project.setUserProperty( "ant.file", buildFile.getAbsolutePath());
         project.setBaseDir( new File( baseDir));
         project.init();
         ProjectHelper.configureProject( project, buildFile);
         project.executeTarget(project.getDefaultTarget());
         catch (Exception e)
    Build.xml
    <?xml version="1.0"?>
    <project name="Sample" default="compile" basedir=".">
         <property name="SrcDir" value="${SourceDir}"/>
         <property name="DestnDir" value="${DestinationDir}"/>
         <target name="compile">
              <javac srcdir="${SrcDir}" destdir="${DestnDir">
                   <classpath > <!-- If any supporting jars required to compile the file add this-->
                        <fileset dir="${SrcDir}" includes="*.jar" />
                   </classpath>
              </javac>
         </target>
    </project>

  • Using ant with ejbjar

    I am trying to specify a manifest file in the <ejbjar> element, and it appears
    that weblogic.ejbc is overwriting the manifest (ant does find the MF, but weblogic
    seems to be clobbering it)
    has anybody run into this before?
    thanks

    I tried this and it doesn't work. It will include the file Manifest.mf in
    the jar along with the default manifest file MANIFEST.MF. If you try to use
    the support tag to include a file MANIFEST.MF, an IOException is received.
    Has anybody found a way to get ejbjar to use a custom manifest file?
    "Nils Winkler" <[email protected]> wrote in message
    news:[email protected]..
    I'm using pretty much the same combination, and it works just fine.
    Here's what I'm doing:
    <ejbjar srcdir="${build}"
    descriptordir="${dd}"
    destdir="${dist}">
    <support dir="">
    <include name="META-INF/Manifest.mf"/>
    </support>
    <!-- The WebLogic subcommand -->
    <weblogic destdir="${dist}"
    newCMP="true"
    compiler="jikes"
    args="-g">
    <classpath>
    [snip...]
    </classpath>
    </weblogic>
    <!-- include the standard descriptor files only, ignore the WebLogic
    files. -->
    <include name="**/*-ejb-jar.xml" />
    <exclude name="**/*weblogic*.xml" />
    </ejbjar>
    As you can see, I add the manifest file using the support nested tag.
    The manifest file is on my harddisk, in a directory called "META-INF",
    which is in the project's main directory.
    Hope that helps,
    Nils
    john wrote:
    I am using 6.1 with sp1, and version 1.4.1 of ant
    Rob Woollen <[email protected]> wrote:
    Make sure that you are running WLS 6.1 (I believe earlier versions will
    clobber the
    manifest.)
    -- Rob
    john wrote:
    I am trying to specify a manifest file in the <ejbjar> element, andit appears
    that weblogic.ejbc is overwriting the manifest (ant does find the MF,but weblogic
    seems to be clobbering it)
    has anybody run into this before?
    thanks
    ============================
    [email protected]

  • Unable to set classpath in Ant Script to compile AIA related api

    Hi everyone,
    I am trying to build customized ant scripts to compile,build & deploy (oracle 11g)AIA application using ANT tool.To compile composite application,"scac" target name is used.This scac will refer the classpath which was set at ant-sca-compile.xml.scac is compiling all integartion artifacts except AIA related api.I added aia.jar to classpath in ant-sca-compile.xml.still,scac is not recognizing aia.jar
    I am getting below compilation problem
    scac:
    [scac] Validating composite : 'F:\AIA_Dev\BBProcessSupplierAppln\SyncSupplierPartyBBProvABCSImpl\bin/..//composite.xml'
    [scac] F:\AIA_Dev\BBProcessSupplierAppln\SyncSupplierPartyBBProvABCSImpl\bin\..\SCA-INF\bpel\SyncSupplierPartyBBProvABCSImplProcess\src\orabpel\syncsupplierpartybbprovabcsimplprocess\ExecLetBxExe9.java:408: package oracle.apps.aia.core.eh.logging does not exist
    [scac] Note: F:\AIA_Dev\BBProcessSupplierAppln\SyncSupplierPartyBBProvABCSImpl\bin\..\SCA-INF\bpel\SyncSupplierPartyBBProvABCSImplProcess\src\orabpel\syncsupplierpartybbprovabcsimplprocess\BPEL_BIN.java uses unchecked or unsafe operations.
    [scac] Note: Recompile with -Xlint:unchecked for details.
    [scac] FATAL_ERROR: location {ns:composite/ns:component[@name='SyncSupplierPartyBBProvABCSImplProcess']}(42,62): Failed to compile bpel generated classes.
    [scac] failure to compile the generated BPEL classes for BPEL process "SyncSupplierPartyBBProvABCSImplProcess" of composite "default/SyncSupplierPartyBBProvABCSImpl!1.0"
    [scac] The class path setting is incorrect.
    [scac] Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    [scac]
    Please let me know any body have faced above problem & resolved it.It is consuming more time.It would be appreciable,if any body provides solution for this.
    Thanks in advance.
    Thanks,
    Hanu

    Hi,
    How are you referring to the class path. I have created my custom build file and I refer like this.
    <path id="classpath">
      <pathelement location="${oracle.home}/lib/aia.jar"/>
      <pathelement location="${oracle.common.home}/modules/org.apache.commons.logging_1.0.4.jar"/>
    </path> oracle.home is the location where my aia.jar resides.
    In the compile-classes target I have
    <!--Target for Class path details -->
    <target name="compile-classes">
      <mkdir dir="${sca-inf.classes.dir}"/>
      <javac destdir="${sca-inf.classes.dir}"   classpathref="classpath"
             debug="on"                         nowarn="${javac.nowarn}"
             deprecation="${javac.deprecation}" encoding="Cp1252"
             source="1.6"                       target="1.6">
        <src path="${src.dir}"/>
      </javac> 
    </target> Regards,
    Neeraj Sehgal

  • Packaging JAR's using Ant in Eclipse

    Hey,
    I'm new to Ant, and xml for that matter. I need to rmi compile & package a set of simple classes whose objects call eachother remotely. I need seperate jars for a "server" and one for "client" containing whatever classes are needed for each. Using Ant the classes should be compiled, packaged into the jars and then the jars should be copied to some other specified directory. And of course, the jars should be executable.
    The files I use are AddressBook (interface extends Remote), AddressBookImpl (extends UnicastRemoteObject implements AddressBook), BuddyInfoInterf (interface extends Remote), BuddyInfo (the implementation, extends Unicast... implements BuddyI...), and AddressBookUser.
    The AddressBook is created on the server-side (in main() found in AddressBookImpl) and is populated with BuddyInfo's also created server-side.
    AddressBookUser is just the client accessing some info from ABook or BInfo.
    So, anyway, here's the xml file I've written to do the tasks assigned. The classes compile fine, and the jar files seem to contain the proper files. My problem is that the jar files don't execute properly. The main() in AddressBookImpl creates the ABook and binds it to the rmiregistry. When I run the server.jar that is "initially" created during the process (the one in the base dir) it works fine but this only seems to work correctly because it's in the same dir as all of the compiled classes. The copied jar file in the other directory, or even if I manually copy the server.jar file in the base dir to some other dir, causes an exception when trying to bind the AddressBook to the registry saying it can't find a stub that is definitely located in the jar. And I'm running the rmiregistry in whatever dir the server.jar is in each time:
    Exception in thread "main" java.rmi.ServerException: RemoteException occurred in
    server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.lang.ClassNotFoundException: AddressBookImpl_Stub
    at sun.rmi.server.....
    <?xml version="1.0"?>
    <project default="packaging">
    <!-- Change location(s) to desired path(s) where client and/or
    server jar files should be copied to, else will create folders
    "client" and "server" in project directory and copy them to
    there. -->
    <property name="serverDir" location="./server"/>
    <property name="clientDir" location="./client"/>
    <!-- performs all tasks -->
    <target name="packaging">
         <!-- Compiles all files in project directory. Necessary for
         AddressBookUser.java to be compiled -->
         <javac srcdir="."/>
         <!-- RMI compiles AddressBookImpl & BuddyInfo -->
         <rmic classname="AddressBookImpl" base="."/>
         <rmic classname="BuddyInfo" base="."/>
         <!-- Creates server jar file -->
         <jar destfile="./server.jar" basedir="." includes="**.class" excludes="AddressBookUser.**">
              <manifest>
                   <attribute name="Main-Class" value="AddressBookImpl"/>
                   <attribute name="Class-Path" value="."/>
              </manifest>
         </jar>
         <!-- Creates client jar file -->
         <jar destfile="./client.jar" basedir="." includes="**.class" excludes="AddressBookImpl.** BuddyInfo.** **Skel.class">
              <manifest>
                   <attribute name="Main-Class" value="AddressBookUser"/>
                   <attribute name="Class-Path" value="."/>
              </manifest>
         </jar>
         <!-- copy jar files to specified directories -->
         <copy file="./server.jar" todir="${serverDir}"/>
         <copy file="./client.jar" todir="${clientDir}"/>     
    </target>
    </project>
    Sorry bout the length. Just want to cover my bases. Thanks for any help.

    I am also having problem in building server.jar file using Ant. I am using EJB jar file in my web application, this jar file is called remotely from server to client. Client.jar file working correctly but the server.jar file contains error which is given below:
    15:30:47,296 WARN [verifier] EJB spec violation:
    Bean : Server
    Section: 22.2
    Warning: The Bean Provider must specify the fully-qualified name of the Java cla
    ss that implements the enterprise bean's business methods in the <ejb-class> ele
    ment.
    Info : Class not found on 'com.ejb.ServerBean': No ClassLoaders found for: com.ejb.ServerBean
    15:30:47,296 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.0.4.GA/server/default/deploy/server.jar
    org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
    In above error, "Class not found on 'com.ejb.ServerBean' " is given. Will there be all the classes of EJB jar file in server.jar ? I think only the interface class file i.e. Server.class and serverHome.class must be included, am I correct or not?
    Also the build.xml which I am using for creating server.jar is given below:
    <project name="ServerEJB" default="make_server_jar" basedir=".">
    <!-- Initialization variables -->
    <property environment="env" />
    <property name="app.name" value="${ant.project.name}"/>
    <property name="source.dir" value="ejbModule"/>
    <property name="build.dir" value="build"/>
    <property name="classes.dir" value="${build.dir}/classes"/>
    <property name="distribution.dir" value="dist"/>
         <property name="server.ejb.jar.name" value="server.jar"/>
    <target name="clean" description="Deletes compiled and generated code">
    <delete dir="${build.dir}"/>
    </target>
    <target name="make_server_jar" depends="" description="Builds a server.jar with stubs for apps to use">
    <mkdir dir="${distribution.dir}" />
    <jar destfile="${distribution.dir}/${server.ejb.jar.name}" basedir="${classes.dir}">
         <exclude name="**/*Bean.class"/>
    </jar>
    </target>     
    </project>
    I am using server.jar file in server as interface which will remotely call client.jar which will be kept at client location.
    Anybody, can you provide me with the solution for this problem?...
    Thank you.

  • Deploy bpel project using ant

    Hi,
    I am try to create the build.xml to deploy the bpel project with ant.
    The build.xml and build.properties work fine with Jdev now, but when I use the command line 'ant deploy' to test it, it got following error:
    Buildfile: build.xml
    [echo]
    [echo] oracle.home = "D:/jdevstudio10134"
    [echo] bpel.home = "D:/jdevstudio10134/integration/bpel"
    [echo]
    [java] Java Result: 1
    [taskdef] Could not load definitions from resource com/collaxa/cube/ant/orabpe
    l-antlib.xml. It could not be found.
    pre-build:
    validateTask:
    [echo]
    [echo] --------------------------------------------------------------
    [echo] | Validating workflow
    [echo] --------------------------------------------------------------
    [echo]
    BUILD FAILED
    D:\Projects\NetApp\SVN\Integration\Item\SourceCode\UpdateItemEbizReqABCSImpl\bui
    ld.xml:72: Could not create task or type of type: validateTask.
    Ant could not find the task or a class this task relies upon.
    This is common and has a number of causes; the usual
    solutions are to read the manual pages then download and
    install needed JAR files, or fix the build file:
    - You have misspelt 'validateTask'.
    Fix: check your spelling.
    - The task needs an external JAR file to execute
    and this is not found at the right place in the classpath.
    Fix: check the documentation for dependencies.
    Fix: declare the task.
    - The task is an Ant optional task and the JAR file and/or libraries
    implementing the functionality were not found at the time you
    yourself built your installation of Ant from the Ant sources.
    Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
    task and make sure it contains more than merely a META-INF/MANIFEST.MF.
    If all it contains is the manifest, then rebuild Ant with the needed
    libraries present in ${ant.home}/lib/optional/ , or alternatively,
    download a pre-built release version from apache.org
    - The build file was written for a later version of Ant
    Fix: upgrade to at least the latest release version of Ant
    - The task is not an Ant core or optional task
    and needs to be declared using <taskdef>.
    - You are attempting to use a task defined using
    <presetdef> or <macrodef> but have spelt wrong or not
    defined it at the point of use
    Remember that for JAR files to be visible to Ant tasks implemented
    in ANT_HOME/lib, the files must be in the same directory or on the
    classpath
    Please neither file bug reports on this problem, nor email the
    Ant mailing lists, until all of these causes have been explored,
    as this is not an Ant bug.
    Total time: 0 seconds.
    Any hint on it?
    Thanks!

    you need to set environment variables (at least $ORACLE_HOME and $JAVA_HOME), for ant tasks to work from command line.
    If you are trying this on the SOA Suite server, open a devprompt.sh from $ORACLE_HOME/bpel/bin, and it would work from there.
    Regards,
    Shanmu.
    http://www.prshanmu.com/articles/

  • JApplet MANIFEST classpath.. 3 files

    how do I make the right manifest file for it?
    with this as my MANIFEST.MF
    Manifest-Version: 1.0
    Class-Path: "swingx-0.9.0.jar;mysql-connector-java-5.0.4.jar;MS-SQL_jdbc.jar;"I get this..
    java.lang.NoClassDefFoundError: org/jdesktop/swingx/JXTaskPane
         at Item.<init>(Item.java:35)
         at Main.<clinit>(Main.java:105)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at java.lang.Class.newInstance0(Class.java:355)
         at java.lang.Class.newInstance(Class.java:308)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:780)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2074)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:709)
         at sun.applet.AppletPanel.run(AppletPanel.java:363)
         at java.lang.Thread.run(Thread.java:619)which just means that it isn't loading anything I think =(
    how do I make the correct classpath?
    **EDIT**
    just ignore this.. I've figured it out
    Manifest-Version: 1.0
    Class-Path: swingx-0.9.0.jar
    mysql-connector-java-5.0.4.jar
    MS-SQL_jdbc.jarEdited by: Nizzle on Nov 14, 2007 4:46 PM

    Hi Steve,
    As a quick workaround, can you consider merging that 3rd party
    references into a simple, let's call it 3rdparty.jar, file. Then you
    will be able to overcome this line limit. If you use ANT, it can be
    made a part of the build process and can simplify future additions.
    Hope this helps,
    Regards,
    Slava Imeshev
    "Steve Ebersole" <[email protected]> wrote in message
    news:3e788ce9$[email protected]..
    >
    I am having trouble deploying an EAR file having an ejb module with amanifest
    Class-Path entry. It appears to be directly related to the length of thatClass-Path
    entry. No matter the length of the Class-Path entry, ejbc runs fine butthen
    the problem comes trying to upload the EAR through the console.
    First iteration was just skeletal code and the dependencies were minimal.I was
    able to get this uploaded and deployed correctly. For that EAR, the EJBjar file
    manifest's Class-Path entry had only 2 entries and was no where near the72-character
    line limit.
    Second iteration had some functionality and the dependencies were muchlarger.
    Again ejbc ran fine, but I got errors on upload when the console tries todeploy
    the EAR. The manifest Class-Path entry for that ejb version contained 16jar
    files which, because fo the 72 line limit, spread across 3 lines.
    The complaint I get on deployment is NoClassDefFound for a class that isin a
    jar file listed in the manifest classpath (it found it the first time).
    Is there a bug in WebLogic (6.1 sp3) where it cannot recognize manifestclasspath
    entries over a certain limit? I have seen postings about WebLogic'sissues with
    class loading from manifest classpath entries but thought they had allbeen fixed
    as of 6.1sp3.
    Thanks in advance for any help or suggestions.

  • Deploying using Ant

    Hi,
    Im trying to deploy my BPEL process to server using ant.Im using JDeveloper of version 10.1.3.1. I dont have SOA suit deployed on my server and only have a patch of JDeveloper on my system.In the build.xml I have pointed my $(oracle.home) to C:/JDeveloper
    I have configured my ant-orabpel.properties file pointing to the host which I intend to deploy my process.
    When I try to deploy my processes using Ant the validation task fails with the following error:
    BUILD FAILED
    C:\JDeveloper\jdev\mywork\AntTest\ProcessCalled\build.xml:55: Could not cr
    eate task or type of type: validateTask.
    Ant could not find the task or a class this task relies upon.
    This is common and has a number of causes; the usual
    solutions are to read the manual pages then download and
    install needed JAR files, or fix the build file:
    - You have misspelt 'validateTask'.
    Fix: check your spelling.
    - The task needs an external JAR file to execute
    and this is not found at the right place in the classpath.
    Fix: check the documentation for dependencies.
    Fix: declare the task.
    - The task is an Ant optional task and the JAR file and/or libraries
    implementing the functionality were not found at the time you
    yourself built your installation of Ant from the Ant sources.
    Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
    task and make sure it contains more than merely a META-INF/MANIFEST.MF.
    If all it contains is the manifest, then rebuild Ant with the needed
    libraries present in ${ant.home}/lib/optional/ , or alternatively,
    download a pre-built release version from apache.org
    - The build file was written for a later version of Ant
    Fix: upgrade to at least the latest release version of Ant
    - The task is not an Ant core or optional task
    and needs to be declared using <taskdef>.
    - You are attempting to use a task defined using
    <presetdef> or <macrodef> but have spelt wrong or not
    defined it at the point of use
    Remember that for JAR files to be visible to Ant tasks implemented
    in ANT_HOME/lib, the files must be in the same directory or on the
    classpath
    Please neither file bug reports on this problem, nor email the
    Ant mailing lists, until all of these causes have been explored,
    as this is not an Ant bug.
    Can anyone help me how to overcome this error and have ant completed with Build successful.
    Any help is highly appreciated.
    Thanks,
    Deepti.

    Thanks Mark,
    I have copied the jar files from ORACLE_HOME\OracleAS_1\bpel\lib to JDeveloper\integration\bpel\lib and have set the my CLASSPATH to the same and my ant started working successfully.
    Thanks,
    Deepti

  • Error in starting weblogic server using ant

    Hi,
    I am trying to start the weblogic server using ant.I used the following command:
    <taskdef name="wlserver" classname="weblogic.ant.taskdefs.management.WLServer">
    <classpath>
    <pathelement location="${BEA_HOME}/weblogic81/server/lib/weblogic.jar" />
    </classpath>
    </taskdef>
    <target name="start-weblogic">
    <wlserver username="weblogic" password="weblogic" failonerror="false" servername="myserver" domainname="rwadomain" dir="${BEA_HOME}/user_projects/domains/rwadomain" host="localhost" port="7001" weblogichome="${BEA_HOME}/weblogic81" beahome="${BEA_HOME}" policy="${BEA_HOME}\weblogic81\server\lib\weblogic.policy" />
    </target>
    But it is giving me an error that java.lang.NoClassDefFoundError: weblogic/Server
    I also tried the following command:
    <target name="start-weblogic">
    <java classname="weblogic.Server" fork="yes" classpathref="weblogic.classes" failonerror="true">
    <sysproperty key="weblogic.Domain" value="rwadomain"></sysproperty>
    <sysproperty key="weblogic.RootDirectory" value="C:\bea\user_projects\domains\rwadomain"></sysproperty>
    <sysproperty key="weblogic.ConfigFile" value="config.xml"></sysproperty>
    <sysproperty key="weblogic.ListenAddress" value="localhost"></sysproperty>
    <sysproperty key="weblogic.ListenPort" value="7001"></sysproperty>
    <arg line="-ms200m -mx200m"></arg>
    </java>
    </target>
    But the problem with this command is that it does not reurn control to execute the further commands.
    Please suggest something.
    Thanks in advance
    -amit

    Hi,
    You should take a look at the <parallel> ant task.
    Regards,
    LG

Maybe you are looking for