WSAD/Ant/JUNIT problem

Hi,
I'm want to use ant to run some JUNIT tests and generate reports for the tests.
I wrote the following build.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project name="junitTest" default="test">
<target name="init">
<property name="outdir" value="."/>
</target>
<target name="test" depends="init">
<junit printsummary="true" >
<!--<formatter type="plain" usefile="false" />-->
<formatter type="xml" />
<test name="com.aon.frameworktest.ServiceLocatorTest" />
<classpath>
<pathelement location="${outdir}" />
<pathelement path="${java.class.path}"/>
</classpath>
</junit>
<junitreport todir="./reports">
<fileset dir=".">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="./reports/html"/>
</junitreport>
</target>
</project>
It runs, but the tests all throw the same error.
It seems that my tests can't find a properties file I use in my code. I am developing with WSAD 5.
The error is:
.\properties\Framework.properties (The system cannot find the path specified)
java.io.FileNotFoundException: .\properties\Framework.properties (The system cannot find the path specified)
I refrence the properties file in my code based on my working directory, which I set properly in my External Tools configuration.
Is there something I need to pass to the Test class inside of Ant to get it to find the properties file? This runs fine with I don't use Ant and just run JUNIT directly within WSAD.
Anyone have any ideas?
Thanks
Vlenin

1. Try specifying the full path to the properties file.
2. Put the properties file in your classpath and access it viaInputStream is = this.getClass().getResourceAsStream("/Framework.properties");

