Different runtime behaviour between Eclipse and ANT

I have a class which runs sucessfully in the Eclipse IDE. When I try to execute the same class with ANT, the result is invalid. Why ?
the class is an ANT task subclass, responsible to create the context of a Tomcat application....
I will drop here the two classes code, if you want to help...

ok, thanks by the prompt response...
The scenario is the following:
The aim of my code is to generate a context used in the Tomcat application deployment - i.e., the user fills a set of parameters and then the class generates a XML with the structure expected by the Tomcat definitions...
Running the class in the Eclipse, everithyng is ok. The class ask the user about the parameters and then generates the correct XML.
Running the same class with ANT (encapsulated in a JAR) the XML result is null...

Similar Messages

  • Cannot make .war file using tomcat with eclipse and ant

    i have made all necesary configuration for deploying application using eclipse and ant for the tomcat server.
    when i start the server by clicking the tomcat icon on eclipse toolbar, the message is prompted that "missing application web.xml and using defaults". i have placed the web.xml file in the web/WEB-INF directory of the source project directory.
    also when i use ant by right-clicking on the build.xml file and choose Run as ant.. the process creates a desired .war file in webapps folder of the tomcat server but that war file does not works.
    where is the error i cannot figure out.
    am attaching the code of build.xml for reference.
    please help.
    build.xml:-
    <project name="BecilCTI" default="compile" basedir=".">
    <property file="build.properties"/>
    <property file="${user.home}/build.properties"/>
    <property name="app.name" value="BecilCTI"/>
    <property name="app.path" value="/${app.name}"/>
    <property name="app.version" value="0.1-dev"/>
    <property name="build.home" value="${basedir}/build"/>
    <property name="catalina.home" value="c:/Tomcat_5.5"/> <!-- UPDATE THIS! -->
    <property name="dist.home" value="${basedir}/dist"/>
    <property name="docs.home" value="${basedir}/docs"/>
    <property name="manager.url" value="http://localhost:8080/manager"/>
    <property name="src.home" value="${basedir}/src"/>
    <property name="web.home" value="${basedir}/web"/>
    <property name="compile.debug" value="true"/>
    <property name="compile.deprecation" value="false"/>
    <property name="compile.optimize" value="true"/>
    <!--<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>-->
    <path id="compile.classpath">
    <!-- Include all elements that Tomcat exposes to applications -->
    <pathelement location="${catalina.home}/common/classes"/>
    <fileset dir="${catalina.home}/common/endorsed">
    <include name="*.jar"/>
    </fileset>
    <fileset dir="${catalina.home}/common/lib">
    <include name="*.jar"/>
    </fileset>
    <pathelement location="${catalina.home}/shared/classes"/>
    <fileset dir="${catalina.home}/shared/lib">
    <include name="*.jar"/>
    </fileset>
    </path>
    <target name="all" depends="clean,compile"
    description="Clean build and dist directories, then compile"/>
    <target name="clean"
    description="Delete old build and dist directories">
         <echo message="Cleaning all dirs."/>
    <delete dir="${build.home}"/>
    <delete dir="${dist.home}"/>
    </target>
    <target name="compile" depends="prepare"
    description="Compile Java sources">
    <!-- Compile Java classes as necessary -->
    <mkdir dir="${build.home}/WEB-INF/classes"/>
    <javac srcdir="${src.home}"
    destdir="${build.home}/WEB-INF/classes"
    debug="${compile.debug}"
    deprecation="${compile.deprecation}"
    optimize="${compile.optimize}">
    <classpath refid="compile.classpath"/>
    </javac>
    <!-- Copy application resources -->
    <copy todir="${build.home}/WEB-INF/classes">
    <fileset dir="${src.home}" excludes="**/*.java"/>
    </copy>
    </target>
    <target name="dist" depends="compile"
    description="Create binary distribution">
    <!-- Copy documentation subdirectories
    <mkdir dir="${dist.home}/docs"/>
    <copy todir="${dist.home}/docs">
    <fileset dir="${docs.home}"/>
    </copy> -->
    <!-- Create application JAR file -->
    <jar jarfile="${catalina.home}/webapps/${app.name}.war"
    basedir="${build.home}"/>
    <!-- Copy additional files to ${dist.home} as necessary -->
    </target>
    <target name="install" depends="compile"
    description="Install application to servlet container">
    <deploy url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"
    localWar="file://${build.home}"/>
    </target>
    <target name="list"
    description="List installed applications on servlet container">
    <list url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"/>
    </target>
    <target name="prepare">
    <!-- Create build directories as needed -->
    <mkdir dir="${build.home}"/>
    <mkdir dir="${build.home}/WEB-INF"/>
    <mkdir dir="${build.home}/WEB-INF/classes"/>
    <!-- Copy static content of this web application -->
    <copy todir="${build.home}">
    <fileset dir="${web.home}"/>
    </copy>
    <mkdir dir="${build.home}/WEB-INF/lib"/>
    </target>
    <target name="reload" depends="compile"
    description="Reload application on servlet container">
    <reload url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"/>
    </target>
    <target name="remove"
    description="Remove application on servlet container">
    <undeploy url="${manager.url}"
    username="${manager.username}"
    password="${manager.password}"
    path="${app.path}"/>
    </target>
    </project>

    So is context.xml actually overwriting the settings found in server.xml?I think so. The way I understand it is the the context.xml file saves you from having to edit server.xml. It is preferred for each web app to do its own config, rather than lumping them all together in server.xml.
    And what would be the best way to create the war file? IAt its heart, a WAR is just a zip file with its contents laid out in according to the specification of a web application directory structure.
    So the simplest way to make a war file is to zip up your directory structure with a tool like winzip, and rename it to be myApp.war.
    Regarding ant, I would recommend you take a look through [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
    ]this tutorial. It explains the basics of website layout, configuration and deployment.
    On [url http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/source.html] this page  in particular, it includes a link to a basic ant file that you can use as a starting point.
    Cheers,
    evnafets

  • Differences between Eclipse and Oracle JDeveloper

    Hi,
    Could any one please provide me a list of advantages/dis-advantages and differences between Eclipse 3.1 & Oracle JDeveloper 10g (any version). It's very imp and urgent!!!
    Thanks!

    Hi,
    Could any one please provide me a list of advantages/dis-advantages and differences between Eclipse 3.1 & Oracle JDeveloper 10g (any version). It's very imp and urgent!!!
    Thanks!

  • Difference between Eclipse and Apache Tomcat?

    Can anyone let me know difference between these two? or give me a website link where i can find comparison of the two?I want to work on JAVA+Web services, so what is best bet for me to work with?

    eat your pizza then getinto car.or get into car ,
    reach the moon and then eat your pizza there.you see
    both are usefull somehow.well i asked as i dint know
    much about this stuff, so instead of making fun you
    could have helped me a bit. no?MAybe you could have just taken the sarcasm as what it was and yould have tried to find out what to use Eclipse and what to use Tomcat for... if you can't tell the terms "deleopment environment" and "servlet container" apart, writing servlets might still be too big a task for your present state of knowledge.

  • Different texte layout between firefox and chrome ?!

    Hello,
    i'm just finished my web site and i can't seem to correct the gap layout on my text (example: biography section) between Safari and Firefox and chrome that appears as I have in Muse soft.
    Abakan.fr
    Ps: sometimes, backgrounds image doesn't show too, i don't know why :-/
    thanks a lot
    David

    I checked the site with multiple browsers but was not able to find out any layout difference problem , can you please post some screenshots and add some more details as which page content is not rendering correctly on which browser ?
    Thanks,
    Sanjit

  • Different X behaviour between Solaris 2.6 and 8

    Hi,
    We have recently upgraded a development box to Solaris 8 from 2.6. We have recompiled (same compiler) an application with no changes... and we get different behaviour. There are two problems that we are tracking so far:
    1. Buttons don't seem to be responding to their callbacks so we never leave our modal event loops.
    2. It looks like we're getting truckloads of X expose events causing lost of flicker on every dialog. The CPU is maxing out the whole time, redrawing windows takes forever after hiding it, etc. It seems to be mainly text boxes, but I can't be sure.
    We've copied a binary compiled on 2.6 onto the box and it runs fine so it seems. Is anyone aware of any issues/patches around this area, or any other info we can get to assist tracking down where the exposes are coming from.
    Thanks,
    Rhys

    Progress!
    If I compile with -DMOTIF12_HEADERS and then link with -lMrm12 (which resolves to libMrm.so.3 instead of libMrm.so.4 )and -lXm12 (which resolves to libXm.so.3 instead of libXm.so.4) my application behaves as expected.
    So it would seem that something has changed in Motif that my application does not like, or we were aleays doing something wrong and it just got worse, or... any ideas on where I can start hunting for such a beast?
    Thanks,
    Rhys
    Moazam,
    Just rebuilt using 6U2 both with and without -compat=4
    and it still exhibits the same behaviour... lots of
    expose events, flicker all over the place, high CPU
    usage (its around 60% and Xsun is around 30%).
    Any further ideas?
    Rhys
    To my knowledge, 4.2 is not supported on Solaris 8.
    You should try compiling your code with Forte
    Developer 6.2, and if you need, you can use the
    -compat flags.
    -Moazam

  • Different behaviour between IE6 and IE on opening Office documents via KM

    Hi all,
    we're in the process of rolling out Internet Explorer 7 (IE7) and noticed something unexpected when opening non-html documents from a KM navigation iview. When clicking on the links in the ivew the documents are all opened in a new window because the hyperlink / href contains "target=_blank". When the document itself is for instance an Excel document, the browser will ask wether you want to open the document or not. When you choose to open the document, Excel launches and the blank IE6 window is closed in the background. When the user is done with the document he or she will return to the portal screen.
    This nice behaviour does not occur with IE7. The blank window remains open so when the user closes the Office document they are looking at an empty IE7 screen.
    Is there any way to fix this by customization or even by code change? It seems to me that this is more a SAP issue because for all HTML pages and for all documents that have IE plugins such as PDF'syou want to open a new window but for the others you want only the application to be lauched, not an empty IE.
    Message [3141588|https://www.sdn.sap.com/irj/sdn/thread?threadID=147594&messageID=3141588#3141588] seems to deal with the same problem and got a somewhat disturbing answer.
    The resource rendering parameter rndOpenTargetType does not seem to help see [Help.sap.com|http://help.sap.com/saphelp_nw70/helpdata/EN/87/3d48475ee8bd448c4031aa98d90524/frameset.htm]
    Marcel

    I found the solution on another site, superuser.com, so I can't claim the solution as my own, but it worked for me. Kent Ng says: 
    I face the similar issue with Excel 2003. If you have installed Skype-Click-to-Call, just removed it to resolve this issue.

  • Different Drive Structure Between Principal and Mirror

    We havea 2-node (active/active) cluster with four failover instances installed. We use a dedicated drive for data files, one for log files and one for tempdb per instance .Predicting that we will be adding more instances in the future, we realized that we
    would run out of drive letters to set up. We intend to switch over and use mounted volumes instead that way we only use 1 drive letter per instance and will be able to add many more failover instances in the future. However, seen as we have over 150 databases
    across all current instances, reconfiguring the cluster drive setup will require a lot of time and work and is not in the immediate plans for our team (me :( ). I need to mirror as many databases as possible, based on priority, to a DR server on a geographically
    remote location. Since this server isn't setup with SQLServer yet, I was wondering if it would be a good idea to have the DR server set up with mount volumes now and establish mirroring between our production environment and the DR server that way so that
    at least half the battle is won. I am aware that the best practice for mirroring is to have the same drive structure between the principal and mirror server, however it is not a requirement. The only example issue I have seen with this set up is when you add
    a data file to a database and the DDL statements get sent over to the mirror and will fail since the drive setup will not be the same. This is something I am willing to deal with since adding data files to our databases is not something we do often, or at
    all. As new databases are added and mirrored, the WITH MOVE clause of the RESTORE statement can be used to place the files in their correct location in the mirror server.
    Other than this, are there any other things to consider for this kind of mirroring set up?
    Leroy G. Brown

    Hi Leroy G,
    According to my knowledge, you can deploy database mirroring with different drive structure. And the known issue is that if you add a file to the Principal, the DDL commands get applied across the Mirror, then your database will go into a suspended
    status until you duplicate the path on the mirror.
    However, as your post, you can use WITH MOVE option to create database on Mirror server. For more details, please follow the steps in this
    blog.
    Meanwhile, about setting up database mirroring, I recommend you review this online
    article.
    Thanks,
    Lydia Zhang

  • Different power requirements between 3G and newer iPods?

    Can anyone inform me as to whether there is any input power
    requirement difference between the 3G and newer "dock connector" iPods? I'm wondering why Griffin Tech sells a PowerPod car power cord for the 3G and earlier dock models and a PowerJolt for the 4G and 5G dock models and Shuffle. If there is no power difference, I'd like to buy the PowerJolt, and use it for both my 3G dock model and my Shuffle, without buying 2 different car power adapters. Any light that can be
    shed on this subject would be greatly appreciated.
    iMac   Mac OS X (10.2.x)   iPod 3G and 1G shuffle

    I answered my own question. I found my 3 year old owner's manual and found the page where it noted that the iPod will NOT charge the battery when connected via USB to dock cable. Concluding that I probably would not damage my iPod, I tried connecting the PowerJolt, and, as suspected, the iPod does NOT charge. The Griffin Tech solution for vehicle power for the 3G iPod REQUIRES PowerPod.
    iMac Mac OS X (10.2.x) iPod 3G and 1Gb shuffle

  • Different OPCODE's between tie and stub

    Hello
    I am using wscompile to generate both server and client classes for a web service. Of course I am using the appropriate "-gen:server" and "-gen:client" options for each call.
    The problem is that operations OPCODE's are different between the Tie and Stub classes. When I call operation "A", the outbound request OPCODE is set to 0 (zero), which corresponds to operation "B" when interpreting the inbound message on the server.
    How can I solve this ?

    The error you mentioned literally means "connection lost", which could mean the site is temporarily down, or the server is overloaded. It will usually resolve itself in time. But if the PPC Macs can't open those sites and the Intel Macs can at the exact same time, there must be some other factor involved.
    When you report things to Apple, they do not respond to you, so don't expect that. There are other things you could try to see if they resolve the problem, though I tend to doubt it:
    1. Quit Safari if it's running.
    2. Go to Home/Library/Caches/Safari and delete all the sub-folders within that one.
    3. Go to Home/Library/Safari and delete any of these files that you have there:
    • Downloads.plist
    • Form Values.plist
    • History.plist
    • LastSession.plist
    4. Restart Safari and see if that makes any difference.
    Mulder

  • Different installation guide between client and non-client

    hello,
    i am windows user and still newbie, but i am still confuse. well, make it quick answer for me:
    what is different between Database Installation Guide for Microsoft Windows ( non-client i mean that ) and Database Client Installation Guide for Microsoft Windows?
    It's same or not?

    The former discusses creating the database and the listener, the latter doesn't.
    Likely the latter is a very small subset of the former, ie if you install the database on the server, that server implicitly has a client.
    Sybrand Bakker
    Senior Oracle DBA

  • HT204266 I have two different iTunes balances between Mac and iPhone. How do I combine them?

    I have one balance for the App Store on my iPhone (ios 4), and my mac (Snow Leopard) iTunes and AppStore, and iPhone iTunes all share a different balance. When a purchase is made on one balance, the other balance is unaffected.
    How can I combine the two balances? Any idea what caused it?

    I don't think so. The only other ID I have is a developer id, and I didn't get that until several months after I got the phone. In addition purchases I made from the App Store onthe phone would sync up with It unes on the Mac meaning it would be the same id.
    However I looked at the AppStore on my phone while it was connected to the Mac with iTunes open, and now the balance has changed to the same as the others.

  • Different figure display between Balance and Line items

    How can I find out the difference between line item and Balance in FS10n?
    Actually when I Executing the FS10N the balance of DR. balance is greater then that account Dr. Balance line item.
    Can any one tell me why?
    Thanks & Regards,
    Anandakumar

    Its a sundry debtors gl account. All the line item and open item transaction balance are displaying.
    but the amount is not displaying (difference amount).
    Any one has solution pls tell me.
    Thanks in Advance,
    Anandkumar

  • Different pricing procedure between CRM and ERP

    Hello,
    we`re using a CRM system which is connected to a ERP system. As not all pricing conditions from ERP are needed in CRM (an in addition the ERP pricing procedure is very complex), we would like to use a different (with less conditions) pricing procedure ind CRM.
    But now, when we transfer an order from CRM to ERP, the pricing procedure from ERP gets downloaded into the order in CRM and the prices are lost. Therefore I have 2 questions:
    1. Is it not possible to have a different pricing procedure in CRM than in ERP?
    2. Is it possible to stop transferring the pricing procedure from ERP back to CRM when transferring orders?
    Thank you in acvance for your help
    Jan

    Hi, Jan.
    1. Is it not possible to have a different pricing procedure in CRM than in ERP?
    Yes. You can use different  pricing procedure for you business documents.
    We use this for quotation management with inergation CRM-ERP.
    But, You must use same Condition Types and other objects.
    Denis.

  • Odd behaviour between 7920 and AIR-AP1231G-A-K9

    To start, I'm running an AIR-AP1231G-A-K9 (12.3(4)JA) with two 7920 phones (one at ) configured using LEAP.
    First issue:
    I originally had my ap interface Dot11Radio0 configured with:
    speed basic-1.0 basic-2.0 basic-5.5 basic-6.0 basic-9.0 basic-11.0 basic-12.0 basic-18.0 basic-24.0 basic-36.0 basic-48.0 basic-54.0
    but the phone didn't like this at all, so I changed the config to:
    speed basic-1.0 2.0 5.5 6.0 9.0 11.0 12.0 18.0 24.0 36.0 48.0 54.0
    and everything seems ok with the ap with the speed reconfig.
    Second issue:
    I had to remove broadcast-key vlan 200 change 300 because the phone would lose connection to the ap after 5 minutes and couldn't reconnect. I'm assuming the phone wasn't receiving the new key...
    Third Issue:
    Periodically the phone will drop off the associated ap after sucessful operation and return with Authentication Failed. We receive the message:
    Apr 29 12:45:40.661: Client 0013.1a4c.337b failed: Incorrect BSSID in re-assoc request
    Apr 29 12:45:55.830: Client 0013.1a4c.337b failed: Incorrect BSSID in re-assoc request
    on all the access points within range of the phone as the phone tries to reconnect. Periodically it will reassociate and get a message "Network Busy!!!"
    Any ideas on any of these issues?
    Thanks!
    Stephen

    For #1, 7920 is B only, so if you have G (OFDM) ratest set to mandatory then 7920 will not be able to associate. We recommend the following for a G radio as you want to optimize for 11mbps.
    interface dot11radio 0
    speed basic-11.0 18.0 24.0 36.0 48.0 54.0
    For #2, the 7920 does support broadcast vlan change, but ensure you are using wep ciphers not tkip/ckip.
    For #3, sounds like you are running 1.08 code on the 7920 where there is an issue w/ 12.3(4)JA AP code when trying to roam/reassociate. Look at CSCeg33605 at http://www.cisco.com/univercd/cc/td/doc/product/voice/c_ipphon/english/wip7920/relnotes/rn109.htm#wp112162. Need to upgrade to 1.09 code, which can be downloaded at http://www.cisco.com/cgi-bin/tablebuild.pl/ip-7900ser-crypto.

Maybe you are looking for

  • How to enable a dual monitor mode

    I have a MSI FX52000 VTD-128 board which suppose to support a dual monitor mode. It has D-Sub analog, DVI and VIVO connectors. Would it be possible to connest primary monitor to DVI and secondary to analog output or only Video Out can be used for the

  • Unable to install SCCM client on Windows Server 2008 R2 - certificate permission error?

    I am trying to comply with corporate policy, which is, have an SCCM agent or client on every Windows device. I have successfully used the provided SCCM installer on other Windows 2008 R2 servers. However for one particular server I cannot get the SCC

  • Error in using c:if test="$

    my IDE eclipse is showing me error in this use of EL <c:if test="${param.error=='5'}" >and apache is giving error on running According to TLD or attribute directive in tag file, attribute test does not accept any expressionsI am sending the parameter

  • Will not start - get a white screen and  gray folder with ?

    I tried to erase the drive and reinstall snow leopard - which got interupted.  Now when I try to start - I just get a white screen - sometimes with a folder and question mark in the middle of the screen. I tried rebooting with original OS disc - whil

  • No receiver found in Receiver Determination

    Hello Experts, Sub: Calling integration process (which in software component1) from sender service interface_Out (which is in another software component2) in Receiver Determination Fails.        There are two software components, S/W C1,  S/W C2,