Ant Script

I have developer one project using JDev. NOw I need to write Ant Build script to compile the Java files under my project and generate TAR file.
Can any one provide the support steps.... for this
PROJECT HOME : C:\JDev\xxfdx\cheersupdate\jdev\myproject
package structure :
oracle/apps/xxfdx/enable/cheersupdate
under this directory we have server and webui directories
oracle/apps/xxfdx/enable/cheersupdate/server
oracle/apps/xxfdx/enable/cheersupdate/webui

Shay,
When I try to build the same build.XML file again from the same location it gives below error
C:\>cd C:\JDev\xxfdxcheersupdate\jdev\myprojects
C:\JDev\xxfdxcheersupdate\jdev\myprojects>C:\JDev\jdevbin\ant\bin\ant all
Buildfile: build.xml
init:
[mkdir] Created dir: C:\JDev\xxfdxcheersupdate\jdev\myclasses
compile:
[javac] Compiling 30 source files to C:\JDev\xxfdxcheersupdate\jdev\myclasse
s
[javac] javac: invalid target release: 1.5
[javac] Usage: javac <options> <source files>
[javac] where possible options include:
[javac] -g Generate all debugging info
[javac] -g:none Generate no debugging info
[javac] -g:{lines,vars,source} Generate only some debugging info
[javac] -nowarn Generate no warnings
[javac] -verbose Output messages about what the compiler
is doing
[javac] -deprecation Output source locations where deprecated
APIs are used
[javac] -classpath <path> Specify where to find user class files
[javac] -sourcepath <path> Specify where to find input source files
[javac] -bootclasspath <path> Override location of bootstrap class fil
es
[javac] -extdirs <dirs> Override location of installed extension
s
[javac] -d <directory> Specify where to place generated class f
iles
[javac] -encoding <encoding> Specify character encoding used by sourc
e files
[javac] -source <release> Provide source compatibility with specif
ied release
[javac] -target <release> Generate class files for specific VM ver
sion
[javac] -help Print a synopsis of standard options
BUILD FAILED
C:\JDev\xxfdxcheersupdate\jdev\myprojects\build.xml:195: Compile failed; see the
compiler error output for details.
Total time: 0 seconds
When I check JDK version it is showing 1.5 only
C:\JDev\xxfdxcheersupdate\jdev\myprojects>java -version
java version "1.5.0_10-erdist"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-erdist-b2006122
1)
Java HotSpot(TM) Client VM (build 1.5.0_10-erdist-b20061221, mixed mode, sharing
Any idea about this ?

Similar Messages

  • Export OSB configuration from eclipse using ant script

    I am trying to export an OSB project from eclipse using ant script
    I followed the link below http://biemond.blogspot.com/2010/07/osb-11g-ant-deployment-scripts.html
    It is using com.bea.alsb.core.ConfigExport to do the export. This export is always set to resource level.
    I see it generates a file ExportInfo setting some properties. It has a property that set the export level as below
    <imp:property name="projectLevelExport" value="false"/>*
    How can I export the project in project level? basically setting projectLevelExport to true?
    So that if a file does not exist in the sbconfig.jar file , then while importing the jar to OSB server it will delete the file from the server instead of skipping it?
    I appreciate any help
    here is the ant script snippet that gets executed to export from eclipse
    <target name="exportFromWorkspace">
         <delete failonerror="false" includeemptydirs="true"
    dir="${metadata.dir}"/>     
                   <!--eclipse.refreshLocal resource="${config.project}" depth="infinite"/-->
    <java dir="${eclipse.home}"
    jar="${eclipse.home}/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar"
    fork="true" failonerror="true" maxmemory="768m">
    <jvmarg line="-XX:MaxPermSize=256m"/>
    <arg line="-data ${workspace.dir}"/>
    <arg line="-application com.bea.alsb.core.ConfigExport"/>
    <arg line="-configProject ${config.project}"/>
    <arg line="-configJar ${config.jar}"/>
    <arg line="-configSubProjects ${config.subprojects}"/>
              <arg line="-exportLevel true"/>
    <arg line="-includeDependencies ${config.includeDependencies}"/>
    <sysproperty key="weblogic.home" value="${weblogic.home}"/>
    <sysproperty key="osb.home" value="${osb.home}"/>
    <sysproperty key="osgi.bundlefile.limit" value="500"/>
    <sysproperty key="harvester.home" value="${osb.home}/harvester"/>
    <sysproperty key="osgi.nl" value="en_US"/>
    <sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true"/>
    </java>
    </target>

    yes, I specified the project name to export the whole project.
    Here is few lines from my properties file
    # properties for workspace export
    config.project="OSB Configuration-GW"
    config.jar=D:/workspace/osb/scripts/gateway/mycode2/ant_osb/dist/sbconfig.jar
    config.subprojects="GatewaySecurity"
    config.includeDependencies=true
    workspace.dir=D:/workspace/osb/gateway-workspace
    But this property does not make it to export at project level ,it export the specified project at resource level.
    And while importing this jar to OSB server, if a file is missing it skips the file instead of deleting the file from the OSB server
    If I unjar sbconfig.jar file, open ExportInfo file and update the line in bold below to true then it deletes the file from OSB server, if not exist in sbconfig.jar
    <imp:property name="exporttime" value="Thu Dec 29 13:57:44 EST 2011"/>
    <imp:property name="productname" value="Oracle Service Bus"/>
    <imp:property name="productversion" value="11.1.1.4"/>
    *<imp:property name="projectLevelExport" value="false"/>*
    Here is few lines from Oracle API java doc
    http://docs.oracle.com/cd/E13171_01/alsb/docs26/javadoc/com/bea/wli/sb/management/importexport/ALSBImportOperation.Operation.html
    public static final ALSBImportOperation.Operation Delete
    Indicates that the resource is deleted in the importing domain. This is the default operation when the project is exported in its entirety and the resource exists in the target domain but not in the jar file
    public static final ALSBImportOperation.Operation Skip
    Indicates that the resource is skipped meaning the resource is not touched in the importing domain. This is the default operation if the jar file was exported at the resource level, and a resource that exists in the target domain, does not exist in the jar file.

  • Error while deploying application in Web center Spaces via ant script

    Hi all,
    Jdeveloper version 11.1.1.6
    I am trying to deploy application in Web center Spaces using ant script .
    I am able to deploy it if i keep these two files in local machine .
    wls.userkey=C:\\myFiles\\myuserkeyfile.secure
    wls.userconfig=C:\\myFiles\\myuserconfigfile.secure
    where as when I am trying to pick these files from remote web-logic server I am getting following error
    [exec]  Deploy started at Thu Dec 12 17:26:41 2013
    [exec]
    [exec] Please enter your username :Please enter your password :
    [exec] java.lang.NullPointerException
    [exec] This Exception occurred at Thu Dec 12 17:26:41 GMT+05:30 2013.
    [exec] at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:176)
    [exec] at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:61)
    [exec] at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:147)
    [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [exec] at java.lang.reflect.Method.invoke(Method.java:597)
    [exec] at org.python.core.PyReflectedFunction.__call__(Unknown Source)
    [exec] at org.python.core.PyMethod.__call__(Unknown Source)
    [exec] at org.python.core.PyObject.__call__(Unknown Source)
    [exec] at org.python.core.PyObject.invoke(Unknown Source)
    [exec] at org.python.pycode._pyx4.connect$1(<iostream>:16)
    [exec] at org.python.pycode._pyx4.call_function(<iostream>)
    [exec] at org.python.core.PyTableCode.call(Unknown Source)
    [exec] at org.python.core.PyTableCode.call(Unknown Source)
    [exec] at org.python.core.PyFunction.__call__(Unknown Source)
    [exec] at org.python.pycode._pyx72.f$0(C:\Abhishek_Mr.Price\SampleWebCenterSpacesExtensions\SampleWebCenterSpacesExtensions\WebCenterSpacesSharedLibExtension\extspaces.py:14)
         [exec] at org.python.pycode._pyx72.call_function(C:\Abhishek_Mr.Price\SampleWebCenterSpacesExtensions\SampleWebCenterSpacesExtensions\WebCenterSpacesSharedLibExtension\extspaces.py)
    [exec] at org.python.core.PyTableCode.call(Unknown Source)
    [exec] at org.python.core.PyCode.call(Unknown Source)
    [exec] at org.python.core.Py.runCode(Unknown Source)
    [exec] at org.python.util.PythonInterpreter.execfile(Unknown Source)
    [exec] at weblogic.management.scripting.WLST.main(WLST.java:124)
         [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [exec] at java.lang.reflect.Method.invoke(Method.java:597)
    [exec] at weblogic.WLST.main(WLST.java:29)
    [exec] None
    [exec] #########################################################
    [exec] #####     Deployment Failed #########
    [exec] #####     Contact support with Exception Stack #########
    [exec] #########################################################
    [exec]
    [exec]
    Chandana

    Any Updates

  • Error while running the ant script of fusion order demo -Infrastructure.jws

    Hi All,
    I was trying to run the store front application.
    As i was trying to run the scripts to create the tables, stored procedure, schemas etc, the execution of the ant script failed with the following error:
    The apache Ant log reads as follows:
    *[echo] USER_CONTEXT Package Created*
    compileImagesApp:
    *[javac] Compiling 3 source files to D:\11g\ADF-11g\FusionOrderDemo_R1PS1\Infrastructure\DBSchema\classes*
    BUILD FAILED
    D:\11g\ADF-11g\FusionOrderDemo_R1PS1\Infrastructure\Ant\build.xml:51: The following error occurred while executing this line:
    D:\11g\ADF-11g\FusionOrderDemo_R1PS1\Infrastructure\DBSchema\build.xml:312: D:\Jdev11g\oracle_common\modules\oracle.javacache_11.1.1 not found.
    Total time: 2 minutes 26 seconds
    I ignored the above error and when i tried to run the StoreFrontUI project, i was unable to see the images rendered on the User Interface.
    Can anybody help me as to why this would have happened?
    Is it not getting rendered because the ant script failed @ compileImagesApp? If so, what is the solution for the same?
    Thanks in Advance,
    Vijay

    Hi,
    Even after commenting and uncommenting the path for the imageurl variable in the ImageLoaderServiceAMImpl.java, i am getting the following error when trying to build the schema from the MasterbuildScript Project:
    compileImagesApp:
    *[javac] Compiling 3 source files to D:\11g\adf-Handson\FOD_11\Infrastructure\DBSchema\classes*
    BUILD FAILED
    D:\11g\adf-Handson\FOD_11\Infrastructure\Ant\build.xml:52: The following error occurred while executing this line:
    D:\11g\adf-Handson\FOD_11\Infrastructure\DBSchema\build.xml:262: D:\Jdev11g\jdeveloper\modules\oracle.xdk_11.1.1 not found.
    Total time: 59 seconds
    One more observation when i was changing the path in the ImageLoaderServiceAMImpl.java was that, there were lot many errors that were shown in the file:
    Following import statements were erroring out:
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.domain.BlobDomain;
    import oracle.jbo.domain.DBSequence;
    import oracle.jbo.domain.Timestamp;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.ApplicationModuleImpl;
    import oracle.jbo.server.ViewObjectImpl;
    Can you please provide some pointers on this as well?
    Regards,
    Vijay Swaminathan

  • Problem with Ant Script while deploying a BPEL Process

    Hi all,
    Im making use of Ant script to Deploy a BPEL process ...the bpel process simply invokes the credit rating service and returns the credit rating..credit rating service and the whole BPEL
    process are deployed in the default domain...now i made a new domain and making using of Ant scripts to deploy it to this Domain in the same local server ...i followed the steps
    from this blog http://blogs.oracle.com/rammenon/2007/07/deploying_bpel_process_to_mult.html now my problem is even though i mention a different Domain Name in
    ant- orabpel_dev.properties its always getting deployed to Default domain........can anyone Plzzz help me.
    Edited by: 0racler on Aug 15, 2009 12:09 PM

    in build.properties of the project -
    uncomment (remove the #) and change to the new domain
    # Change below if deploying in domain other than "default"
    #domain = default
    when you run deployProcess target - you should see which domain is used - based on the above variable.
    cheers

  • Error while compiling the composite through custom ant script

    Hi,
    I am getting the following error while compiling the composite through custom built ant scripts which are intern call the ant-sca-package.xml. And the composite is created by upgrading the 10g bpels. But the same composite is successfully compiling from Jdeveloper (11.1.1.4).
    oad of wsdl "oramds:/soa/shared/workflow/NotificationService.wsdl" failed
    oracle.fabric.common.FabricException: Error in getting XML input stream: oramds:/soa/shared/workflow/NotificationService.wsdl: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/soa/shared/workflow/NotificationService.wsdl does not exist.
         at oracle.fabric.common.metadata.MetadataManagerImpl.getInputStreamFromAbsoluteURL(MetadataManagerImpl.java:280)
         at oracle.integration.platform.common.MDSMetadataManagerImpl.getInputStreamFromAbsoluteURL(MDSMetadataManagerImpl.java:555)
         at oracle.fabric.common.metadata.MetadataManagerImpl.getDocumentAsInputStream(MetadataManagerImpl.java:159)
         at oracle.integration.platform.common.MDSMetadataManagerImpl.getDocumentAsInputStream(MDSMetadataManagerImpl.java:417)
         at oracle.fabric.common.wsdl.WSDLManager.loadWSDL(WSDLManager.java:241)
         at oracle.fabric.common.wsdl.WSDLManager.loadWSDL(WSDLManager.java:304)
         at oracle.soa.scac.ValidateComposite.loadWSDLs(ValidateComposite.java:934)
         at oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:491)
         at oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:150)
         at oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:135)
    Caused by: java.io.IOException: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/soa/shared/workflow/NotificationService.wsdl does not exist.
         at oracle.mds.internal.net.AbstractOraMDSURLConnection.getPDocStream(AbstractOraMDSURLConnection.java:388)
         at oracle.mds.internal.net.AbstractOraMDSURLConnection.getInputStream(AbstractOraMDSURLConnection.java:176)
         at oracle.mds.internal.net.OraMDSURLConnection.getInputStream(OraMDSURLConnection.java:67)
         at java.net.URL.openStream(URL.java:1010)
         at oracle.fabric.common.metadata.MetadataManagerImpl.getInputStreamFromAbsoluteURL(MetadataManagerImpl.java:276)
         ... 9 more
    Caused by: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/soa/shared/workflow/NotificationService.wsdl does not exist.
         at oracle.mds.internal.net.AbstractOraMDSURLConnection.getPDocStream(AbstractOraMDSURLConnection.java:339)
    And in the following blog, its recommended to check for the adf-config.xml. But when upgrading the bpels from 10g to 11.1.1.4, I don't see any such file created by Jdeveloper.
    http://orasoa.blogspot.com/2010/08/ant-and-mds-composite-compile-error.html
    Not sure if I am missing some properties to add in by custom script while compiling.
    Thanks
    Sree
    Edited by: Sree on Jul 4, 2011 7:25 AM

    Hi Hussain,
    Thanks for the reply.
    Were you able to compile the form at the client side successfully?
    1) Were you able to compile the form at the client side successfully?:
    Ans: Yes, I was able to compile the form successfully at client side.
    2) Are you logged in as applmgr user? Have you sourced the application env file before compiling the form?
    Ans: No, I have not logged by applmgr user, i am using my own login. Yes I have sourced the application env file before compiling the form
    3) What does "echo $FORMS_PATH" return?
    Ans: echo $FORMS_PATH on server gives this path
    /u01/app/EBS00/apps/apps_st/appl/au/12.0.0/resource:/u01/app/EBS00/apps/apps_st/appl/au/12.0.0/resource/stub
    Can you please advise?
    Thanks,

  • How to deploy jar file in WLS using ant script

    Hi,
    Im trying to deploy a jar file in weblogic 10.3 using ant script and am running into the below error.
    +[wldeploy] weblogic.management.DeploymentException: [J2EE:160177]The application at "/u01//RSJBObjects.jar" was not recognized as a valid application type. If this is an EAR file, please ensure the META-INF/application.xml exists. EJB-JARs should have a META-INF/ejb-jar.xml or corresponding annotations exist. If this is an exploded WAR, the name of directory must be end with ".war". RARs require a META-INF/ra.xml. A JMS deployment should be an XML file whose name ends with "-jms.xml". A JDBC deployment should be an XML file whose name ends with "-jdbc.xml". For other application types, please consult the WebLogic Server documentation.+
    When i try to deploy the same manually from the console, i get a warning stating that WLS thought this as a library and hence proceeding to deploy as a library. After this warning the deployment continues and completes.
    Problem is when i try to deploy using ant, it breaks at this point.
    Is there any means that we can deploy a jar to WLS using ant script. This has to be deployed as a library as other apps would be using this jar.
    Im unable to create a ear file for this single jar file.
    If there is any suggestion on can this be done, please share.
    Thanks,
    Vijay.

    Hi Sunil,
    Thanks for the reply, it worked.
    Another doubt on the same lines. Now that the jar has been deployed as a library in WLS, when i try to deploy a WAR which refers to this deployed jar library, im unable to. I run into and error stating that the library is inaccessible.
    I have to bounce the server and before doing that, i have to manually copy the library.jar from <WLS_domain>/servers/AdminServer/upload/ directory to <WLS_domain>/lib/ directory, once copied i then try to deploy the WAR, then the deployment goes fine.
    Is there any means that this deployed library jar be made available soon after deployment and also to avoid copying the file.
    Thanks,
    Vijay.

  • SOA Composite (having refernce to MDS )Deployment thru ANT script

    I have been trying to deploy SOA composite which has reference to 'oramds:/soa/shared/workflow/TaskServiceInterface.wsdl' thru ANT script.But getting below error -
    scac-validate:
    [echo] Running scac-validate in D:\apps\saurabhk\deployment\Error Logging\Ev
    entHandlerSubscriberComposite\bin/..//composite.xml
    [echo] oracle.home = D:/apps/common/mw_home/jdeveloper
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.
    scac:
    [scac] Validating composite "D:\apps\saurabhk\deployment\Error Logging\Event
    HandlerSubscriberComposite\bin/..//composite.xml"
    [scac] FATAL_ERROR: location {ns:composite}(12,61): Parse of component type
    files failed, check the adf-config.xml file : "oracle.fabric.common.FabricExcept
    ion: oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS c
    onfiguration document
    [scac] MDS-01329: unable to load element "persistence-config"
    [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "msto
    re-usage_1" is invalid.
    [scac] MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMet
    adataStore" cannot be instantiated.
    [scac] oracle.jdbc.driver.T4CConnection.isValid(I)Z
    [scac] : MDS-01330: unable to load MDS configuration document
    [scac] MDS-01329: unable to load element "persistence-config"
    [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "msto
    re-usage_1" is invalid.
    [scac] MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMet
    adataStore" cannot be instantiated.
    [scac] oracle.jdbc.driver.T4CConnection.isValid(I)Z
    [scac] : oracle.mds.config.MDSConfigurationException: MDS-01330: unable to l
    oad MDS configuration document
    [scac] MDS-01329: unable to load element "persistence-config"
    [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "msto
    re-usage_1" is invalid.
    [scac] MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMet
    adataStore" cannot be instantiated.
    [scac] oracle.jdbc.driver.T4CConnection.isValid(I)Z
    [scac] : MDS-01330: unable to load MDS configuration document
    [scac] MDS-01329: unable to load element "persistence-config"
    [scac] MDS-01370: MetadataStore configuration for metadata-store-usage "msto
    re-usage_1" is invalid.
    [scac] MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMet
    adataStore" cannot be instantiated.
    [scac] oracle.jdbc.driver.T4CConnection.isValid(I)Z
    [scac] "
    BUILD FAILED
    I have mentioned MSD information in build.properties file and adf-config.xml file.
    build.properties :-
    foreign.mds.type=db
    mds.db.userid=XXX
    mds.db.password=XX
    mds.db.jdbc-url=jdbc:oracle:thin:@XXX.XXX.XXX.XXX:1521:DBC
    adf-config.xml:-
    <?xml version="1.0" encoding="windows-1252" ?>
    <adf-config xmlns="http://xmlns.oracle.com/adf/config"
    xmlns:sec="http://xmlns.oracle.com/adf/security/config">
    <!-- server side db backed mds settings -->
    <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
    <mds-config xmlns="http://xmlns.oracle.com/mds/config">
    <persistence-config>
    <metadata-namespaces>
    <!-- shared namespace for soa artifacts, such as xsd / wsdl -->
    <namespace metadata-store-usage="mstore-usage_1" path="/soa/shared"/>
    <!-- customer namespace for sharing stuff -->
    <namespace metadata-store-usage="mstore-usage_1" path="/apps"/>
    <!-- configuration namespace for the SE/BCs, only exists on the server -->
    <namespace metadata-store-usage="mstore-usage_1" path="/soa/configuration"/>
    </metadata-namespaces>
    <metadata-store-usages>
    <metadata-store-usage id="mstore-usage_1">
    <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
    <property name="jdbc-userid" value="XXXX"/>
    <property name="jdbc-password" value="XXXX"/>
    <property name="jdbc-url"
    value="jdbc:oracle:thin:@XXX.XXX.XXX.XX:1521:DBC"/>
    <property name="partition-name" value="soa-infra"/>
    </metadata-store>
    </metadata-store-usage>
    </metadata-store-usages>
    </persistence-config>
    </mds-config>
    </adf-mds-config>
    <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"
    credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
    </sec:adf-security-child>
    </adf-config>
    Please let me know if you need any more informattion.
    Thanks in advance

    [scac] MDS-01259: The metadata store "oracle.mds.persistence.stores.db.DBMetadataStore" cannot be instantiated.This error tells that the parameters you have given in build.properties are incorrect. Cross check them again. Make sure that property mds.db.userid points to a MDS schema (for example dev_mds)
    Regards,
    Anuj

  • Problem in ant script (starting tomcat)...

    Hi,
    in my ant script (build.xml) I have some targets to start/stop tomcat:
        <!-- ================================ -->
        <!-- start/stop tomcat servlet engine -->
        <!-- ================================ -->
        <!-- check whether server is already running -->
        <target name="-started">
            <condition property="server.started">
                <and>
                    <socket port="${tomcat.port}" server="${tomcat.server}"/>
                </and>
            </condition>
        </target>
        <!-- start tomcat -->
        <target name="start" depends="-started" description="start tomcat server"
            unless="server.started">
            <echo message="Starting tomcat servlet engine..."/>
                <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
                <jvmarg value="-Djava.endorsed.dirs=${catalina.dir}/common/endorsed"/>
                <jvmarg value="-Dcatalina.base=${catalina.dir}"/>
                <jvmarg value="-Dcatalina.home=${catalina.dir}"/>
                <jvmarg value="-Djava.io.tmpdir=${catalina.dir}/temp"/>
                <arg value="start"/>
                <classpath>
                    <pathelement location="${java.home}/../lib/tools.jar"/>
                    <pathelement location="${catalina.dir}/bin/bootstrap.jar"/>
                </classpath>
            </java>
        </target>
        <!-- check whether server is still running -->
        <target name="-stopped">
            <condition property="server.stopped">
                <and>
                    <socket port="${tomcat.port}" server="${tomcat.server}"/>
                    <not>
                        <isset property="server.started"/>
                    </not>
                </and>
            </condition>
        </target>
        <!-- stop tomcat -->
        <target name="stop" depends="-stopped" description="stop tomcat server"
            if="server.stopped">
            <echo message="Stopping tomcat servlet engine..."/>
            <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
                <jvmarg value="-Djava.endorsed.dirs=${catalina.dir}/common/endorsed"/>
                <jvmarg value="-Dcatalina.base=${catalina.dir}"/>
                <jvmarg value="-Dcatalina.home=${catalina.dir}"/>
                <jvmarg value="-Djava.io.tmpdir=${catalina.dir}/temp"/>
                <arg value="stop"/>
                <classpath>
                    <pathelement location="${java.home}/../lib/tools.jar"/>
                    <pathelement location="${catalina.dir}/bin/bootstrap.jar"/>
                </classpath>
            </java>
        </target>The problem I have is, when using another target which depends on the tomcat start target, for example my list target:
        <target name="list" depends="start" description="list installed web applications">
            <list url="${url}" username="${username}"
                password="${password}"/>
        </target>When executing the list target, tomcat starts up correctly but the list target is not executed.
    Any help would be greatly appreciated.
    Best regards
    - Stephan

    No, I don't think that's the problem.
    In my opinion, the problem has something to do with
    fork="yes"in the start target.
    But how can I tell ant to first execute another target (the target that starts tomcat) and then execute for example the list target (which lists all the installed web apps)? When using the depends attribute it doesn't work:
    <target name="list" depends="start">
        <list url=.../>
    </target>When executing the list target, tomcat starts automatically (start target) but the list target is not executed after that :-(
    Any ideas?
    Best regards
    - Stephan

  • Workshop ANT Script Error in JAX-WS and XMLBeans Facet

    I am having a strange problem. I have a web service project created in Eclipse BEA Weblogic 9.2 Workshop IDE. The structure is:
    -EAR...which consitutues
    -JAX-WS WAR project
    -EJB Project
    The JAX-WS WAR has XMLBeans/XMLBuilder facets enabled to be used for compiling my XSD schemas being used in my web service.
    When I build the project and export the ear through the IDE it works fine. I wanted to generate ANT scripts for all these projects so I can build and export the EAR through the command prompt. I was able to that. Now I wanted to check-in the project code in a source control management tool. Naturally I shouldn't check-in the .xbean_bin and .xbean_src folders generated by the the JAXB API against my schemas. The problem happens that when I delete these folders and then run my ANT build script through command prompt I get the following error:
    assembly: [mkdir] Created dir: C:\Projects\kc\kces2\kcesWs\build\assembly\.src
    [assemble] Input fileset contained no files, nothing to do. init.env: init.typedefs: init: generated.root.init: webservice.build:
    [jwsc] JWS: processing module weboutput
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 1 JWS files being processed for module weboutput [AntUtil.deleteDir] Deleting directory C:\DOCUME~1\Syunus\LOCALS~1\Temp\_5l950r10
    BUILD FAILED
    C:\Projects\KEYCOM~1\kces2\kcesEar\build.xml:184: The following error occurred while executing this line: jar:file:/C:/bea/WEBLOG%7e2/workshop/lib/wlw-antlib.jar!/com/bea/wlw/antlib/antlib.xml:91:
    The following error occurred while executing this line: C:\Projects\KEYCOM~1\kces2\kcesEar\build.xml:196:
    The following error occurred while executing this line: C:\Projects\kc\kces2\kcesWs\build.xml:401:
    The following error occurred while executing this line: C:\Projects\kc\kces2\kcesWs\build.xml:293:
    The following error occurred while executing this line: C:\Projects\kc\kces2\kcesWs\build.xml:490: java.lang.RuntimeException: java.lang.ExceptionInInitializerError
    Total time: 13 seconds
    The above mentioned XMLBean folders are created, my schemas are compiled but the build process terminates at that point when trying to compile the web service code file i.e. the jwsc task fails. Right after that, if I again initiate the build everything goes fine. Apparently the build script expects these 2 XMLBean folders to be present before hand?
    The ANT build chain goes like this:
    -ANT build script for the EAR project -> which calls child ANT build scripts for all referenced sub projects, which are the WAR (here it fails on the first run) and the EJB projects in my case.
    Any idea why it is happening? Thanks a lot.
    cross-posted at
    http://www.coderanch.com/t/485654/Ant-Maven-Other-Build-Tools/ANT-Script-Error-JAX-WS:

    Hi,
    Hope you are doing good.
    I needed some information on how to write a ANT script to create a deployable WAR file of web service built using JAX WS.
    Could you help me with steps / ANT tasks / sample if any.
    Thanks in advance.
    Chandan
    PWC

  • Ant Scripts: Issue while running , getting BPM-71504: Unexpected error pars

    Hi
    I am running ant scripts through command prompt on the server itself.
    And on evry run I am getting the same error I followed this url Steps to deploy an bpel project using ANT scripts.. to start up but couldnt find resolution to my issue
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <Faults>
    <Fault>
    <severity>error</severity>
    <loc/>
    <line/>
    <col/>
    <file/>
    <name/>
    <fix/>
    <msg>BPM-71504: Unexpected error parsing 'oramds:/soa/shared/workflow/TaskEvidenceService.xsd'. Cause: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/soa/shared/workflow/TaskEvidenceService.xsd does not exist.. Action: Verify that file is valid and accessible</msg>
    </Fault>
    <Fault>
    <severity>error</severity>
    <loc/>
    <line/>
    <col/>
    <file/>
    <name/>
    <fix/>
    <msg>BPM-71504: Unexpected error parsing 'oramds:/soa/shared/workflow/WorkflowCommon.xsd'. Cause: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/soa/shared/workflow/WorkflowCommon.xsd does not exist.. Action: Verify that file is valid and accessible</msg>
    </Fault>
    <Fault>
    <severity>error</severity>
    <loc/>
    <line/>
    <col/>
    <file/>
    <name/>
    <fix/>
    <msg>BPM-71504: Unexpected error parsing 'oramds:/soa/shared/workflow/WorkflowTask.xsd'. Cause: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/soa/shared/workflow/WorkflowTask.xsd does not exist.. Action: Verify that file is valid and accessible</msg>
    </Fault>
    </Faults>
    Looking forward for a response...
    Thanks in advance

    hi I have configured the adf-config.xml but still getting the same error.
    Please let me know what i am doing wrong
    <?xml version="1.0" encoding="windows-1252" ?>
    <adf-config xmlns="http://xmlns.oracle.com/adf/config"
    xmlns:config="http://xmlns.oracle.com/bc4j/configuration"
    xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
    xmlns:sec="http://xmlns.oracle.com/adf/security/config">
    <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
    <defaults useBindVarsForViewCriteriaLiterals="true"/>
    <startup>
    <amconfig-overrides>
    <config:Database jbo.locking.mode="optimistic"/>
    </amconfig-overrides>
    </startup>
    </adf-adfm-config>
    <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
    <adf-property name="adfAppUID" value="AntApplication-7567"/>
    </adf:adf-properties-child>
    <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"
    credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
    </sec:adf-security-child>
    <adf-mds-config xmlns="http://xmlns.oracle.com/adf/mds/config">
    <mds-config xmlns="http://xmlns.oracle.com/mds/config">
    <persistence-config>
    <metadata-namespaces>
    <namespace path="/soa/shared" metadata-store-usage="mstore-usage_3"/>
    </metadata-namespaces>
    <metadata-store-usages>
    <metadata-store-usage id="mstore-usage_3">
    <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
    <property name="metadata-path"
    value="C:/Oracle/Middleware1/jdev/jdeveloper/integration"/>
    <property name="partition-name" value="seed"/>
    </metadata-store>
    </metadata-store-usage>
    </metadata-store-usages>
    </persistence-config>
    </mds-config>
    </adf-mds-config>
    </adf-config>
    Regards.....
    Edited by: bpm11gnewbie on Oct 7, 2012 10:16 PM

  • Creating Datasource in WLS 10.x using ant script

    All,
    We need to create datasource using ant script which uses wlconfig, has anyone done it before? tried the below script, it creates the datasource and connection pool seperately. In WLS 10.x the connection pool entries are part of the datasource itself but the script creating seperately.
    <?xml version="1.0" encoding="windows-1252" ?>
    <project name="deploy" default="all" basedir=".">
    <!-- master build.properties -->
    <property file="../../build/build.properties"/>
    <property file="build.properties"/>
    <echo> ${wls.home} </echo>
    <echo> ${wls.url} </echo>
    <path id="library.WL">
    <pathelement location="${wls.home}/server/lib/weblogic.jar"/>
    <pathelement location="${wls.home}/../modules/features/weblogic.server.modules_10.3.1.0.jar"/>
    <pathelement location="${wls.home}/server/lib/webservices.jar"/>
    <pathelement location="${wls.home}/../modules/org.apache.ant_1.7.0/lib/ant-all.jar"/>
    <pathelement location="${wls.home}/../modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar"/>
    </path>
    <taskdef name="wldeploy" classpathref="library.WL"
    classname="weblogic.ant.taskdefs.management.WLDeploy"/>
    <taskdef name="wlconfig" classpathref="library.WL"
    classname="weblogic.ant.taskdefs.management.WLConfig"/>
    <target name="init">
    <wlconfig username="${server.user}" password="${server.password}"
    url="${wls.url}">
    <query domain="base_domain" type="Server" name="soa_server1" property="soaServer"/>
    <query domain="base_domain" type="Server" name="soa_server1" property="soaServers"/>
    <create type="JDBCConnectionPool" name="${pool.name}"
    property="pool">
    <set attribute="CapacityIncrement" value="1"/>
    <set attribute="DriverName" value="${database.driver}"/>
    <set attribute="InitialCapacity" value="1"/>
    <set attribute="MaxCapacity" value="10"/>
    <set attribute="Password" value="${database.password}"/>
    <set attribute="Properties" value="user=${database.user}"/>
    <set attribute="RefreshMinutes" value="0"/>
    <set attribute="ShrinkPeriodMinutes" value="15"/>
    <set attribute="ShrinkingEnabled" value="true"/>
    <set attribute="TestConnectionsOnRelease" value="false"/>
    <set attribute="TestConnectionsOnReserve" value="false"/>
    <set attribute="URL" value="${database.connectString}"/>
    <set attribute="Targets" value="${soaServer}"/>
    </create>
    <create type="JDBCTxDataSource" name="${datasource.name}">
    <set attribute="JNDIName" value="${datasource.jndi.name}"/>
    <set attribute="PoolName" value="${pool}"/>
    <set attribute="Targets" value="${soaServers}"/>
    </create>
    </wlconfig>
    </target>
    <target name="deploy" depends="init"></target>
    </project>
    database.connectString=jdbc:rmi://localhost/jdbc:odbc:RoosterDSN
    database.user=admin
    database.password=admin
    database.driver=org.objectweb.rmijdbc.Driver
    datasource.jndi.name=jdbc/MsAccessDataSource
    datasource.name=MsAccessDataSource
    pool.name=MsAccessDataSourcePool
    Was wondering if anybody has done it? please let me know if it's possible.
    Thanks in advance..

    Hi Girish,
    Please go through with below post.
    http://rocksolutions.wordpress.com/2010/03/29/creating-a-connection-pool-using-ant-in-weblogic/
    Let me know in case any issues observed.
    Thanks

  • 10g BPEL process upgrade to 11g hangs in Jdeveloper and Ant script

    I have successfully upgraded several 10g (10.1.3.4) BPEL processes and ESB services using Jdeveloper 11g (11.1.1.6.0) migration wizard and deployed them to an 11g environment. Both 10g and 11g environments are up and running.
    However, my 11g jdeveloper hangs when migrating the next BPEL process. It hangs at the message box with the title: "Migration Status". I tried the Ant script and it hangs too. It hangs after printing out:
    "CompositeRefs
    [upgrade] WARNING: UPGBPEL-02009: No Binding setup for : "soapCheckPrivileges"
    . This will cause compilation of the upgraded project to fail. Check SOA Upgrade
    documentation on manual steps necessary to bind this composite reference. If ne
    cessary, upgrade and deploy any dependencies. If planning to retain 1013x nodes
    in this projects dependency tree, check earlier part of this log for 1013x WSDL
    URLs that can be used."
    I guess it makes sense since Jdeveloper and Ant script use the same code base for migration.
    One other observation is that if I kill the hanging jdeveloper process and reopen it and go through the migration wizard again, it will be successful without hanging. However, when I fix all the wsdl reference and do a build and deploy to sar. The resulting sar is defective and cannot be deployed to Weblogic even if both build and deploy to sar report success. The defective sar contains only scac.log and scac-log.xml, not even composite.xml.
    One difference between this BPEL process and others I have successfully upgraded is that it depends on an ESB service (this esb service has been upgraded and deployed to 11g).
    Any ideas?
    Thanks,

    I will answer my question. I killed the migrating Java process and the migrating wizard will report failure of migrating the .jpr file. Actually, the only thing missing in the migrated .jpr file is deployment profile which I can generate from deployment menu. And I can deploy the migrated process. This works as a workaround.

  • Exported ant script -- NoClassDefFound?

    I've exported ant script from workshop (wls9.2 eclipse) and I was able to build the app.war (web services) ok.
    However I saw message like this:
    "assembly: Imput fileset contained no files, nothing to do."
    And when I deployed the war to server and tried to access the webservices, it gave me NoClassDefFound error.
    Also I noticed that the ".staging" directory has empty "lib" dir under it.
    Does anyone know how to fix it?
    Here is the generated build.xml and workspace.xml.
    ========================= workspace.xml==============
    <?xml version="1.0" encoding="UTF-8"?>
    <node name="metadata">
    <node name="projects">
    <node name="billingservice">
    <attribute name="location" value="C:/home/rlee/projects/telepacific/billingservice"/>
    </node>
    </node>
    <node name="library-modules">
    <node name="library-module">
    <attribute name="location" value="%wl.home%/common/deployable-libraries/wls-commonslogging-bridge.war"/>
    </node>
    <node name="library-module">
    <attribute name="location" value="%wl.home%/common/deployable-libraries/weblogic-controls-1.0.war"/>
    </node>
    <node name="library-module">
    <attribute name="location" value="%wl.home%/common/deployable-libraries/beehive-controls-1.0.war"/>
    </node>
    </node>
    <node name="server-runtimes">
    <node name="BEA WebLogic v9.2">
    <attribute name="location" value="%wl.home%"/>
    </node>
    </node>
    <node name="vm-locations">
    <attribute name="defaultVM" value="C:/bea/wls922/jdk150_10"/>
    <node name="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/BEA WebLogic v9.2 JRE">
    <attribute name="location" value="c:/bea/wls922/jrockit90_150_10"/>
    </node>
    </node>
    <node name="classpath-vars">
    <node name="SDKS_HOME">
    <attribute name="value" value="c:/home/rlee/projects/mpower/sdks"/>
    </node>
    <node name="WEBLOGIC_HOME">
    <attribute name="value" value="%wl.home%"/>
    </node>
    </node>
    </node>
    ======================= end of workspace.xml==============
    ==================== exported build.xml ====================
    <project default="build">
    <description>
    Project build script. All public targets require the "workspace" property to be
    set at invocation. It can either point at the Eclipse workspace directory that
    this project belongs to or an exported workspace.xml file. The wl.home property
    may also need to be specified unless WL_HOME environment variable is defined.
    </description>
    <target name="init.env" unless="init.env.executed">
    <property name="init.env.executed" value="true"/>
    <property environment="env"/>
    <condition property="wl.home" value="${env.WL_HOME}">
    <isset property="env.WL_HOME"/>
    </condition>
    <fail unless="wl.home" message="The wl.home property needs to be set!"/>
    </target>
    <target name="init.typedefs" depends="init.env" unless="init.typedefs.executed">
    <property name="init.typedefs.executed" value="true"/>
    <typedef resource="com/bea/wlw/antlib/antlib.xml">
    <classpath>
    <fileset dir="${wl.home}">
    <include name="workshop/lib/wlw-antlib.jar"/>
    <include name="workshop/lib/wlw-util.jar"/>
    <include name="workshop/lib/wlw-libmodules.jar"/>
    <include name="workshop/lib/wlw-splitsrc.jar"/>
    <include name="server/lib/ant/ant-contrib-1.0b1.jar"/>
    </fileset>
    </classpath>
    </typedef>
    </target>
    <target name="init" depends="init.env,init.typedefs" unless="init.executed">
    <property name="init.executed" value="true"/>
    <fail unless="workspace" message="The workspace property needs to be set!"/>
    <dirname property="project.dir" file="${ant.file}"/>
    <property name="echo.metadata" value="false"/>
    <mdimport workspace="${workspace}" pjdir="${project.dir}" echo="${echo.metadata}">
    <option name="skipAnnotationProcessors" value="com.bea.wlw.webservices.core"/>
    </mdimport>
    <property name="archive.name" value="${project.name}.war"/>
    <property name="uri" value="${archive.name}"/>
    <taskdef name="xmlbean"
    classname="org.apache.xmlbeans.impl.tool.XMLBean">
    <classpath>
    <pathelement path="${wl.home}/common/lib/apache_xbean.jar"/>
    <pathelement path="${wl.home}/common/eclipse/plugins/com.bea.eclipse.common.lib.apache_xbean2/jsr173_api.jar"/>
    </classpath>
    </taskdef>
    <property name="generated.module.root" value="${project.dir}/build/weboutput"/>
    <property name="assembly.src" value="${project.dir}/build/assembly/.src"/>
    </target>
    <target name="build" depends="init" description=" compiles the source files; does not package the results">
    <for list="0,1,2,3,4,5,6,7,8,9" param="i">
    <sequential>
    <if>
    <and>
    <isset property="xbean.src.@{i}.dir"/>
    <available file="${xbean.src.@{i}.dir}"/>
    </and>
    <then>
    <fileset id="xbean.src.paths.@{i}"
    dir="${xbean.src.@{i}.dir}"
    includes="${xbean.src.@{i}.include}"
    excludes="${xbean.src.@{i}.exclude}"/>
    </then>
    <else>
    <fileset id="xbean.src.paths.@{i}"
    file="null_file_set"/>
    </else>
    </if>
    </sequential>
    </for>
    <if>
    <isset property="xbean.include-classpath-contributions"/>
    <then>
    <path id="xbean.classpath">
    <path refid="java.classpath"/>
    </path>
    </then>
    <else>
    <path id="xbean.classpath">
    <pathelement location="${wl.home}/common/lib/apache_xbean.jar"/>
    </path>
    </else>
    </if>
    <mkdir dir="${xbean.src.output.dir}"/>
    <mkdir dir="${xbean.bin.output.dir}"/>
    <xmlbean
    javasource="${xbean.java-version}"
    download="${xbean.download-network-urls}"
    typesystemname="${xbean.schema-type-name}"
    noupa="${xbean.unique-particle-attribution}"
    nopvr="${xbean.particle-valid-restriction}"
    noannotations="${xbean.skip-annotations}"
    ignoreDuplicatesInNamespaces="${xbean.namespaces-to-ignore-dups}"
    srcgendir="${xbean.src.output.dir}"
    classgendir="${xbean.bin.output.dir}"
    classpathref="xbean.classpath"
    srconly="true">
    <fileset refid="xbean.src.paths.0"/>
    <fileset refid="xbean.src.paths.1"/>
    <fileset refid="xbean.src.paths.2"/>
    <fileset refid="xbean.src.paths.3"/>
    <fileset refid="xbean.src.paths.4"/>
    <fileset refid="xbean.src.paths.5"/>
    <fileset refid="xbean.src.paths.6"/>
    <fileset refid="xbean.src.paths.7"/>
    <fileset refid="xbean.src.paths.8"/>
    <fileset refid="xbean.src.paths.9"/>
    </xmlbean>
    <if>
    <isreference refid="apt.factory.path"/>
    <then>
    <mkdir dir="${apt.src.output.dir}"/>
    <for-each-java-src-path>
    <if>
    <available file="${.java.src.dir}"/>
    <then>
    <mkdir dir="${.java.src.output}"/>
    <apt
    sourcepath="${java.sourcepath}"
    srcdir="${.java.src.dir}"
    includes="${.java.src.include}"
    excludes="${.java.src.exclude}"
    destdir="${.java.src.output}"
    preprocessdir="${apt.src.output.dir}"
    classpathref="java.classpath"
    factorypathref="apt.factory.path"
    options="${apt.options}"
    compile="false"/>
    </then>
    </if>
    </for-each-java-src-path>
    </then>
    </if>
    <for-each-java-src-path>
    <if>
    <available file="${.java.src.dir}"/>
    <then>
    <mkdir dir="${.java.src.output}"/>
    <javac
    sourcepath="${java.sourcepath}"
    srcdir="${.java.src.dir}"
    includes="${.java.src.include}"
    excludes="${.java.src.exclude}"
    destdir="${.java.src.output}"
    classpathref="java.classpath"
    debug="on"/>
    </then>
    </if>
    </for-each-java-src-path>
    <delete dir="${generated.module.root}"/>
    <mkdir dir="${generated.module.root}"/>
    <resolve-path property="user.web.xml" path="WEB-INF/web.xml"/>
    <resolve-path property="user.weblogic.xml" path="WEB-INF/weblogic.xml"/>
    <copy todir="${generated.module.root}/WEB-INF" file="${user.web.xml}" />
    <copy todir="${generated.module.root}/WEB-INF" file="${user.weblogic.xml}" failonerror="false" />
    </target>
    <target name="clean" depends="init" description=" removes the files and directories generated by the build target">
    <if>
    <available file="${xbean.src.output.dir}"/>
    <then>
    <delete includeEmptyDirs="true">
    <fileset dir="${xbean.src.output.dir}" includes="**/*"/>
    </delete>
    </then>
    </if>
    <if>
    <available file="${xbean.bin.output.dir}"/>
    <then>
    <delete includeEmptyDirs="true">
    <fileset dir="${xbean.bin.output.dir}" includes="**/*"/>
    </delete>
    </then>
    </if>
    <if>
    <available file="${apt.src.output.dir}"/>
    <then>
    <delete includeEmptyDirs="true">
    <fileset dir="${apt.src.output.dir}" includes="**/*"/>
    </delete>
    </then>
    </if>
    <for-each-java-src-path>
    <if>
    <available file="${.java.src.output}"/>
    <then>
    <if>
    <equals arg1="${.java.src.dir}" arg2="${.java.src.output}"/>
    <then>
    <delete includeEmptyDirs="true">
    <fileset dir="${.java.src.output}">
    <or>
    <filename name="**/*.class"/>
    <and>
    <type type="dir"/>
    <depth min="0"/>
    </and>
    </or>
    </fileset>
    </delete>
    </then>
    <else>
    <delete includeEmptyDirs="true">
    <fileset dir="${.java.src.output}" includes="**/*"/>
    </delete>
    </else>
    </if>
    </then>
    </if>
    </for-each-java-src-path>
    <delete dir="${assembly.src}"/>
    <delete dir="${generated.module.root}"/>
    <mkdir dir="${generated.module.root}"/>
    </target>
    <target name="assemble" depends="init" description=" assembles the project for iterative dev deployment; requires that the "ear.root" property is specified">
    <property name="prefix" value=""/>
    <for-each-resource-path>
    <link ear="${ear.root}" source="${.resource.path}" target="${prefix}${uri}/${.resource.prefix}"/>
    </for-each-resource-path>
    <!-- Link in referenced utility projects into the WEB-INF/lib directory. -->
    <for-each-referenced-component>
    <if>
    <and>
    <equals arg1="${.referenced.component.type}" arg2="project"/>
    <equals arg1="${.referenced.component.target.path}" arg2="WEB-INF/lib"/>
    </and>
    <then>
    <antex
    antfile="${.referenced.component.handle}/build.xml"
    dir="${.referenced.component.handle}"
    target="assemble"
    inheritUserProps="false"
    inheritAll="false"
    inheritRefs="false">
    <property name="wl.home" value="${wl.home}"/>
    <property name="patch.home" value="${patch.home}"/>
    <property name="workspace" value="${workspace}"/>
    <property name="init.typedefs.executed" value="true"/>
    <property name="ear.root" value="${ear.root}"/>
    <property name="prefix" value="${uri}/WEB-INF/lib/"/>
    </antex>
    </then>
    </if>
    </for-each-referenced-component>
    <link ear="${ear.root}" source="${xbean.bin.output.dir}" target="${link.target}"/>
    <link ear="${ear.root}" source="${generated.module.root}" target="${uri}"/>
    <antcall target="assembly" inheritAll="true" inheritRefs="true" >
    <param name="ear.root" value="${ear.root}"/>
    </antcall>
    <antcall target="webservice.build" inheritAll="true" inheritRefs="true" />
    </target>
    <target name="stage" depends="init" description=" copies all of project's resources and build artifacts into a form that's ready for archive creation; staging directory can be overridden via the "staging.dir" property">
    <antcall target="assembly" inheritAll="true" inheritRefs="true" >
    <param name="ear.root" value="${ear.staging.dir}"/>
    </antcall>
    <antcall target="webservice.build" inheritAll="true" inheritRefs="true" />
    <property name="staging.dir" value="${project.dir}/.staging"/>
    <delete dir="${staging.dir}" quiet="true"/>
    <mkdir dir="${staging.dir}"/>
    <for-each-resource-path>
    <if>
    <available file="${.resource.path}"/>
    <then>
    <if>
    <isfile path="${.resource.path}"/>
    <then>
    <copy file="${.resource.path}" tofile="${staging.dir}/${.resource.prefix}"/>
    </then>
    <else>
    <copy todir="${staging.dir}/${.resource.prefix}">
    <fileset dir="${.resource.path}" includes="${.resource.include}" excludes="${.resource.exclude}"/>
    </copy>
    </else>
    </if>
    </then>
    </if>
    </for-each-resource-path>
    <!-- Packaged referenced utility projects into the WEB-INF/lib directory. -->
    <property name="webinflib" value="${staging.dir}/WEB-INF/lib"/>
    <mkdir dir="${webinflib}"/>
    <for-each-referenced-component>
    <if>
    <and>
    <equals arg1="${.referenced.component.type}" arg2="project"/>
    <equals arg1="${.referenced.component.target.path}" arg2="WEB-INF/lib"/>
    </and>
    <then>
    <antex
    antfile="${.referenced.component.handle}/build.xml"
    dir="${.referenced.component.handle}"
    target="archive"
    inheritUserProps="false"
    inheritAll="false"
    inheritRefs="false">
    <property name="wl.home" value="${wl.home}"/>
    <property name="patch.home" value="${patch.home}"/>
    <property name="workspace" value="${workspace}"/>
    <property name="init.typedefs.executed" value="true"/>
    <property name="archive.dir" value="${webinflib}"/>
    </antex>
    </then>
    </if>
    </for-each-referenced-component>
    <copy todir="${staging.dir}/${xbean.deploy.prefix}">
    <fileset dir="${xbean.bin.output.dir}"/>
    </copy>
    <if>
    <available file="${generated.module.root}"/>
    <then>
    <copy todir="${staging.dir}" overwrite="true">
    <fileset dir="${generated.module.root}"/>
    </copy>
    </then>
    </if>
    <taskdef name="build-manifests"
    classname="weblogic.ant.taskdefs.build.AnnotationManifestTask"
    onerror="fail" />
    <path id="annotation.manifest.search.path">
    <fileset dir="${staging.dir}">
    <include name="WEB-INF/lib/*.jar"/>
    </fileset>
    <pathelement location="${staging.dir}/WEB-INF/classes"/>
    </path>
    <path id="annotation.manifest.class.path">
    <path refid="annotation.manifest.search.path"/>
    <path refid="java.classpath"/>
    </path>
    <build-manifests moduleDir="${staging.dir}"
    searchClasspathRef="annotation.manifest.search.path"
    classpathRef="annotation.manifest.class.path"
    verbose="true"
    version=""
    stagingDir="${java.io.tmpdir}/.manifest"/>
    </target>
    <target name="archive" depends="stage" description=" creates an archive containing all projects's resources and build artifacts; archive name and location can be overridden via the "archive.path" property">
    <property name="archive.dir" value="${project.dir}"/>
    <mkdir dir="${archive.dir}"/>
    <zip destfile="${archive.dir}/${archive.name}" encoding="UTF8" whenempty="create">
    <fileset dir="${staging.dir}"/>
    </zip>
    </target>
    <target name="stage.to.ear" depends="init">
    <property name="prefix" value=""/>
    <antcallex target="archive" inheritUserProps="false" inheritAll="false" inheritRefs="false">
    <param name="wl.home" value="${wl.home}"/>
    <param name="patch.home" value="${patch.home}"/>
    <param name="workspace" value="${workspace}"/>
    <param name="init.typedefs.executed" value="true"/>
    <param name="archive.dir" value="${ear.staging.dir}${prefix}"/>
    <param name="ear.staging.dir" value="${ear.staging.dir}"/>
    </antcallex>
    </target>
    <target name="generated.root.init" depends="init">
    <property name="generated.module.root" value="${project.dir}/build/weboutput"/>
    </target>
    <target name="assembly" depends="init,generated.root.init">
    <taskdef name="assemble"
    classname="com.bea.control.assembly.AssembleTask"
    classpathref="java.classpath"
    onerror="report" />
    <property name="assembly.src.output" value="${java.src.0.output}"/>
    <mkdir dir="${assembly.src}"/>
    <path id="assembly.classpath">
    <path refid="java.classpath" />
    <pathelement location="${assembly.src.output}" />
    <pathelement path="${java.outpath}" />
    <pathelement path="${java.sourcepath}"/>
    </path>
    <assemble
    moduleDir="${generated.module.root}"
    moduleName="${project.name}"
    srcOutputDir="${assembly.src}"
    appRootDir="${ear.root}">
    <assemblyContext factory="org.apache.beehive.controls.runtime.assembly.WebAppAssemblyContext$Factory" />
    <assemblyContext factory="org.apache.beehive.controls.runtime.assembly.AppAssemblyContext$Factory" />
    <classpath refid="assembly.classpath" />
    <fileset dir="${project.dir}">
    <include name="**/*.controls.properties" />
    </fileset>
    </assemble>
    <apt
    srcdir="${assembly.src}"
    preprocessdir="${apt.src.output.dir}"
    factorypathref="apt.factory.path"
    options="${apt.options}"
    compile="false">
    <classpath refid="assembly.classpath" />
    </apt>
    <javac
    srcdir="${assembly.src}"
    destdir="${assembly.src.output}"
    debug="on">
    <classpath refid="assembly.classpath" />
    </javac>
    </target>
    <target name="webservice.build" depends="init,generated.root.init">
    <path id="jwsc.srcpath">
    <path path="${java.sourcepath}" />
    <pathelement path="build/assembly/.src" />
    </path>
    <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" />
    <property name="jwsc.module.root" value="${project.dir}/build/weboutput"/>
    <property name="jwsc.contextpath" value="billingservice"/>
    <property name="jwsc.srcpath.prop" refid="jwsc.srcpath"/>
    <path id="jwsc.classpath">
    <path refid="java.classpath" />
    <pathelement path="${java.outpath}" />
    </path>
    <jwsc
    destdir="${project.dir}/build"
    classpathref="jwsc.classpath"
    >
    <module name="weboutput" explode="true" contextPath="${jwsc.contextpath}">
    <jwsFileSet srcdir="${jwsc.srcpath.prop}">
    <include name="**/*.java"/>
    </jwsFileSet>
    <descriptor file="${jwsc.module.root}/WEB-INF/web.xml" />
    <descriptor file="${jwsc.module.root}/WEB-INF/weblogic.xml" />
    </module>
    </jwsc>
    </target>
    </project>
    ==================== end of exported build.xml =========
    Thanks!
    Edited by renqili at 08/09/2007 10:52 AM

    It looks a bug to me. The exported ant script does not take care the jar files setup in the classpath in workshop/eclipes and copy them to the WEB-INFO/lib directory.

  • Using the Netbeans GUI within a Project with existing Ant Script

    I cannot seem to figure out how to use the Netbeans GUI in my Project with existing Ant Script. Is this possible? I have no problem creating GUI interfaces in a java Application, but attempting to make a new JFrame Form gives the error: package org.jdesktop.layout does not exist, and I have not been able to find a way around this. Any suggestions? Thanks in advance.
    Chris Coulon

    OK, I think I am on the right track, but I don't understand why I am still getting this error:
    clean:
    compile:
    Copying 1 file to /Users/chris/**JavaProjects/Netbeans_ImageJ
    Created dir: /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build
    Compiling 292 source files to /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:31: package org.jdesktop.layout does not exist
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:31: package org.jdesktop.layout does not exist
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:34: package org.jdesktop.layout does not exist
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:38: package org.jdesktop.layout does not exist
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    4 errors
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build.xml:11: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 6 seconds)
    I no longer have the error in my java code in the Projects list, but I still cannot build the project. This is my current build.xml file:
    <!-- Ant makefile for ImageJ -->
    <project name="ImageJ" default="run">
      <target name="compile" description="Compile everything.">
          <!-- Copy the swing layout library into dist.lib -->
        <copy file="dist/lib/swing-layout-1.0.3.jar" todir=".." />
        <!-- First, ensure the build directory exists. -->
        <mkdir dir="build" />
        <!-- Build everything; add debug="on" to debug -->
        <javac srcdir="." destdir="build" optimize="on" source="1.4" target="1.4" debug="on">
          <!-- The plugins directory only needs to be
                 present at runtime, not at build time. -->
          <!-- exclude name="plugins/**"/-->
        </javac>
      </target>
      <target name="build" depends="compile" description="Build ij.jar.">
        <!-- Copy needed files into the build directory. -->
        <copy file="IJ_Props.txt" todir="build" />
        <copy file="images/microscope.gif" tofile="build/microscope.gif" />
        <copy file="images/about.jpg" tofile="build/about.jpg" />
         <copy file="plugins/MacAdapter.class" tofile="build/MacAdapter.class" />
        <copy todir="build/macros"><fileset dir="macros"/></copy>
        <!-- Build ij.jar. -->
        <jar jarfile="ij.jar" basedir="build"
             manifest="MANIFEST.MF" />
      </target>
      <target name="clean" description="Delete the build files.">
        <delete dir="build" />
        <delete file="ij.jar" />
      </target>
      <target name="run" depends="build" description="Build and run ImageJ.">
        <copy file="ij.jar" toDir=".." />
        <java maxmemory="640m" jar="ij.jar" fork="yes" />
      </target>
      <target name="run2" depends="build" description="Build and run ImageJ.">
        <!-- Run in ImageJ directory -->
        <copy file="ij.jar" toDir=".." />
        <java maxmemory="640m" dir=".." jar="ij.jar" fork="yes" />
      </target>
      <target name="zip" depends="clean" description="Build zrc.zip.">
        <zip zipfile="../src.zip"
           basedir=".."
           includes="source/**"
        />
      </target>
      <target name="javadocs" description="Build the JavaDocs.">
        <delete dir="../api" />
        <mkdir dir="../api" />
        <javadoc
               sourcepath="."
               packagenames="ij.*"
               destdir="../api"
               author="true"
               version="true"
               use="true"
               windowtitle="ImageJ API">
        </javadoc>
      </target>
       </project>notice I added this line: <copy file="dist/lib/swing-layout-1.0.3.jar" todir=".." />
    because the dir ".." is where the other jar files are placed, i.e.:
    [GAIAG:~/**JavaProjects/Netbeans_ImageJ/source] chris% ls ..
    PolarDisplay          ij.jar               swing-layout-1.0.3.jar
    TestFrames          myApp
    api               source
    So why is the build not able to see the package org.jdesktop.layout in the jar file?
    Chris

  • Ant Scripts works fine in one but fails in other environment

    Hi,
    Ant script is working fine in Dev environment but is failing in the other environment. Somehow the BPEL server is not able to pick the latest deployed process , due to this the dependent BPEL processes are failing. If we restart the server , it moves forward and then fails at the point where it couldn’t find reference to the processes deployed after restart. Restarting the server at every failed interval will deploy all the BPEL processes which is not the solution.
    example : we have BPEL Processes say A, B, C, D and E. A,B are independent processes C is dependent on A, D is independent and E is dependent on D. So I have Ant script to deploy in A,B,C,D,E order. Now I run the Ant Script: It deploys A,B processes and Fails at C saying it couldn't find the process A.wsdl(But A is deployed). So if i restart now it recognizes A and B are deployed so C is also deployed succesfully it also deploys D as it is Independent but fails at E. If i restart the server E is also deployed.
    The Environment is clustered.
    Any suggestion to make my Ant script to run at a go will be highly appreciated
    Thanks
    Krishna

    Hi,
    is this a redeployment of workflows? (do you use the same versionnumber or new ones?)
    can you post the soap:address of a dependent process?

Maybe you are looking for

  • How do I stop pages opening in a new tab that I haven't clicked on?

    This page keeps opening in a new tab on my browser even though I have not clicked on anything. It is very annoying and manages to open the new tab and put it as the active tab. I have pop ups disabled and new tabs which open are not supposed to take

  • Pull-out tab and layers order question

    hello i'm building a pull out tab like in here what i paste into the container is a group inluding - one panorama image / and (over it) a little icon to say "hey, grab me and pull me" the icon is over the panorama image but when i preview, it goes UN

  • Spilt the records based on new vendor number

    Hi all, I have a requirement where i must spilt the number of records in my internal table itab .i have to collect new vendor numbers into another internal table itab1. Based on that,Say if my itab1 has 2000 records , i must spilt it taking the first

  • HT201364 Mavericks Upgrade Problems

    Hi, Im not sure why i cant upgrade to Mavericks as i think my mac meets the requirements? Im running OS X 10.6.8, have 2gb of memery and plenty of hard drive space. Any suggestions?

  • Migrating CS6 to new Laptop.

    Error msg says Serial No. is ok, but finds no corresponding Application.  I _have_ downloaded app from adobe.