Similar Messages

  • Installing  Ant/JUnit/Maven on Tiger 10.4.11

    Hi all,
    I am working on installing Java JDK 1.7 on a PPC 7450 chipset running 10.4.11 following the installation instructions for
    OpenJDK <a href="https://wikis.oracle.com/display/OpenJDK/Darwin9Build"> here </a>, appropriately modified for the PPC.
    I am now trying to get a newer version of Ant installed (1.8.4). Ant needs JUnit to install.
    In turn JUnit, from github, needs Maven installated first to work, via the command "mvn".
    And to complete the circle, Maven needs Ant installed first!
    I followed the detailed instuctions <a href="http://wolfpaulus.com/jounal/mac/macmaven/"> here </a> to install Maven on OSX.
    Unfortunately, those instuctions seem to only be for the newer Intel-based machines.
    I have the environment variables JAVA_HOME = /Library/Java/Home set for java.
    java -version yields the expected result :
    <tt>
    java version "1.5.0_19"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-306)
    Java HotSpot(TM) Client VM (build 1.5.0_19-138, mixed mode, sharing)
    </tt>
    which is the last Apple-supplied JDK for tiger.
    The JUnit installation guides I have seen all seem to expect Maven to already be installed since they all seem to end in "mvn install".
    I have not been able to find installation instructions to build JUnit from source code directly even though one can download it. In the file
    BUILDING that is in the JUnit distribution it explicitly states :
          "We do not at this time have an official way to build from the src jar or zip.  If this is an important missing feature, please let us know
            at http://github.com/junit-team/junit/issues"
    Does anyone have instructions on how to build JUnit from source code, or how to build Maven from source code?
    This seemingly circular dependency is very frustrating. I know I am missing something.
    Any tips or links would be greatly appreciated!
    --Ed

    UPDATE:
    I think I got to the bottom of the seemingly circular requirements to Ant / Junit / Maven.
    Since ant 1.7.0 the Ant source distribution has two additional XML files: fetch.xml and get-m2.xml
    The first, fetch.xml is used to go and download optional libraries for ant, one of which is junit.
    The second XML file, get-m2.xml was originally part of fetch.xml and later split off into a separate file.
    This file, get-m2.xml, similarly gets the Maven 2 Ant tasks.
    However, it uses the  XML syntax typefound for the condition property in the Ant task "probe-m2"  which determines if Maven 2 Ant tasks are already installed.
    That is a problem since that particular syntax is new in Ant 1.7 and later. If you are using ant .1.6.5, like I am trying to do, to build ant 1.7 on the way to getting a newer JDK, the build process fails right there since that syntax is not understood yet by the older ant.
    The error I am referring to is:
    get-m2.xml:70: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the nested "typefound" element.
    which I see quite often in searching the web for clues.
    I *think* the assumption was that one would run the fetch.xml XML file after one had built and installed the newer version of ant first. That makes sense if everything in fetch.xml is indeed optional.
    However, they also hard-coded the new dependence on junit into ant 1.7 and later, so it seems to me that one needs an option to run fetch.xml first to grab all required dependencies, install them, and only then run the main build.sh script to build ant.
    I therefore edited the get-m2.xml and fetch.xml to use the older XML syntax only available in ant 1.6.5 and was indeed able to get the scripts to download the rest of the dependencies.
    Interestingly, all the code download was placed in the Maven 2 repository in my $HOME area and not in the ant 1.7.0 source code tree as I expected.
    I do now see in my $HOME/.m2 Maven 2 repo 3 versions of junit: 3.7, 3.81 & 3.8.2
    Now I have to just re-write build.sh and maybe build.xml to point them to the Maven 2 repo to get the required junit code and hopefully the build will then proceed.
    --Ed

  • Ant mappingtool problem

    Greetings
    I have a problem using the mappingtool from ant
    with kodo 3.0.0b1.
    I realize that some ant integration problems are
    being fixed in beta2 but I hadn't seen this
    problem mentioned so I thought I'd let you know...
    Please let me know if I'm doing something wrong.
    Note that it seems to work fine when I use the
    commandline mappingtool utility.
    The ant tasks are set up as follows:
    <taskdef name="mappingtool"
    classname="kodo.jdbc.ant.MappingToolTask"
    classpathref="kodo-tool-classpath" />
    <target name="killdb" depends="deploy-runtime" description="Drop JDO specific tables" >
    <mappingtool action="drop" ignoreErrors="true">
    <fileset refid="all-jdo-files" />
    <classpath refid="runtime-path" />
    </mappingtool>
    </target>
    When I execute this target, I see the following exception:
    killdb:
    [mappingtool] java.lang.IllegalAccessError: tried to access method serp.util.ReferenceMap.removeExpired()V from class com.solarmetric.jdbc.ConnectionPoolImpl
    [mappingtool] at com.solarmetric.jdbc.ConnectionPoolImpl.getConnection(ConnectionPoolImpl.java:120)
    [mappingtool] at com.solarmetric.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:230)
    [mappingtool] at com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:128)
    [mappingtool] at kodo.jdbc.schema.DataSourceFactory$DefaultsDataSource.getConnection(DataSourceFactory.java:235)
    [mappingtool] at kodo.jdbc.sql.DBDictionaryFactory.getDBDictionary(DBDictionaryFactory.java:169)
    [mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getDBDictionary(JDBCConfigurationImpl.java:489)
    [mappingtool] at kodo.jdbc.schema.DataSourceFactory.configureDataSource(DataSourceFactory.java:136)
    [mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:759)
    [mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource(JDBCConfigurationImpl.java:842)
    [mappingtool] at kodo.jdbc.conf.JDBCConfigurationImpl.getDataSource2(JDBCConfigurationImpl.java:851)
    [mappingtool] at kodo.jdbc.schema.SchemaTool.<init>(SchemaTool.java:64)
    [mappingtool] at kodo.jdbc.meta.MappingTool.newSchemaTool(MappingTool.java:186)
    [mappingtool] at kodo.jdbc.meta.MappingTool.getSchemaTool(MappingTool.java:176)
    [mappingtool] at kodo.jdbc.meta.MappingTool.run(MappingTool.java:774)
    [mappingtool] at kodo.jdbc.ant.MappingToolTask.executeOn(MappingToolTask.java:136)
    [mappingtool] at com.solarmetric.ant.TaskBase.execute(TaskBase.java:105)
    [mappingtool] at org.apache.tools.ant.Task.perform(Task.java:319)
    [mappingtool] at org.apache.tools.ant.Target.execute(Target.java:309)
    [mappingtool] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [mappingtool] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    [mappingtool] at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
    [mappingtool] at org.apache.tools.ant.Main.runBuild(Main.java:610)
    [mappingtool] at org.apache.tools.ant.Main.start(Main.java:196)
    [mappingtool] at org.apache.tools.ant.Main.main(Main.java:235)

    Thanks for your response, but this wasn't the problem.
    I don't have (never had) serp.jar lying around.
    serp appears to be in both kodo-jdo.jar and
    kodo-jdo-runtime.jar but no other jar files...
    Before running ant, my CLASSPATH is set to
    "nf.jar:ojdbc14.jar"
    (nf.jar contains the kodo.properties file -
    required here to pick up license key, etc)
    I printed out the CLASSPATH being used inside my
    ant target and it is as follows:
    antExtensions.jar:
    common.jar: (one of mine)
    gnu-getopt.jar:
    j2ee.jar:
    jakarta-commons-collections-2.1.jar:
    jakarta-commons-lang-1.0.1.jar:
    jakarta-commons-logging-1.0.2.jar:
    jakarta-commons-pool-1.0.1.jar:
    jakarta-oro-2.0.7.jar:
    jakarta-regexp-1.1.jar:
    jca1.0.jar:
    jdbc-hsql-1_7_0.jar:
    jdbc2_0-stdext.jar:
    jdo1_0.jar:
    jndi.jar:
    jta-spec1_0_1.jar:
    junit-3.8.1.jar:
    kodo-jdo-runtime.jar:
    kodo-jdo.jar:
    log4j-1.2.8.jar:
    nf.jar: (one of mine)
    ojdbc14.jar:
    sax.jar:
    wl-startup.jar:
    xalan.jar:
    xercesImpl.jar:
    xml-apis.jar
    Abe White wrote:
    If you still have the serp.jar that shipped with previous versions of
    Kodo in your classpath, make sure you remove it. Kodo 3 bundles the
    serp classes within the kodo jar.
    Was that the problem?

  • Ant + Junit + html reports question

    Hi,
    I am successfully creating reports from my test suite,
    however instead of listing all classes in the left frame of the html report of all test classes included in the suite, it shows the suite class name and when I click on it it lists all 250 or so test method results.
    I want to be able to click on each test case results and view its methods.
    I have seen this before but wondering how to achieve it, is it a speacial element you must use or an attribute or something like that.
    here is my code,
    <target name="tests" depends="load.im.test.classpath" description="Run tests ant create report">
                        <property name="testinputs.dir" location="C:\johnTemp\testreports"/>
                        <mkdir dir="${TEST_HTML_OUTPUT}"/>
                        <mkdir dir="C:\johnTemp\testreports"/>
                            <junit printsummary="yes"
                                   fork="yes"
                                   forkmode="perBatch"
                                   haltonfailure="no"
                                   showoutput="yes">
                              <formatter type="xml" />
                              <classpath path="../bin/classes/"/>
                               <classpath path="../../common/bin/classes"/>
                               <classpath refid="im.test.path"/>
                               <batchtest todir="${TEST_HTML_OUTPUT}">
                                            <fileset dir="${TEST_CLASSES}">
                                                <include name="**/**ManagerTest**.class"/>
                                            </fileset>
                         </batchtest>
                            </junit>
                            <junitreport todir="${TEST_HTML_OUTPUT}">
                              <fileset dir="${TEST_HTML_OUTPUT}">
                                <include name="TEST-*.xml"/>
                              </fileset>
                               <report format="frames" todir="${TEST_HTML_OUTPUT}"/>
                              <report todir="${TEST_HTML_OUTPUT}"/>
                            </junitreport>
                             <jar destfile="${TEST_OUTPUT}/junitResults.jar" basedir="${TEST_HTML_OUTPUT}"/>
        </target>Thanks for any advice?

    Hmmm...
    I'm getting the same problem with Ant 1.6 installed in /opt/ant. They've changed things in 1.6, but they claim it should work similar...
    I'll search the docs.
    EDIT: SOLUTION:
    I don't know why this was working for me before and isn't now, but I found the solution. junit.jar must be placed in $ANT_HOME/lib because of strange classloader issues. I guess this must be a recent "bug", as it wasn't happening with earlier versions of ant.
    I'm using my local build of ant because it's more recent, but I think hapy's build would also work with junit if you plared junit.jar in /usr/lib.
    Dusty

  • GWT Testing from Ant Junit task

    Hey, gentlemen,
    I have a target to create junit task to run arbitrary tests for GWT (GWTTestCase subclasses) from different packages. Task should print test cases output in regular junit format and launch tests according to name format, let's say *TestCase.java from anywhere in the project.
    So, the problem is:
    I run it through shell command line
    java -cp 'CLASSPATHHERE' junit.textui.TestRunner my.package.MyTestCase
    successful, as well as from
    <java name="junit" class="junit.textui.TestRunner" ...>
    </java>
    ant target, BUT
    When I try to do it with the <junit> task, I CANNOT specify a tool (junit.textui.TestRunner) I want to run it with (no tag or attribute), so it failed to initialize hosted mode server. Specifying it like a regular test cases cannot run... (maybe something wrong with my eyes)
    Did anybody work with GWT and test cases? Any opinions? Thanks in advance...

    When you say you have the junit.jar on the classpath, where did you configure this? In the 10.1.2 release, it needs to be specified in the "Additional Classpath" field of the Project Properties.
    -Matt Hawkins
    Oracle JDeveloper

  • An Odd Interaction Between Ant, JUnit, and IntelliJ

    I must be losing my mind. Things that I used to know in my sleep are failing me these days.
    I'm running JUnit 3.8.1 and Ant 1.6 in IntelliJ 4.5 on Windoze XP and Sun's JDK 1.4.2. (Enough acronyms?)
    I've got an Ant build.xml that I've flogged on a bunch of projects at my last employer. It's nice and generic and shaken down nicely. It has a compile step that's followed by a dependent <junit> task, which runs all the JUnit TestCases I've accumulated, generates XML reports, deploys the app, and then generates javadocs. I've used it many times on the command line and in Eclipse 3.0.
    My latest employer has sprung for IntelliJ 4.5, which I like VERY much. After learning Eclipse it's been no problem to figure out what IntelliJ is doing for me.
    My problems start when I try to use my lovely build.xml in IntelliJ. It compiles all my code fine, but when it tries to run the JUnit task it always comes back with ClassNotFoundException when it tries to load the TestCase. That means CLASSPATH, right? I'm setting CLASSPATH in the build.xml. I can look at the properties that JUnit says it has when it runs the test, and I can see the full path to the TestCase in the java.class.path property. I've used the <echo> task to print out the converted CLASSPATH before running JUnit, and I can see the TestCase in the CLASSPATH then, too.
    If I open a command shell and run the junit.textui.TestRunner by hand, adding the appropriate JARs using the -classpath option, everything is perfect.
    What the heck am I doing wrong? Anybody else running JUnit in IntelliJ via Ant?
    %

    I must be losing my mind. Things that I used to know
    in my sleep are failing me these days. That's bad duffy. If you lose your mind, who will answer all those questions on JDBC.
    My problems start when I try to use my lovely
    build.xml in IntelliJ. It compiles all my code fine,
    but when it tries to run the JUnit task it always
    comes back with ClassNotFoundException when it tries
    to load the TestCase. That means CLASSPATH, right?
    I'm setting CLASSPATH in the build.xml. I can look
    k at the properties that JUnit says it has when it
    runs the test, and I can see the full path to the
    TestCase in the java.class.path property. I've used
    the <echo> task to print out the converted CLASSPATH
    before running JUnit, and I can see the TestCase in
    the CLASSPATH then, too.
    If I open a command shell and run the
    junit.textui.TestRunner by hand, adding the
    appropriate JARs using the -classpath option,
    everything is perfect.
    What the heck am I doing wrong? Anybody else running
    JUnit in IntelliJ via Ant?There is a possiblilty that it is not finding the JUnit.jar. You might want to experiment with "build.sysclasspath" (I think that's the name, not sure) in your Ant script.
    Regards
    ***Annie***

  • JAVA + ANT = JARs problems

    Hi ppl, I have one problem and hope that someone could help me, let's go...
    I use ant to build a project, I have more than one JAR and they use each other... Well all Jars are in the same directory and I need to change It. I must put one JAR, the main one, on other specific folder. But the others must remain in the same directory. Ex:
    C:\View\View.JAR
    C:\View\Support.JAR
    C:\Main\Main.JAR
    I suppose that my problema is with the classpath, I don't have any environment variable seted on windows, I just use the ones on eclipse. When I build my project I tried to pass the C:\Main\Main.JAR in my Ant's xml, But it doesn't work.
    See the code :
    Nowaday
    <property name="classpathOutros" value="Main.jar"/>
    //I tried:
    <property name="classpathOutros" value="c:\Main\Main.jar"/>The JAR code
       <target name="GIXPDV" depends="COMPILE">
             <jar destfile="${distDir}/VIEW.JAR" basedir="${buildDir}" includes="myPackage/venda/**">
                <manifest>
                   <attribute name="Built-By" value="${user.name}" />
                   <attribute name="Main-Class" value="myPackage.venda.FrmVenda" />
                   <attribute name="Class-Path" value="${classpathOutros}" />
                </manifest>
             </jar>
          </target>myPackage.venda.FrmVenda --- > This one is inside my View.JAR .... but it must access some classes in Main.jar.
    I hope that you understand the problem, sorry for the bad English..... I'm working on it.... lol
    Edited by: Matheus.Omega.Mendes on Apr 25, 2008 7:41 AM

    What do you meaning with "Circular references" ?In this case it would mean that you have the following 4 classes: A, B, C, D.
    In your Main jar it has A and D
    In one of your second jars it has B and C.
    Then B (2nd) relies on A (main)
    Then D (main) relies on C (2nd)
    Other than that, and excluding any eclipse magic, the fact that you are building jars and posting them to certain dirs doesn't need to matter. During the build rather than relying on jars, just rely on a class path with classes not jars.

  • Ant File Problem in Eclipse

    Hey guys,
    I am having alot of trouble getting a simple ant buildfile to work in eclipse.
    I am following the tutorial on here (the part about ant files):
    http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.user/gettingStarted/qs-93_project_builder.htm
    I have created a simple java project called HelloWorld and created a build file below in a package 'org':
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="HelloWorld" default="Hello" basedir=".">
    <property name="HelloText" value="Hello"/>
        <target name="Hello">
            <echo>${HelloText}</echo>
        </target>
    </project>According to the tutorial, I should get an outline in Eclipse (i use 3.2), etc, etc however I only get problems:
    - Whenever I save the file I get "Save Failed: org/apache/tools/ant/launch/AntMain"
    - When I attempt to add the buildfile to the 'Ant' pane on the right, I get error:
    "failed to parse ant build file"
    If anyone has any advice on how to get a simple ant file like the one above working, it would be so much appreciated!
    Thanks
    Gerry
    ant newbie

    doremifasollatido wrote:
    cotton.m wrote:
    Hey dore! What a pleasant surprise seeing you here.Thanks! Yep, I'm here. Not so late as there. :-P
    Just thought I'd see what was going on around here these days (not that I figured much would change,the more things change...
    but always good to log in and answer a few questions at least now and again).Indeed, very much so.
    PS NR sent me an invite to another job networking site I will respond but I don't think I will be of much help, but I do know who NR is because sometimes he seems to think I won't know though I don't know many other NRs so it's hard to not know. You know. ;)

  • HELP!  ANT CLASSPATH Problems!!!!

    Hi All,
    I'm having a problem getting the JDBC driver for MySQL in the CLASSPATH using ANT. I'm getting a java.lang.ClassNotFoundException: com.mysql.jdbc.Driver exception when my code attempts to access the MySQL database. I have the "mysql-connector-java-3.0.11-stable-bin.jar" file in the same directory as my ANT Build.xml file.
    Here's what I have in my ANT Build.xml file:
    <!--
    =====================================================
    = CLASSPATH
    ===================================================== -->
    <path id="compile.classpath">
    <!--
    <pathelement location="${catalina.home}/common/classes"/>
    <fileset dir="${catalina.home}/common/lib">
    <include name="*.jar"/>
    </fileset>
    -->
    </path>
    <path id="run.classpath">
    <pathelement location="${basedir}/mysql-connector-java-3.0.11-stable-bin.jar"/>
    </path>
    Your help is greatly appreciated.
    Also, I cannot find any good documentation on using ANT. I've been to http://ant.apache.org/manual/index.html and find it to be very difficult to get the information I'm looking for. Does anyone know of a link with good documentation on configuring the ANT Build.xml file?
    Thanks

    Sorry, I was in a hurry when I put that post up. I just wanted to save someone the trouble of responding to my question. Below is a copy of my ANT target for executing my server code. Inside the target you will see a classpath tag, inside that tag is the pathelement location for the jar file that I was trying to get in my classpath at runtime.
       <!--
       =====================================================
       =                  TARGET: server
       =
       = Used to execute an instance of the server application.
       ===================================================== -->
       <target name="server" depends="compile"
                          description="Executes a server instance">
          <delete dir="${mysql.books}"/>
           <mkdir dir="${mysql.books}"/>
             <copy todir="${mysql.books}">
              <fileset dir="${basedir}/booksdb"/>
          </copy>
          <java classname="server.Server" fork="true">
             <classpath>
                <pathelement path="${build.home}/classes"/>
                <pathelement location="${basedir}/mysql-connector-java-3.0.11-stable-bin.jar"/>
             </classpath>
          </java>
       </target>

  • Ant compile Problem?

    Can who tell that is what happening for the following problem? Is that any problem of my build.xml?
    Below is the output that come out in the dos environment:-
    C:\jwsdp-1.3\apache-ant\bin>ant
    Buildfile: build.xml
    BUILD FAILED
    The <property> task doesn't support the "files" attribute.
    Total time: 2 seconds
    C:\jwsdp-1.3\apache-ant\bin>
    My build.xml is below:-
    <?xml version="1.0"?>
    <!--
    Copyright (c) 2003 Sun Microsystems, Inc.
    All rights reserved.
    -->
    <project name="acme_dao" default="all" basedir=".">
    <property files="../../../../mydomain.properties"/>
    <property name="build.compiler" value="${JAVAC}"/>     
    <property name="source" value="."/>
    <target name="all" depends="compile"/>
    <target name="compile">
    <javac srcdir="${source}"
    destdir="${SERVER_CLASSES}"
    includes="AcmeDAO.java, AcmeDAOImpl.java"/>
    </target>
    <target name="run">
    <java classname="jws.ch3.db.AcmeDAOImpl"
    fork="yes" failonerror="true">
    <classpath>
    <pathelement path="${CLASSPATH}"/>
    </classpath>
    </java>
    </target>
    </project>

    I already solve that problem but another error. Can anyone please help me to solve that problem. Thanks very much.
    Below is the output of the DOS environment: -
    C:\jwsdp-1.3\apache-ant\bin>ant
    Buildfile: build.xml
    compile:
    BUILD FAILED
    file:C:/jwsdp-1.3/apache-ant/bin/build.xml:21: destination directory "C:\jwsdp-1
    .3\apache-ant\bin\${SERVER_CLASSES}" does not exist or is not a directory
    Total time: 1 second
    C:\jwsdp-1.3\apache-ant\bin>
    Below is the Build.xml: -
    <!--
    Copyright (c) 2003 Sun Microsystems, Inc.
    All rights reserved.
    -->
    <project name="acme_dao" default="all" basedir=".">
         <property file="../../../mydomain.properties"/>
         <property name="build.compiler" value="${JAVAC}"/>
         <property name="source" value="."/>
         <target name="all" depends="compile"/>
         <target name="compile">
         <javac srcdir="${source}"
         destdir="${SERVER_CLASSES}"
         includes="AcmeDAO.java, AcmeDAOImpl.java"
         />
         </target>
         <target name="run">
         <java classname="jws.ch3.dao.AcmeDAOImpl"
         fork="yes" failonerror="true">
         <classpath>
         <pathelement path="${CLASSPATH}"/>
         </classpath>
         </java>
         </target>
         </project>

  • Ant build problems

    I am having problems with the build scripts
    I can compile and when I tried to create a ear file using ant I am getting the following error.
    I can directly create ear file by manually exporting to ear file from the export. I posted this on the newsgroup also
    C:\beabeta\user_projects\w4WP_workspaces\sample\sample>ant stage
    Buildfile: build.xml
    init:
    stage:
    [delete] Deleting directory C:\beabeta\user_projects\w4WP_workspaces\sample\s
    ample\.staging
    [mkdir] Created dir: C:\beabeta\user_projects\w4WP_workspaces\sample\sample\
    .staging
    [copy] Copying 4 files to C:\beabeta\user_projects\w4WP_workspaces\sample\s
    ample\.staging
    BUILD FAILED
    C:\beabeta\user_projects\w4WP_workspaces\sample\sample\build.xml:129: The follow
    ing error occurred while executing this line:
    jar:file:/C:/beabeta/WEBLOG%7e1/workshop/lib/wlw-antlib.jar!/com/bea/wlw/antlib/
    antlib.xml:97: The following error occurred while executing this line:
    C:\beabeta\user_projects\w4WP_workspaces\sample\sample\build.xml:135: The follow
    ing error occurred while executing this line:
    Target `stage.to.ear' does not exist in this project.

    Build is working now
    When we are generating the ant build files for each project we have to choose the Worshop Ant Script instead of ant build files.
    It is not intializing the workspace directory also

  • Ant deploy problem

    Hi, there,
    I'm new to Jave Web Service application developer, I've encounter a problem when I deploy the example "C:\jwstutorial13\examples\gs" , but both "ant build" and "ant package" are successful, when run "ant deploy", I see the following message:
    C:\jwstutorial13\examples\gs>ant deploy
    Buildfile: build.xml
    deploy:
    BUILD FAILED
    file:C:/jwstutorial13/examples/common/targets.xml:41: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/admin/deploy?path=%2Fgs
    pls help me, thanks!!!!

    The problem is that you haven't set the build properties and path variables as described in the tutorial preface:
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/About.html#wp63742
    See the section Building the Examples

  • Wsdlc Ant Task - Problem creating java files in the correct package

    In eclipse, for weblogic 9.2
    Using the wsdlc WebLogic Web Services Ant Task, I am trying to auto-generate the java files for the web service based on the WSDL. I have specified the packageName as one of the parameters. However the java files are being created and packaged based on the TargetNameSpace of the WSDL rather then under the package name specified. Following is part of my build.xml
    autogen.src.dir=../code/java/beaAutoGen
    base.dest=../../../var/build/wsmToPlmWS
    bea.build.dir=beaBuild
         <target name="generate-from-wsdl" depends="prepare">
              <delete dir="${src.dir}" includeemptydirs="true" />
              <delete dir="${autogen.src.dir}" includeemptydirs="true" />
              <wsdlc srcWsdl="../config/sourceWSDL/MRPBindingPort.wsdl"
                   destJwsDir="${base.dest}/${bea.build.dir}/compiledWsdl" destImplDir="${base.dest}/${bea.build.dir}/impl"
                   packageName="com.lmco.iplm.webservices.wsmtoplm" debug="on"
                   srcServiceName="WSPlmMto_Service"
                   debugLevel="DEBUG" autoDetectWrapped="true" jaxRPCWrappedArrayStyle="true"
                   verbose="on" classpathref="bea-classpath" />
    <!-- unjar to get the all the details so we can tokenize -->
              <unjar dest="${autogen.src.dir}"
                   src="${base.dest}/${bea.build.dir}/compiledWsdl/MRPBindingPort_wsdl.jar" />
    <!-- copy over the impl file -->
              <copy todir="../code/java/src">
                   <fileset dir="${base.dest}/${bea.build.dir}/impl" />
              </copy>
         </target>

    In eclipse, for weblogic 9.2
    Using the wsdlc WebLogic Web Services Ant Task, I am trying to auto-generate the java files for the web service based on the WSDL. I have specified the packageName as one of the parameters. However the java files are being created and packaged based on the TargetNameSpace of the WSDL rather then under the package name specified. Following is part of my build.xml
    autogen.src.dir=../code/java/beaAutoGen
    base.dest=../../../var/build/wsmToPlmWS
    bea.build.dir=beaBuild
         <target name="generate-from-wsdl" depends="prepare">
              <delete dir="${src.dir}" includeemptydirs="true" />
              <delete dir="${autogen.src.dir}" includeemptydirs="true" />
              <wsdlc srcWsdl="../config/sourceWSDL/MRPBindingPort.wsdl"
                   destJwsDir="${base.dest}/${bea.build.dir}/compiledWsdl" destImplDir="${base.dest}/${bea.build.dir}/impl"
                   packageName="com.lmco.iplm.webservices.wsmtoplm" debug="on"
                   srcServiceName="WSPlmMto_Service"
                   debugLevel="DEBUG" autoDetectWrapped="true" jaxRPCWrappedArrayStyle="true"
                   verbose="on" classpathref="bea-classpath" />
    <!-- unjar to get the all the details so we can tokenize -->
              <unjar dest="${autogen.src.dir}"
                   src="${base.dest}/${bea.build.dir}/compiledWsdl/MRPBindingPort_wsdl.jar" />
    <!-- copy over the impl file -->
              <copy todir="../code/java/src">
                   <fileset dir="${base.dest}/${bea.build.dir}/impl" />
              </copy>
         </target>

  • Ant mxmlc problem with SharedResources

    Hi
    i am trying to create an application using flexlib and arcgis api for flex. I compile my flex app using ant with this task
    <target name="flex-compile">
            <mxmlc file="${web.visor}/paginas/main.mxml" locale="en_US" keep-generated-actionscript="false" services="${webinf.visor}/flex/services-config.xml">
                <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
                <source-path path-element="${FLEX_HOME}/frameworks" />
                <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                    <include name="libs" />
                    <include name="locale/en_US" />
                </compiler.library-path>
                <compiler.source-path path-element="${src.visor.flex}" />
                <compiler.external-library-path dir="${lib.flex}">
                    <include name="agslib-1.2-2009-05-15.swc" />
                    <include name="flexlib.swc" />
                </compiler.external-library-path>
            </mxmlc>
        </target>
    but when i try to run the swf file i get this error:
    An ActionScript error has occurred:
    Error: Could not find compiled resource bundle 'SharedResources' for locale 'en_US'.
        at mx.resources::ResourceManagerImpl/http://www.adobe.com/2006/flex/mx/internal::installCompiledResourceBundle()
        at mx.resources::ResourceManagerImpl/installCompiledResourceBundles()
        at mx.managers::SystemManager/installCompiledResourceBundles()
        at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()
        at mx.managers::SystemManager/docFrameListener()
    any ideas ?? sorry, but i am really new to flex
    thanks a lot

    Have you tried to use <compiler.include-libraries> tag to include external libraries in the compilation?
                <!-- Include external Flex Libraries -->
                <compiler.include-libraries dir="${PUREMVC_STANDARD}">
                    <include name="PureMVC_Standard.swc" />
                </compiler.include-libraries>
                <compiler.include-libraries dir="${XIFF}">
                    <include name="XIFF.swc" />
                </compiler.include-libraries>
    I never had a need to use <compiler.external-library-path> tag.

  • Flex ant build - problem including custom theme

    Hi,
    I added custom ios theme using the below code in the flex ant build. The custom ios theme does not seem to be included.
    <compiler.theme dir="${FLEX_HOME}/frameworks" append="true"> 
    <include name="themes/Spark/spark.css" /> 
      <include name="themes/Mobile/mobile.swc" />
      </compiler.theme>
    <compiler.theme dir="${deploy.dir}/lib" append="true">   <include  name="mobiletheme_ios.swc" />
    </compiler.theme>
    I also tried using just <theme> tag but it did not help.
    Hoping a solution with the forum's help.
    Thanks in advance
    <include  name="themes/Halo/halo.swc" /> 

    Sorry, I meant to address that. Yes, since we've moved up to the Flex 3 sdk, we are pointing at a new directory. The old directory was flex_sdk and the new directory is flex_sdk_340.
    FLEX_HOME is being set in the build.properties file for local building and then overidden in the build.xml file with this code:
    <target name="build">
         <available property="FLEX_HOME" value="/apps/flex_sdk_340" file="/apps/flex_sdk_340" />
         <echo>FLEX_HOME = ${FLEX_HOME}</echo>
         <antcall target="compile" />
    </target>
    I did notice a warning about not using the available property, so I removed it and just changed what FLEX_HOME was set to in the build.properties file to the server directory. Would mess up local building but regardless it didn't matter because it had no effect on the error being generated. I alos looked a little into the file property of the available tag trying to figure out if that was somehow an issue but I wasn't able to come to any conclusion.
    Before the program errors out, it does displayt he echo statement and the value of FLEX_HOME appears to be correct in that it does show /apps/flex_sdk_340.
    Thank you so much for your continued help. This is truly frustrating because nothing but a directory name has really changed and yet it stopped working. I can't find any information anywhere on what could be wrong and this is really my last resort.

Maybe you are looking for

  • Apps frozen mid-download

    can't delete them, can't use them, can't sync them - what do I do to get rid of them? please. ipod touch 4g

  • Workbook Formatting is Blank

    Hello,   We have two new users that have just been given access to the BW.  When they open a query, they do not get any of the standard colors or formats.  Their Settings are set to " New Workbook on Embed" "Is Empty".  I know how to set up a permane

  • Contacts transfer to pc

    My Lumia 900 has a damaged screen. The screen is totally dead. How can I transfer contacts to my pc without having anything on the phone itself to go by? Solved! Go to Solution.

  • Freeze frame in the middle of a clip?

    For an instructional DVD, I need to be able to freeze a frame in the middle of a clip, without the sound (as I'll put up some text messages). I've ended up making copies of the clip, and using the hold condition, and trying to line them all up by han

  • I have yosemite, do I need virus or malware or spyware protection?

    Are there things I should avoid doing online?