Ant - create a build file

Hi,
I am working on creating a build.xml which will compile my source code, and create a jar.
My project that I need to compile though references another project...this is where I am having problems. Here is the scenario
C:\projectA\src\HelloWorld.java
C:\projectB\src\com\helloworld\HelloWorldDialog.java
....so my build.xml file looks like
<project name="Hello World" default="dist" basedir=".">
     <target name="compile">
          <javac srcdir="." destdir="\build" includes="C:/projectB/src/com/helloworld/**"  debug="on" listfiles="true">
               <include name="**/*.java" />
          </javac>
     </target>
     <target name="jar" depends="compile">
     </target>
     <target name="dist" depends="jar">
          <echo>Build complete</echo>
     </target>
</project>...I havent filled out the jar part, etc yet....just trying to get through the compile.
I get errors that point to the imports in projectA's HelloWorld.java...it complains that "package com.helloworld" does not exist....any ideas? I have tried reading the ant javac manual and searching google, but havent solved this yet...so I thought I'd try here.
thanks

is this what you meant, b/c i still cant get it to compile
<project name="Hello World" default="dist" basedir=".">
     <target name="compile">
          <javac srcdir="./src" destdir="./build" debug="on" listfiles="true">
               <classpath>
                    <pathelement location="C:/eclipse/worksspace/projectB/bin" />
                    <fileset dir="C:/eclipse/workspace/projectB/bin/">
                         <include name="**/*.class" />
                    </fileset>
               </classpath>
               <include name="**/*.java" />
          </javac>
     </target>
     <target name="jar" depends="compile">
     </target>
     <target name="dist" depends="jar">
          <echo>Build complete</echo>
     </target>
</project>

