How debug with Ant

Hi All,
I am running my application with apache-ant-1.6.5.
Can anybody give suggestion to debug the my application using jdb with ant.
Is there setting in ant so that when i run my program using ant i can debug with jdb.
waiting for reply,
Thanks,
Nitin.

assuming you are running the app through ant using the <java> tag, you should be able to add a
               <jvmarg value="-Xdebug"/>
tag inside the <java> tag, to enable remote debugging with jdb

Similar Messages

  • Debugging question (project with Ant)

    Hi,
    Could anyone tell me how to debug a project with Ant?
    There is no main class to execute.
    Only Ant script runs it as below.
    Thanks in advance,
    <?xml version="1.0" encoding="UTF-8"?>
    <project basedir="." default="all" name="run1">
    <target name="all">
    <java classname="zeus.agents.ANServer" failonerror="true" fork="true">
    <arg line="Nameserver2 -t 0.1 -f dns.db"/>
    </java>
    </target>
    </project>

    how simple was that... Thanks Mark.
    Now I have another problem - how can I specify deployment targets when creating a new dataspace? I'm using a DspCommonCommands.py script, which targets deployments to any server and cluster in the specified domain:
    targets = wlst.get('Targets')
    wlst.invoke('createDataSpace',[dataspaceName,targets],['java.lang.String','java.util.Set'])
    which results in 2 problems:
    1. targeting projects to inappropriate servers (like AdminServer)
    2. targeting project to cluster and all servers belonging to that cluster (which results in errors when trying to start corresponding request_handlers application)
    I thought I can simply list the names of clusters I would like the project to be targeted to, but it results in:
    javax.management.RuntimeOperationsException: RuntimeException occured trying to invoke operation createDataSpace
    Caused by: java.lang.IllegalArgumentException: argument type mismatch
    I can't find the class with createDataSpace() method to check what it's all about and how should I format the target names.
    Regards,
    Tomek

  • How to compile swf with ANT en ASC 2.0?

    He All,
    I used to compile a swf in Flash builder with this antscript below. But mxmlc in not supported anymore. Any idea how to compile the swf with ASC 2.0?
    <target name="compile.apple" depends="clean.apple">
      <echo message="Compiling swf"/>
      <mxmlc file="${app.projectfile}" output="${app.rootfile}" optimize="true" configname="airmobile" debug="false">
      <load-config filename="${app.rootdir}/resources/ant/build.config"/>
      <source-path path-element="${flex.sdkPath}/frameworks"/>
      <source-path path-element="${app.sourcedir}"/>
      <source-path path-element="${app.rootdir}/libs"/>
      <static-link-runtime-shared-libraries/>
      <compiler.library-path dir="${flex.sdkPath}/frameworks" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      <arg line="-swf-version=17" />
      <arg line="-define=CONFIG::debug,false" />
      <arg line="-define=CONFIG::device,true" />
      <arg line="-define=CONFIG::local.false" />
      <compiler.library-path dir="${app.rootdir}" append="true">
      <include name="libs/*" />
      </compiler.library-path>
      </mxmlc>
      </target>

    He Peter,
    Thanks for your reply. I've made some steps, but still no perfect solution. I've managed to compile a swf with ant using only the AIR SDK.
    But, check these results
    - Compiled using Flash Builder release : 455 kb
    - Compiled with ant using mxmlc : 104 kb
    - Compiled with ant using compc : 139 kb
    Can you provide us an example, how to compile a swf using ant. For example, with an AIR mobile project.
    Thanks Peter.
    Tim.

  • How to deploy ADF-BC (SDO) with ANT

    I have an ADF-BC exposed as an webserivce. I can deploy it via JDeveloper, but how do I deploy it with ANT. Does anyone has an ANT script example, based on ADF-BC
    Marc
    http://orasoa.blogspot.com

    I am using JDev 11g (ps1). The link you mentioned, is about deploying artifacts to the MDS. I want to deploy and ADFBC exposed as an webservice , (aka SDO object) to the server via ANT.
    Marc

  • How to define new classpath of libraries while making jar files with ant

    I am useing eclipse and ant and trying to make a jar file. I have used some external jar files. I have managed to add external jar files to my jar. But Still I have a problem. In my project all libraries in lib folder. But when I put them into jar file. They are in the root folder.Classpath has changed and It couldn't find the class path.
    Is there any body knows how to define a new class path for external libraries with ANT. or How can I put my libraries into a lib folder in jar ?? I think both of them would solve my problem.
    thanks in advance.
    My code is like that, I think it requires a little modification
    <target name="jar">
            <mkdir dir="build/jar"/>         
            <jar destfile="build/jar/Deneme.jar" basedir="build/classes" >             
                <manifest>
                    <attribute name="Main-Class" value="${main-class}"/>                    
                </manifest>             
                 <fileset  dir="${lib.dir}" includes="**/*.jar"/>           
            </jar>
        </target>

    I can see why your other "question" was likely deleted. You need to drop the editorial comments and just ask a question. I believe what you want to know is how to configure something using php on your Apache server so that it can be read. If that's your question, here's a couple of places that discuss the topic:
    http://www.webmasterworld.com/linux/3345459.htm
    http://forums.macrumors.com/showthread.php?t=427742
    http://en.allexperts.com/q/PHP5-3508/configuring-installing-permissions.htm
    For a general introduction to 'nix permissions, take a look at this:
    http://www.osxfaq.com/Tutorials/LearningCenter/UnixTutorials/ManagingPermissions /index.ws
    And here's a whole book on the subject of Leopard permissions:
    http://my.safaribooksonline.com/9780321579331
    Try doing a Google search on "leopard permissions php apache" and see if you find what you are looking for.
    Francine
    Francine
    Schwieder

  • How to use Weblogic Server 6.1 build.xml with ant

    Hi Java's
    I have downloaded the latest version of BEA Weblogic server 6.1,they have changed the build.cmd to build.xml for compiling and building the ejb applications.they are telling that we have use $ant to run the build.xml but i couldn't able to do that.i'm getting "command not found error"..i'm using winnt.please help me how to use $ ant.Is it a seperate exe or batch file that i have to download ?if so where to download it.how to use it.please help.
    Regards
    Balaji

    To use it after installation, set your path to your
    <ant_installation_dir>\bin, then navigate to the diectory containing the build.xml. then follow the instructions in the weblogic documentation for running ant.

  • How to start Bea 9 asynchronously with Ant?

    Unfortunately the whole text is condensed because of a forum bug. I hope, you still read it.
    With Bea 8 it was possible to start the Bea application server asynchronously with Ant.
    But I couldn't start <b>Bea 9</b> asynchronously with Ant. I get this error:
    <pre>
    spawn does not allow attributes related to input, output, error, result
    spawn also does not allow timeout
    finally, spawn is not compatible with a nested I/O <redirector>
    </pre>
    This is my Ant target:
    <pre>
    <target name="start_weblogic" description="Start Bea Weblogic asynchronously">
    <exec executable="C:\bea\user_projects\domains\FooBar\bin\startWebLogic.cmd"
    dir="C:\bea\user_projects\domains\FooBar"
    failonerror="true"
    spawn="true" />
    </target>
    </pre>
    Why doesn't it work? What Ant script I need to start Bea 9 application server <b>asynchrously</b>?
    I need this for our Daily Build. In the middle of the automatical building process the application server needs to be started <b>automatically</b>.

    If you close Firefox while in full screen mode then Firefox should reopen in full screen mode the next time.
    That choice is saved in the localstore.rdf file in the profile folder.
    *http://kb.mozillazine.org/localstore.rdf

  • How to debug with newer version of the player

    I want to debug a fla project that runs correctly with the player supplied with flash CS5.5 but it crashes with player version 11.
    I downloaded the debug version of the player 11 and i installed on my pc. Then i even tried to overwrite the flashplayer in /players/debug folder but when i open flash and try to debug my fla, it always start the debug with the player old version.
    What am i doing wrong?

    Hello,
    Here you can download the newer versions of ODBC drivers with or without Oracle Universal Installer:
    http://www.oracle.com/technology/software/products/rdbodbc/index.html
    I wait that this can help you!!
    Best Regards,
    Paola Pullas
    http://www.ecuoug.org

  • Unit tests with ant (FB4 beta)?

    Since flexunit is integrated with FB4, I was wondering how to run unit tests with ant on FB4 (using 3.4 sdk). In my current ant build file, the <mxmlc> and <compc> tags both work but the tag <flexunit> does not seem to work anymore (it worked on FB3 with flexunit download). So is there anyway currently to run unit tests on FB4 using ant?

    Hi,
    Let us take your requirements as separate two requriements.
    1. Using the flexunit ant task - I think for this you needed a separate ant library to support this. So this may be missing in the ant available with FB. May be you can analyse this and add on your own and try out.
    2. Debuggin the results.
    Now FlexBuilder has the feature inbuilt as part of the IDE which provides more featuers like , source naviagation, rerunnig , saving results loading results etc.FlexBuilder uses its own set up to show the results details in IDE.
    Currently other than using the feature in FB, there is no way to debug the results of the tests. However if you would like to get the tests to be run by ant task, and analyse the results, the following can be used.
    Option 1 : Run outside FB, show and analyse results in FB
    a. Use the FB, create some sample testCases in FB.
    b. Use 'Execute FlexUnit tests' from the run,  or debug launcher
    c. Use the option Save configuration. This will get the configuration as xml or mxml file. You can use this file template and generate your test cases (may be you will configure your tests in a testSuite class and always use that as the input to the application, so that application syntax never changes). If you run the mxml created swf  (whch you can do by the simple ant tasks which does not use the flexunit task ) out side FlexBuilder and if the FlexBuilder is open, you can still see the results in the FB and analyse the results. (You need the library which is used by the FB to use the classes. You can get the location of swc file by inspecting the library path of a project in which you have added the testCase or testSuite class using the FB IDE)
    Option2:Run outside FB and  Analyse the results in FB.
    If you have the project for which you have run the tests, and you have the XML results of the run, you can still analyse the results in the FlexBuilder.
    a. Ensure that the report is in the required syntax of FB. (we have tried to use the similar syntax as that of the JUnit resutl report)
    b. Use FB, load your project, open the FlexUnit result view, use the open result option in the FB. This should load the XML in FB (we have only ensured to open the result files which were created using FB ,back in the result view. So if you are facing some issue in opening your XML, you can refer the required syntax by saving a sample run result from FB)
    Option 3: Run and analyse the results in FB.
    a. Have the input setup mentioned to FB. (If you would like to integrate changes, have a suite class which will take care of this and mention in the Execute FlexUnit tests to use this suite class. But there is no way to specify to run the FB commands outside FB.)
    b. So whenever you would like to anlyse the tests, you need to run your test in FB and then analyse the results shown in result view.
    Please let me know whether this is what you are looking for.
    Thanks,
    Rani

  • JSP problem with ANT

    Hello!
    I built up a web site and I want to test them using ANT. It works fine with other web page, however it doesn't work with web pages with "session" statement. For example in login.jsp I have the following statement
    session.setAttribute("user", request.getParameter("userName"));
    And if the user's name and password are correct, the user is directed to home.jsp, where i have the following statement to retrieve the user's name:
    String id=session.getAttribute("user").toString();
    In order to test the above 2 pages with ANT, I have the following code in builder.xml:
    <?xml version='1.0'?>
    <project name="proj" default="test" basedir=".">
    <target name="test">
    <get src="http://path/login.jsp?userName=id&passWord=1111" dest="1.html" />
    </target>
    </project>
    When I run the script, I get the error that the home.jsp cannot be opened (see below)
    [get] Error opening connection java.io.IOException: Server returned HTTP response code: 500 for URL: http://path/home.jsp
    I am pretty sure the above error is caused by the "session" statement, because if I remove the statement in home.jsp, the page can be correctly opened. But I really need the "session" statement, Can someone tell me how to deal with it?
    thanks a million.

    Usually with a 500 error there's more detail in a server log somewhere. Can you find anything in stderr.log or some such?

  • Test jsp pages with ant

    Hello!
    I built up a web site and I want to test them using ANT. It works fine with other web page, however it doesn't work with web pages with "session" statement. For example in login.jsp I have the following statement
    session.setAttribute("user", request.getParameter("userName"));
    And if the user's name and password are correct, the user is directed to home.jsp, where i have the following statement to retrieve the user's name:
    String id=session.getAttribute("user").toString();
    In order to test the above 2 pages with ANT, I have the following code in builder.xml:
    <?xml version='1.0'?>
    <project name="proj" default="test" basedir=".">
    <target name="test">
    <get src="http://path/login.jsp?userName=id&passWord=1111" dest="1.html" />
    </target>
    </project>
    When I run the script, I get the error that the home.jsp cannot be opened (see below)
    [get] Error opening connection java.io.IOException: Server returned HTTP response code: 500 for URL: http://path/home.jsp
    I am pretty sure the above error is caused by the "session" statement, because if I remove the statement in home.jsp, the page can be correctly opened. But I really need the "session" statement, Can someone tell me how to deal with it?
    thanks a million.

    One mistake i find in your code is while retreiving the session value its session.getAttribute("userName"), as you stored the value using the parameter 'userName'. Is it not causing problem. Please check...

  • -deprecation with ant?

    Hello,
    anyone knows how to do javac -deprecation but with ant???

    <javac srcdir="${src}" destdir="${build}" classpath="xyz.jar" deprecation="on" />

  • Wlcompile - nested javac elements not working with ant 1.6.1

    Hi
    I have a problem with Ant 1.6.1 and wlcompile.
    I get the following error: The <wlcompile> type doesn’t support the nested “javac”
    element.
    Heres the error msg I get in debug mode:
    BUILD FAILED
    C:\P2Development\dev\testing\test.xml:3: The <wlcompile> type doesn't support
    the nested "javac" element.
         at org.apache.tools.ant.IntrospectionHelper.throwNotSupported(IntrospectionHelper.java:573)
         at org.apache.tools.ant.IntrospectionHelper.getNestedCreator(IntrospectionHelper.java:624)
         at org.apache.tools.ant.IntrospectionHelper.getElementCreator(IntrospectionHelper.java:691)
         at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:529)
         at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:320)
         at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:176)
         at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:152)
         at org.apache.tools.ant.Task.perform(Task.java:363)
         at org.apache.tools.ant.Target.execute(Target.java:301)
         at org.apache.tools.ant.Target.performTasks(Target.java:328)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
         at org.apache.tools.ant.Main.runBuild(Main.java:632)
         at org.apache.tools.ant.Main.startAnt(Main.java:183)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
    I’m using windows 2000. I’ve tried with weblogic.jar from Weblogic Server 8.1
    SP1 and SP2. I’ve tried with JDK 1.4.1_02 and 1.4.2_04. If I’m using Ant 1.5.3
    then everything works perfectly.
    I’ve tried to remove the WLS included Ant version to avoid conflicts with Ant
    1.6.1 and Ant 1.5.3 (that comes with Weblogic server). I’ve tried to uninstall
    Weblogic Server and just keep weblogic.jar, but I still get the same error. I’ve
    tried to put weblogic.jar on the classpath, still not working. I’ve tried to remove
    all jar files from $ANT_HOME/lib except those jar files needed to run my test
    project - ant.jar and ant-launcher.jar, but still doesn’t work. If I change $ANT_HOME
    to Ant 1.5.3 and run Ant 1.5.3 then everything works. So it seems to have something
    to do with Ant 1.6.1.
    Here’s my example code:
    <project name="wlcompile_test" default="test" basedir=".">
         <target name="test" depends="init">
    <wlcompile srcdir="${src.dir}" destdir="${build.dir}">
    <javac debug="${build.debuginfo}" debuglevel="${build.debuglevel}"
    nowarn="${build.nowarn}" deprecation="${build.deprecated}" source="${build.source.version}"/>
    </wlcompile>
         </target>
    <target name="clean" depends="init">
    <delete dir="${build.dir}"/>
    </target>
    <target name="init">
    <taskdef name="wlcompile" classname="weblogic.ant.taskdefs.build.WLCompileTask"
    classpath="C:\P2Development\weblogic.jar"/>
    <property name="src.dir" value="src"/>
    <property name="build.dir" value="classes"/>
    <property name="build.compiler" value="modern"/>
    <property name="build.compiler.pedantic" value="true"/>
    <property name="build.debuginfo" value="true"/>
    <property name="build.debuglevel" value="lines,vars,source"/>
    <property name="build.deprecated" value="false"/>
    <property name="build.nowarn" value="off"/>
    <property name="build.source.version" value="1.4"/>
    <mkdir dir="${build.dir}"/>
    </target>
    </project>
    And I try to run “ant test”
    It doesn’t work with Ant 1.6.1 and weblogic.jar from WLS 8.1 SP1 and SP2. But
    it works perfectly if I change to Ant 1.5.3.
    Here’s a link to the Ant wlcompile task documentation from BEA:
    http://e-docs.bea.com/wls/docs81/programming/environment.html#1098348
    Regards,
    Tobias Wallter

    Yes, this one is fixed in 8.1 SP3. If you need a patch before then,
    contact [email protected] and reference CR136493.
    -- Rob
    Tobias Wallter wrote:
    Hi
    I have a problem with Ant 1.6.1 and wlcompile.
    I get the following error: The <wlcompile> type doesn?t support the nested ?javac?
    element.
    Heres the error msg I get in debug mode:
    BUILD FAILED
    C:\P2Development\dev\testing\test.xml:3: The <wlcompile> type doesn't support
    the nested "javac" element.
         at org.apache.tools.ant.IntrospectionHelper.throwNotSupported(IntrospectionHelper.java:573)
         at org.apache.tools.ant.IntrospectionHelper.getNestedCreator(IntrospectionHelper.java:624)
         at org.apache.tools.ant.IntrospectionHelper.getElementCreator(IntrospectionHelper.java:691)
         at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:529)
         at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:320)
         at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:176)
         at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:152)
         at org.apache.tools.ant.Task.perform(Task.java:363)
         at org.apache.tools.ant.Target.execute(Target.java:301)
         at org.apache.tools.ant.Target.performTasks(Target.java:328)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
         at org.apache.tools.ant.Main.runBuild(Main.java:632)
         at org.apache.tools.ant.Main.startAnt(Main.java:183)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
    I?m using windows 2000. I?ve tried with weblogic.jar from Weblogic Server 8.1
    SP1 and SP2. I?ve tried with JDK 1.4.1_02 and 1.4.2_04. If I?m using Ant 1.5.3
    then everything works perfectly.
    I?ve tried to remove the WLS included Ant version to avoid conflicts with Ant
    1.6.1 and Ant 1.5.3 (that comes with Weblogic server). I?ve tried to uninstall
    Weblogic Server and just keep weblogic.jar, but I still get the same error. I?ve
    tried to put weblogic.jar on the classpath, still not working. I?ve tried to remove
    all jar files from $ANT_HOME/lib except those jar files needed to run my test
    project - ant.jar and ant-launcher.jar, but still doesn?t work. If I change $ANT_HOME
    to Ant 1.5.3 and run Ant 1.5.3 then everything works. So it seems to have something
    to do with Ant 1.6.1.
    Here?s my example code:
    <project name="wlcompile_test" default="test" basedir=".">
         <target name="test" depends="init">
    <wlcompile srcdir="${src.dir}" destdir="${build.dir}">
    <javac debug="${build.debuginfo}" debuglevel="${build.debuglevel}"
    nowarn="${build.nowarn}" deprecation="${build.deprecated}" source="${build.source.version}"/>
    </wlcompile>
         </target>
    <target name="clean" depends="init">
    <delete dir="${build.dir}"/>
    </target>
    <target name="init">
    <taskdef name="wlcompile" classname="weblogic.ant.taskdefs.build.WLCompileTask"
    classpath="C:\P2Development\weblogic.jar"/>
    <property name="src.dir" value="src"/>
    <property name="build.dir" value="classes"/>
    <property name="build.compiler" value="modern"/>
    <property name="build.compiler.pedantic" value="true"/>
    <property name="build.debuginfo" value="true"/>
    <property name="build.debuglevel" value="lines,vars,source"/>
    <property name="build.deprecated" value="false"/>
    <property name="build.nowarn" value="off"/>
    <property name="build.source.version" value="1.4"/>
    <mkdir dir="${build.dir}"/>
    </target>
    </project>
    And I try to run ?ant test?
    It doesn?t work with Ant 1.6.1 and weblogic.jar from WLS 8.1 SP1 and SP2. But
    it works perfectly if I change to Ant 1.5.3.
    Here?s a link to the Ant wlcompile task documentation from BEA:
    http://e-docs.bea.com/wls/docs81/programming/environment.html#1098348
    Regards,
    Tobias Wallter

  • Error opening test scripts in Build and Debug with Screens

    Hello,
    I am testing scenarios in the Build and Debug with screens mode in OPM. I save each scenario as a test script by clicking the Export button and saving. Some test scripts are able to be opened again, yet when I try to open others, I get the error message shown at the link below and am unable to load the test script.
    http://imgur.com/uqh80
    This did not happen previously, it just started today. All of these test scripts were created today, and the attributes have not been changes since the test scripts were created. This is seriously hindering my scenario testing ability.
    Does anyone know how to rectify this problem?
    Thanks,
    Christine

    Hi Kristy,
    I am in OPM 10.2.
    To troubleshoot, I tried redoing the test scenarios that werent working from scratch (rather than building off a previous scenario), and this time it worked. I am not sure why it works now and didnt before, and I am also not sure if they will continue working.
    I will continue creating the scenarios and will be sure to update if it fails again. In the case it does fail, I will try your export recommendation.
    Christine

  • Debug and ANT

    I just discovered the power of ANT and i'm quite enthusiast about it. I found a bit obscure a thing, though..
    I managed to receive traces in the ANT output but i need a deeper debug environment, of course.
    Is there a way to use the breakpoints and the profiler compiling with ANT?
    ..or is ANT something to use just to automate tasks and compiling release versions?
    TIA

    This turns out to be a non-issue. I re-installed JDK 1.6,
    thinking this might have been the problem, but as it turns out,
    this Windows machine was a VM, and there haven't been any issues
    with other VM's, only this one, leading me to conclude the problem
    was the VM. We've since migrated off this machine and recycled
    it.

Maybe you are looking for