Similar Messages

  • Java EE5 Tutorial -  'ant create-tables' BUILD FAILED

    Hi,
    Appologies, this is quite a begineers question, hopefully it's an easy one to answer. I've searched for the last few hours regarding this issue,
    trying things and searched the forums here at sun with no similar issue. As you can see below, I cannot create the tables for the bookstore1 application using 'ant'.
    I am getting a FileNotFoundException however the delete.sql and tutorial.sql files are at this location C:\javaee\javaeetutorial5\examples\common\sql\javadb\
    I have also made sure that the files have read and write access. I know their could be some permissions issues using vista if I installed at C:/ProgramFiles, so everything is in C:/
    Another thing I have tried is using the ant command directly even though the PATH is in my enviroment variables, just incase another version was conflicting, as I read about people having such issues.
    "C:\Sun\AppServer\lib\ant\bin\ant create-tables" => This gave the same error as below. Im not sure what other information may help you help me here, so just ask.
    Annoying thing is, this example worked fine when I set up the environment on my work laptop (which I have no access to now) earlier, I didn't have this issue.
    Thanks for your help.
    /Paul.
    c:\javaee\javaeetutorial5\examples\web\bookstore1>ant create-tables
    Buildfile: build.xml
    -pre-init:
    init:
    check:
    tools:
    start-db:
         [exec] Database already started on host localhost, port 1527.
         [exec] Command start-database executed successfully.
    delete-tables:
          [sql] Executing file: C:\javaee\javaeetutorial5\examples\web\bookstore1\=C:\javaee\javaeetutorial5\examples\common\sql\javadb\delete.sql
    BUILD FAILED
    C:\javaee\javaeetutorial5\examples\bp-project\database-ant.xml:48: java.io.FileNotFoundException: C:\javaee\javaeetutorial5\examples\web\bookstore1\=C
    :\javaee\javaeetutorial5\examples\common\sql\javadb\delete.sql (The filename, directory name, or volume label syntax is incorrect)
    Total time: 21 seconds
    c:\javaee\javaeetutorial5\examples\web\bookstore1>

    Hi,
    This is due to the path problem that u specified in build.properties file for javaee.tutorial.home= variable. Use / instead of \. Problem will solved.
    Thanks
    Amalka

  • Ant Build File Invalid

    Hello,
    I am trying to create a simple build.xml, but for some reason JDev will not acknowledge it as a valid ant file. Below is my ant file. How do I tell JDev its a valid ant file? I guess I should say that I am trying to integrate JDev JUnit with Cactus. Here are the steps I have tried thus far:
    Right click on project -- select preferences
    Click on Ant -- select project build file via browse button.
    Select file listed below.
    Get error: A valid Ant build file must be specified.
    BTW no default Targets are populated in drop down menu.
    <project name="incontainer_junit_test" default="main" basedir=".">
    <target name="init">
    <property environment="env" />
    <property name="jdev.home" location="C:/dev/jdev"/>
    </target>
    <target name="main" depends="build_jar,cactify_war">
    <echo> =====================================</echo>
    <echo> In Container JUnit Test App Deployed</echo>
    <echo> =====================================</echo>
    </target>
    <target name="build_jar">
    <war destfile="./discussion-board.war" webxml="public_html/WEB-INF/web.xml">
    <fileset dir="public_html/WEB-INF/web.xml">
    <exclude name="WEB-INF/web.xml"/>
    </fileset>
    <lib dir="${jdev.home}/jakarta-struts/lib/*">
    </lib>
    <classes dir="public_html/WEB-INF/classes"/>
    </war>
    </target>
    <target name="cactify_war">
    <cactifywar srcfile="./discussion-board.war"
    destfile="./cactified-discussion-board.war">
    <servletredirector/>
    <lib file="C:/dev/software/strutstest/lib/strutstest-2.1.0.jar"/>
    </cactifywar>
    </target>
    </project>
    Thanks so much!
    etnot

    I figured this resolved this issue. For some reason JDeveloper did not reconize the build.xml file as a valid ant build file until I closed it and re-started it.
    Thanks!
    etnot

  • New to Ant Build files and Eclipse 3.1.1

    Hi,
    I'm new to Ant Build files.
    Could you let me know the process for creating an ant build file for simple "hello world" java progarm using Eclipse 3.1.1 IDE.
    Any references/links would be great.
    Cheers,
    Naveen.

    Take a look at [url http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse.platform.doc.user/gettingStarted/qs-93_project_builder.htm]Creating a project builder Ant buildfile.
    Regards

  • Problems encountered while running ant build file....Please Help

    Hi ,
    I'm trying to create a ear using a ant build script.But encountering the following error :
    <b>[java] Exception in thread "main" java.io.InvalidClassException: javax.management.MBeanAttributeInfo; local class incompatible: stream classdesc serialVersionUID = 7043855487133450673, local class serialVersionUID = 8644704819898565848
    [java] at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
    [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
    [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
    [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
    [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
    [java] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
    [java] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
    [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
    [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    [java] at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1628)
    [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1293)
    [java] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
    [java] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
    [java] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
    [java] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    [java] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
    [java] at weblogic.management.internal.Helper.getMBeanInfo(Helper.java:281)
    [java] at weblogic.management.internal.DynamicMBeanImpl.<init>(DynamicMBeanImpl.java:186)
    [java] at weblogic.management.internal.DynamicMBeanImpl.<init>(DynamicMBeanImpl.java:169)
    [java] at weblogic.management.descriptors.XMLElementMBeanDelegate.<init>(XMLElementMBeanDelegate.java:67)
    [java] at weblogic.management.descriptors.XMLElementMBeanDelegate.<init>(XMLElementMBeanDelegate.java:51)
    [java] at weblogic.management.descriptors.BaseXMLElementMBeanImpl.<init>(BaseXMLElementMBeanImpl.java:8)
    [java] at weblogic.management.descriptors.toplevel.EJBDescriptorMBeanImpl.<init>(EJBDescriptorMBeanImpl.java:94)
    [java] at weblogic.ejb20.dd.xml.DDUtils.processEjbJarXML(DDUtils.java:212)
    [java] at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:105)
    [java] at weblogic.ejb20.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:90)
    [java] at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:670)
    [java] at weblogic.ejbc20.runBody(ejbc20.java:425)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
    [java] at weblogic.ejbc.main(ejbc.java:29)</b>
    here is the ant file which i use to build the ear :
    <b><project name="DNi6_WebOSS" default="all" basedir=".">
         <!-- set global properties for this build -->
         <property environment="env"/>
         <property file="build.properties"/>
         <property name="base" value="."/>
         <property name="classes" value="${base}/classes"/>
         <property name="lib" value="${base}/LIB"/>
         <property name="output" value="${classes}/out"/>
         <property name="JAR" value="${output}/JAR"/>
         <property name="build" value="${output}/temp"/>
         <property name="dist" value="${output}/dist"/>
         <property name="cp" value="${lib}/weblogic.jar;${lib}/log4j-1.2.8.jar;${lib}/dom4j-1.6.1.jar;${lib}/jdom.jar;${lib}/tools.jar"/>
         <property name="destfile" value="DNi6WebOSSBean.jar"/>
         <property name="exclude" value=""/>
         <property name="class_path" value="."/>
         <property name="include" value="META-INF/*.xml com/telia/dni6/util/*.class com/telia/dni6/bean/*.class"/>
         <target name="all" depends="1-clean,2-init,3-jar_ejb,4-ejbc,5-final_copy "/>
         <target name="2-init">
              <!-- Create the time stamp -->
              <tstamp/>
              <!-- Create the build directory structure used by compile
    and copy the deployment descriptors into it-->
              <mkdir dir="${build}"/>
              <mkdir dir="${JAR}"/>
              <mkdir dir="${build}/META-INF"/>
              <mkdir dir="${dist}"/>
              <mkdir dir="${dist}"/>
              <copy todir="${build}/">
                   <fileset dir="${classes}/">
                        <include name="**/*com/telia/dni6/util/*"/>
                        <include name="**/*com/telia/dni6/bean/*"/>
                   </fileset>
              </copy>
              <copy todir="${build}/META-INF">
                   <fileset dir="${base}/">
                        <include name="ejb-jar.xml"/>
                        <include name="Manifest.mf"/>
                        <include name="weblogic-ejb-jar.xml"/>
                   </fileset>
              </copy>
         </target>
         <!-- Make a standard ejb jar file, including XML deployment descriptors -->
         <target name="3-jar_ejb" depends="2-init">
              <jar destfile="${dist}/std_${destfile}" excludes="${exclude}" includes="${include}" basedir="${build}" manifest="${build}/META-INF/Manifest.mf"/>
         </target>
         <!-- Run ejbc to create the deployable jar file -->
         <target name="4-ejbc" depends="3-jar_ejb">
         <java classname="weblogic.ejbc" fork="yes" jvm="D:\jdk1.5.0_06\bin\java">
              <!-- <java classname="weblogic.ejbc" fork="yes" jvm="C:\j2sdk1.4.1_07\bin\java"> -->
                   <arg line="-compiler javac ${dist}/std_${destfile} ${dist}/${destfile}"/>
                   <classpath>
                        <pathelement path="${cp}"/>
                   </classpath>
              </java>
         </target>
         <target name="5-final_copy" depends="4-ejbc">
              <copy todir="${JAR}/">
                   <fileset dir="${dist}">
                        <include name="${destfile}"/>
                   </fileset>
              </copy>
         </target>
         <target name="1-clean">
              <delete dir="${build}"/>
              <delete dir="${dist}"/>
              <delete dir="${JAR}"/>
              <delete dir="ejbcgen"/>
              <delete dir="${output}"/>
         </target>
    </project></b>
    and these are the weblogic-ejb-jar and ejb-jar.xml used :
    weblogic-ejb-jar.xml :
    <b><?xml version="1.0" encoding="UTF-8"?>
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
    <weblogic-ejb-jar>
         <weblogic-enterprise-bean>
              <ejb-name>WebOSSInterfaceBean</ejb-name>
              <message-driven-descriptor>
                   <pool>
                        <max-beans-in-free-pool>5</max-beans-in-free-pool>
                        <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
                   </pool>
                   <destination-jndi-name>DNi6RecdTopic</destination-jndi-name>
                   <jms-polling-interval-seconds>1</jms-polling-interval-seconds>
              </message-driven-descriptor>
              <jndi-name>WebOSSInterfaceBean</jndi-name>
         </weblogic-enterprise-bean>
    </weblogic-ejb-jar></b>
    ejb-jar.xml:
    <b><?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <ejb-jar>
         <enterprise-beans>
              <message-driven>
                   <ejb-name>WebOSSInterfaceBean</ejb-name>
                   <ejb-class>com.telia.dni6.bean.WebOSSInterfaceBean</ejb-class>
                   <transaction-type>Container</transaction-type>
                   <message-driven-destination>
                        <destination-type>javax.jms.Topic</destination-type>
                   </message-driven-destination>
              </message-driven>
         </enterprise-beans>
    </ejb-jar></b>
    Please help!!!
    Thanks
    Smita.

    Hi Rob,
    I included the weblogic.jar of weblogic 9.0 in the lib and the classpath.And changed the weblogic.ejbc to weblogic.appc as weblogic.ejbc is deprecated.
    But again i'm getting this error while running the ant script.
    Part of the ant script where is error is encountered
    <!-- Run ejbc to create the deployable jar file -->
         <target name="4-ejbc" depends="3-jar_ejb">
         <java classname="weblogic.appc" fork="true" jvm="D:\jdk1.5.0_06\bin\java">
              <arg line="-compiler javac ${dist}/std_${destfile} ${dist}/${destfile}"/>
                   <classpath>
                        <pathelement path="${cp}"/>
                   </classpath>
              </java>
         </target>
    And Error is :
    [java] Usage: java weblogic.appc [options] <ear, jar, war or rar file or directory>
    [java] where options include:
    [java] -help Print the standard usage message.
    [java] -version Print version information.
    [java] -output <file> Specifies an alternate output archive or
    [java] directory. If not set, output will be
    [java] placed in the source archive or directory.
    [java] -plan <file> Specifies an optional deployment plan.
    [java] -forceGeneration Force generation of EJB and JSP classes.
    [java] Without this flag the classes may not be
    [java] regenerated if it is determined to be
    [java] unnecessary.
    [java] -quiet Turns off output except for errors
    [java] -lineNumbers Add JSP line numbers to generated class
    [java] files to aid in debugging.
    [java] -library <file> Comma-separated list of libraries. Each
    [java] library may optionally set its name and
    [java] versions, if not already set in its
    [java] manifest, using the following syntax: <file>
    [java] [@name=<string>@libspecver=<version>
    [java] @libimplver=<version|string>]
    [java] -librarydir <dir> Registers all files in specified directory
    [java] as libraries.
    [java] -keepgenerated Keep the generated .java files.
    [java] -verbose Compile with verbose output.
    [java] -classpath <path> Classpath to use.
    [java] -source <source> Source version.
    [java] -advanced Print advanced usage options.
    [java] <Aug 10, 2006 12:45:07 PM IST> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>
    [java] [J2EE:160128]ERROR: Incorrect appc command-line. Too many arguments were given. The command-line only takes a single argument, the source file, in addition to the supported options.
    [java] Java Result: 1
    I'm not sure how to proceed.Please suggest
    Thanks
    Smita

  • Build Error while Running Ant Build File in Eclipse

    I am getting the following error while running the Ant build file in eclipse ,
    Can someone help me on this ?
    Error:
    weblogic.utils.compiler.ToolFailureException: com.bea.xml.XmlException

    You need to add the JAR containing the servlet API in the external JARs for the project.
    Regards,
    Carol.

  • Opening large ant xml build file(70KB+) hangs JDeveloper 11.1.2.1.0

    Hey everyone!
    I've been using JDeveloper for about 6 months and I've loved it from the beginning. Everythings seems to be where it's supposed to be and the visual editor greatly speeds up the development. And it's free - amazing. But the team I work with... all of them use IDEA/Eclipse, that is what people got used to - those monstrous IDE's that I'm not realy into - ...So all my persuasions to migrate to JDeveloper crash on one point: when opening large(70KB+) ant xml build files the JDeveloper seems to be doing some syntax checking and just hangs without saying anything. The strange thing is that these files open OK in IDEA/Eclipse.
    I use the latest version of JDeveloper 11g Release 2 11.1.2.1.0 on Windows7-64 and 1.6.0_30 java. Can I get some help on this one to increase the JDevelper popularity among fellow java developers? :)
    Thanks in advance!
    Edited by: 924380 on 29.03.2012 15:30

    Do you have access to Oracle Support to file an SR?
    Can you post your build.xml file somewhere, and I'd be happy to test?
    Another thing to try: run jdev.exe/jdev64.exe (assuming you're on windows) from jdeveloper\jdev\bin. This will open JDev in a command prompt window, and any stack traces that jdev might throw internally would be displayed in the console window. Not that this would help you fix anything, but might give Oracle a clue as to where the issue lies.
    John

  • Server ant build file

    New to ODi, looking for some advice.
    I can run an ant script - but have to specify build file on local machine i.e c:\application\config\build.xml
    Is there anyay to specify a file on a server maybe server:/config/build.xml or use a logical file technology based data source?
    Many Thanks

    does someone have idea about my issues?
    below are my telnet task definition in ant and output message after runing the task, but i can not see any result from the command "mkdir".
    <project name="XXX" basedir="." default="telnet">
    <target name="telnet" depends="" description="" >
         <telnet userid="XXX" password="XXX" server="missrv" >
              <write string="cd /home/hfan" />
              <write string="mkdir test"/>     
         </telnet>
    </target>
    <project>
    Henry

  • Recompilation and ant build file

    Hi, all
    I already set precompile to false in weblogic.xml. However, when we deploy, the JSPs are recompiled again claiming that they are stale. And we are using workshop ant build file. And I found out that the timestamps of compiled classes of JSPs are elder than JSP because the ant build copies the classes first to staging directory. See the following;
    &lt;for-each-resource-path&gt;
    &lt;echo level="info" message=".resource.path= ${.resource.path}"/&gt;
    &lt;if&gt;
    &lt;available file="${.resource.path}"/&gt;
    &lt;then&gt;
    &lt;if&gt;
    &lt;isfile path="${.resource.path}"/&gt;
    &lt;then&gt;
    &lt;copy file="${.resource.path}" tofile="${staging.dir}/${.resource.prefix}"/&gt;
    &lt;/then&gt;
    &lt;else&gt;
    &lt;copy todir="${staging.dir}/${.resource.prefix}"&gt;
    &lt;fileset dir="${.resource.path}" includes="${.resource.include}" excludes="${.resource.exclude}"/&gt;
    &lt;/copy&gt;
    &lt;/else&gt;
    &lt;/if&gt;
    &lt;/then&gt;
    &lt;/if&gt;
    &lt;/for-each-resource-path&gt;
    Is there any work-around to solve this? I don't want recompilation to occur again during deployment. Thanks in advance.
    Stephen

    First of all, why exactly do you care if it recompiles all the JSPs on deployment (precompile=true), even if it doesn't need to? This isn't a user experience problem, as all the pages would be compiled by the time a user referenced the page.
    If you want to avoid compiling JSPs on deployment, then have your build process compile the JSPs, include the generated servlet classes, and exclude the JSPs the generated classes were based on.

  • Problem building WLI 10.2 applications with exported ant build files

    Hello,
    I'm trying to build a WLI application without the workshop IDE. To accomplish this I exported ant build files, workspace.xml and the workspace libraries.
    When I run the build, I get the following (part of the) stacktrace:
    [apt] Compiling 8 source files to C:\development\BuildOFOP\workspace\ContractAccountService-Web\build\classes
    [apt] warning: Annotation types without processors: [com.bea.wli.transform.XQueryTransform.SchemaValidate]
    [apt] java.io.FileNotFoundException: File not found
    [apt] at java.util.zip.ZipFile.open(Native Method)
    [apt] at java.util.zip.ZipFile.<init>(ZipFile.java:117)
    [apt] at java.util.zip.ZipFile.<init>(ZipFile.java:76)
    [apt] at com.bea.wli.bpm.bean.codegen.JarHelper.unJar(JarHelper.java:31)
    [apt] at com.bea.wli.bpm.bean.codegen.ResourceConfig.configureEjbJars(ResourceConfig.java:749)
    [apt] at com.bea.wli.bpm.bean.codegen.ResourceConfig.configureEjbJars(ResourceConfig.java:704)
    [apt] at com.bea.wli.bpm.compiler.JpdAnnotationProcessor.generateBeans(JpdAnnotationProcessor.java:343)
    [apt] at com.bea.wli.bpm.compiler.JpdAnnotationProcessor.generate(JpdAnnotationProcessor.java:56)
    [apt] at com.bea.wli.knex.ap.TwoPhaseAnnotationProcessor.process(TwoPhaseAnnotationProcessor.java:103)
    [apt] at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    [apt] at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
    [apt] at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
    [apt] at com.sun.tools.apt.main.Main.compile(Main.java:1075)
    [apt] at com.sun.tools.apt.main.Main.compile(Main.java:938)
    [apt] at com.sun.tools.apt.Main.processing(Main.java:95)
    [apt] at com.sun.tools.apt.Main.process(Main.java:43)
    [apt] at com.sun.tools.apt.Main.main(Main.java:34)
         [apt] Problem encountered during annotation processing;
    [apt] see stacktrace below for more information.
    [apt] java.lang.IllegalStateException: Error customizing project beans; could not locate weblogic home null
    [apt] at com.bea.wli.bpm.bean.codegen.ResourceConfig.configureEjbJars(ResourceConfig.java:769)
    [apt] at com.bea.wli.bpm.bean.codegen.ResourceConfig.configureEjbJars(ResourceConfig.java:704)
    [apt] at com.bea.wli.bpm.compiler.JpdAnnotationProcessor.generateBeans(JpdAnnotationProcessor.java:343)
    [apt] at com.bea.wli.bpm.compiler.JpdAnnotationProcessor.generate(JpdAnnotationProcessor.java:56)
    [apt] at com.bea.wli.knex.ap.TwoPhaseAnnotationProcessor.process(TwoPhaseAnnotationProcessor.java:103)
    [apt] at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    [apt] at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
    [apt] at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
    [apt] at com.sun.tools.apt.main.Main.compile(Main.java:1075)
    [apt] at com.sun.tools.apt.main.Main.compile(Main.java:938)
    [apt] at com.sun.tools.apt.Main.processing(Main.java:95)
    [apt] at com.sun.tools.apt.Main.process(Main.java:43)
    [apt] at com.sun.tools.apt.Main.main(Main.java:34)
    [apt] Caused by: java.io.FileNotFoundException: File not found
    [apt] at java.util.zip.ZipFile.open(Native Method)
    [apt] at java.util.zip.ZipFile.<init>(ZipFile.java:117)
    [apt] at java.util.zip.ZipFile.<init>(ZipFile.java:76)
    [apt] at com.bea.wli.bpm.bean.codegen.JarHelper.unJar(JarHelper.java:31)
    [apt] at com.bea.wli.bpm.bean.codegen.ResourceConfig.configureEjbJars(ResourceConfig.java:749)
    [apt] ... 12 more
    Anyone got any idea what might be the problem here? I did followed the BEA instructions for exporting the ant build files.
    Grtz, Jaco

    Hi
    This is a known issue addressed by CR205204
    As you said, IBM actually does not have rt.jar in its JDK - they have moved contents of rt.jar into various jars.
    IBM is not using org/apache/crimson/tree/ in their JDK at all.So the error shows up in the end of build even if it succeeds
    You may need to add crimson.jar to wlwBuild classpath, since it is not part of IBMs JDK.
    Note: the build will work even w/o crimson.jar giving a non build related IDE exception in the very end.
    Thanks
    Vimala

  • Separating ant build file

    hi,
    is it possible to separate ant build file (build.xml) insto separate smaller build files for easier reading?
    Thankx
    Merry Christmas & Happy New Year to All

    i tried but seems does not work... or i did something wrong.
    i specified as such:
    <include name="${base}/bin/**">
    is this correct?
    regards
    i can use <include name="**/bin/**"> but i do not
    like it since other folder may contain bin
    directory..Specify the 'bin' directory relative to the base
    directory - the directory contaiing the build.xml
    file unless you have specified differently using the
    'basedir' attribute of the project.
    OR
    specify the absolute path to the bin directory.
    It is usualy better to specify the path relative to
    the 'basedir'.

  • Problem in creating a build.xml for weblogic portal application

    Team ,
    I am facing problem in creating the build.xml using weblogic.BuildXMLGEN tool .
    a) Below is the structure of my portal application
    SrcCode
    --- .metadata (eclipse plugins folder)
    --- B2BApp ( Ear Content)
    --- b2bPortal ( portal related file(controllers,jsp)
    --- b2bsrc     (java src)
    b) Now I executed below utility to generate the build.xml "
    java weblogic.BuildXMLGen -projectName B2BApp -username weblogic -file build.xml -password welcome1 F:\srcCode"
    c) Based on the above step , build.xml got generated .
    d) when I execute "ant compile" target from the command prompt , I see the below exception
    ant compile
    Buildfile: build.xml
    compile:
    +[wlcompile] [JAM] Warning: failed to resolve class AbstractJspBacking+
    +[wlcompile] [JAM] Error: unexpected exception thrown:+
    +[wlcompile] com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in F:\b2bNew\b2bPortal\src\portlets\b2b\dmr\Picker\PickerController.java at line 58.+
    e) I suspect , the problem is bcoz of classpath issues , as I generated build.xml donot have the references to dependent lib's.As build.xml looks like below :
    +<target name="compile" description="Only compiles B2BApp application, no appc">+
    +<wlcompile srcdir="${src.dir}" destdir="${dest.dir}">+
    +<!-- These referenced libraries were not found -->+
    +<!-- <library file="p13n-core-web-lib" /> -->+
    +<!-- <library file="jersey-web-lib" /> -->+
    +.....+
    +....+
    Please help me to reslove these issues .
    PS: I able to deploy the application using 10.3.2 weblogic workshop ( i.e inbuilt eclipse )

    i JaySen ,
    thanks for your response. As mentioned we added all the necessary library within the -librarydir but still we see the same error :
    +[JAM] Error: unexpected exception thrown:+
    com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in F:\b2bNew\b2bPortal\src\portlets\typeAhead\TypeAheadController.java at line 70.  Most likely, an annotation is declared whose type has not been imported.
    at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.getAnnotationTypeFor(JavadocTigerDelegateImpl_150.java:410)
    at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.extractAnnotations(JavadocTigerDelegateImpl_150.java:176)
    at com.bea.util.jam.internal.javadoc.JavadocTigerDelegateImpl_150.extractAnnotations(JavadocTigerDelegateImpl_150.java:152)
    at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.addAnnotations(JavadocClassBuilder.java:404)
    at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.populate(JavadocClassBuilder.java:359)
    ===================
    a) this is a upgrade project [ upgrading from wlp 8.1.4 to 10.3.2 ]
    i.e we are using weblogic portal 10.3.2 version.
    b) Searched some sites/forums regarding the above error, and it says something related to "jwsc" ant task [ i.e while compiling a webservice(JWS) ], but we see this error while compiling a normal controller(jpf) class :(
    c) we are using "ant compile" target which internally calls wlcompile task , while executing wlcompile this error is thrown .
    Help Appreciated
    Thx,
    Sarat

  • Error while creating an EAR file in 7.1 version

    Hi All,
    While developing an Adapter module in PI 7.1 version, facing a problem while creating an EAR file.
    Using NWDS 7.1 version
    1) Have developed the code compatible to 7.1 version changes which is not throwing any error while compilation
    2) Have given the jndi info in ejb-j2ee-engine.xml
    3) Also entered info in ejb-jar.xml like
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="ejb-jar_ID"
    version="2.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
    <description>EJB JAR description</description>
    <display-name>EJB JAR</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>EncryptModParam</ejb-name>
    <home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
    <remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
    <local-home> com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
    <local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
    <ejb-class>com.abc.encryption.EncryptModParam</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    Then have clicked on Build project. Its throwing the following error
    Bean Interfaces: Stateless Bean "Encryption" should have atleast one of the following interface pairs: "local" and "localhome", "home" and "remote" or service endpoint interface
    Bean Interfaces: The home interface "com.sap.aii.af.lib.mp.module.ModuleHome" cannot be found in the search path
    Bean Interfaces: The local home interface "com.sap.aii.af.lib.mp.module.ModuleLocalHome" cannot be found in the search path
    Bean Interfaces: The local interface "com.sap.aii.af.lib.mp.module.ModuleLocal" cannot be found in the search path
    Bean Interfaces: The remote interface "com.sap.aii.af.lib.mp.module.ModuleRemote" cannot be found in the search path
    Also I have included the below code in the class file
    @ejbHome <{com.sap.aii.af.lib.mp.module.ModuleHome}>
    @ejbLocal <{com.sap.aii.af.lib.mp.module.ModuleLocal}>
    @ejbLocalHome <{com.sap.aii.af.lib.mp.module.ModuleLocalHome}>
    @ejbRemote <{com.sap.aii.af.lib.mp.module.ModuleRemote}>
    @stateless
    Request to give suggestions to resolve the above problem.
    Thanks in advance.
    Ganesh

    This is what I was looking for: http://maveninjdeveloper.blogspot.com/2012/04/handle-adf-application-maven-ant.html
    It further references:
    - http://docs.oracle.com/cd/E24382_01/user.1112/e17455/deploying_apps.htm#BACIIDEJ
    - http://javaosdev.blogspot.in/2011/12/ojdeploy-documentation-for-tool.html
    The only issue now is that Oracle JDeveloper release 11.1.2.2.0 (version being used) does NOT seem to support Ant while release 11.1.2.1.0 does. This necessitates a further kluge to make things work. The amount of difference between versions of JDeveloper is quite amazing.

  • How to use the build file generated by Jdev to automate bpel deployment

    Hi everyone I am trying to deploy bpel jar files and human task ear files using ant. When i use the ant which is generated by Jdev I am gettinng an error
    C:\Documents and Settings\254876\Desktop\BPEL_ANT>ant
    Buildfile: build.xml
    deployTaskForm:
    BUILD FAILED
    C:\Documents and Settings\254876\Desktop\BPEL_ANT\build.xml:39: Could not create
    task or type of type: deployTaskForm.
    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 'deployTaskForm'.
    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.

    Ensure JDEV and SOA versions are in sync.

  • J2ee tutorial. "ant create-tables" problem

    I am following Java ee 5 tutorial. In one of its sections it asks me to populate the db by following the below instructions:
    1. In a terminal window, go to the books directory or any one of the bookstore1 through
    bookstore6 example directories.
    2. Start the JavaDB database server. For instructions, see ?Starting and Stopping the JavaDB
    Database Server? on page 69. You don?t have to do this if you are usingNetBeans IDE. It
    starts the database server automatically.
    3. Type ant create-tables. This task runs a command to read the file tutorial.sql and
    execute the SQL commands contained in the file.
    4. At the end of the processing, you should see the following output:
    [sql] 181 of 181 SQL statements executed successfully
    when i reach step 3 and type ant create-tables, i get the following error:
    C:\netbeans-javatutorials\JavaEE5Tutorial\J2EEe-tutorial_5\examples\web\books>ant create-tables
    Buildfile:build.xml
    -pre-init:
    check:
    BUILD FAILED
    C:\netbeans-javatutorials\JavaEE5Tutorial\J2EEe-tutorial_5\examples\bp-project\app-server-ant.xml:419: Property javaee.server.passwordfile not specified. Please specify the javaee.server.passwordfile property in 'bp-project/build.properties'. You will also need to ensure that the passwordfile is present and contains AS_ADMIN_PASSWORD.
    Total time :0 seconds
    I have configure the build.properties file as follows:
    # Set the property javaee.home, using the path to your
    # GlassFish installation.
    # C:/Program Files/glassfish-v3 is the GlassFish v3 default installation
    # path on Windows.
    javaee.home=C:/Sun/AppServer
    # Set the property javaee.tutorial.home to the location where you
    # installed the Java EE Tutorial bundle.
    javaee.tutorial.home=C:/netbeans-javatutorials/JavaEE5Tutorial/J2EEe-tutorial_5
    # machine name (or the IP address) where the applications will be deployed.
    javaee.server.name=localhost
    # port number where GlassFish applications are accessed by users
    javaee.server.port=8080
    # port number where the Admin Console of GlassFish is available
    javaee.adminserver.port=4848
    # Uncomment the property javaee.server.username,
    # and replace the administrator username of the app-server
    javaee.server.username=admin
    # Uncomment the property javaee.server.passwordfile,
    # and replace the following line to point to a file that
    # contains the admin password for your app-server.
    # The file should contain the password in the following line:
    # AS_ADMIN_PASSWORD=adminadmin
    # Notice that the password is adminadmin since this is
    # the default password used by GlassFish.
    javaee.server.passwordfile=C:/netbeans-javatutorials/JavaEE5Tutorial/J2EEe-tutorial_5/examples/common/admin-password.txt
    appserver.instance=server
    # Uncomment and set this property to the location of the browser you
    # choose to launch when an application is deployed.
    # On Windows and Mac OS X the OS default browser is used.
    #default.browser=/Applications/Firefox.app/Contents/MacOS/firefox-bin
    # Database vendor property for db tasks
    # JavaDB is the default database vendor. See the settings in javadb.properties
    db.vendor=javadb
    # Digital certificate properties for mutual authentication
    keystore=${javaee.tutorial.home}/examples/jaxws/simpleclient-cert/support/client_keystore.jks
    truststore=${javaee.home}/domains/domain1/config/cacerts.jks
    keystore.password=changeit
    truststore.password=changeit
    and the admin-password.txt
    AS_ADMIN_PASSWORD=adminadmin
    Any suggestions.

    I was stuck with the same problem but finally managed to get it to work.
    The only difference being, I did not change the "javaee.server.passwordfile" field. Like someone else said, I just changed the first two fields. The following are the values I set for the GlassFish 3.1 server with NetBeans 6.7.1,
    javaee.home=C:/Sun/AppServer
    javaee.tutorial.home=C:/JavaWork/javaeesuntutorial/javaeetutorial5
    Hope this helps.

Maybe you are looking for

  • Error 8008 while downloading a TV Show

    Hello, I'm trying to download the HD version of an office episode I purchased, but everytime I try, even from my work computer, error 8008 pops up. It says "Parts of the file seems to be corrupted. To redownload the file choose "Check for available d

  • Itunes content disappeared and can't be downloaded to computer

    Hi everyone ! I'd appreciate your advice if you can help ? I went to sync to i tunes for the first time in several months and found that ALL content was missing from my computer library. My iphone content is ok. When I sync'd my iphone my recent play

  • "Skip when shuffling" behavior on AppleTV

    I've noticed that my Apple TV completely ignores the "Skip when shuffling" tag applied in iTunes (with respect to music at least). Is this consistent with other's experiences?

  • YouTube videos usually don't load unless...

    Hey guys, This is my first time on the forum, so I would appreciate some help as well as some leniency if I sound stupid. So anyways... sometimes, YouTube videos I try to play load and play just fine, but most of the time, the video won't start until

  • Minimize the Mail Application at start up

    Dear Experts I have Mountain Lion 10.8.1; Configured Mail application and it works perfectly good. Notification center is also working fine. I have configured it such that, Mail application starts up automatically once I am logged on. I would like to