Don't use backwards slashes in Ant strings - a backwards slash is an escape character used in combination with the following character (to see what happens, do an 'echo' of property 'was_home'). Change them all to forward slashes.
I'm not 100% sure where this .bat file is supposed to reside (I can't see it referenced directly in your build script). I assume its hte WAS home that it's not resolving, this _may_ have something to do with the fact that you have a space in your CLASSPATH e.g. "c:/Program Files/..."
I'm quite suspicious of the the whole shortening of paths e.g. "C:\DOCUME~1\132522\LOCALS~1\Temp\wsant45684jacl" and the spaces in directory names, I've had a lot of problems with that in the past (with various app servers). That's about the only advice I can give on this I'm afraid.
Ahaa !! Thanks you did lead me there... application.xml did not match build.xml in the ear names... Build is now successful.
Now all I need to figure out is the right folder to place the ear in
Any idea on where this needs to go. I deployed using RAD and searched for all the locations of the ear and this is what I got. Which one should I place the generated ear in.
1. Forward slashes work for both Windows and the various Unix OS's in Java and you won't get burned by having them misinterpreted as escape characters. Actually, they probably work for ALL OS's supporting hierarchical filesystems, but those are pretty much the only 2 left standaing now that the Mac is basically Unix. Even more - Windows itself will often honor forward slashes in filepaths as though they were backslashes. Obviously that doesn't include cases where the slash might be interpreted as a command-line switch, but in internal app code, you might be surprised. This has been the case since NT 4.0.
2. Pay attention to upper/lower case. While Windows itself is insensitive, Java code almost universally isn't - regardless of OS. And PLEASE, it's
WEB-INF", not "web-inf" or "Web-inf". That kind of sloppiness has caused me more problems, because it works on Windows, but if you deploy to Linux/Solaris, it doesn't. And when an IDE project gets transferred, Unix-style systems may end up with components splattered between 2 (or more!) different directories, depending on who/what put them there and under which OS.
3. Pathnames with embedded spaces in them are major pain, Since the command-line parsers use spaces as token breaks, a command like:
ERASE C:\PROGRAM FILES\MYPROGRAM\FILE.EXE
Actually looks to the erase function as though you'd typed:
Which obviously isn't what you wanted. This problem can be especially bad in scripts where you didn't explicitly type the path, but it was inferred by the script. Use the short filename version, instead. And don't assume that "PROGRAM FILES" will always shorten to "PROGRA~1". The actual algorithm varies between different flavors of Windows, but it's not an absolute conversion, and it's not done dynamically. Instead, an alias shortname entry is created in the directory when the long-named file/directory is created. So if there had already been a C:\PROGRAM DATA directory, PROGRAM FILES might end up as "PROGRA~2", instead. This actually has happened to me, by the way.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
I think I have been able to answer some of my questions
where to place the ear ? Any location. was install picks it up and moves it to the required destination folder
How do we test the ant deployed app? What got me confused is that I assumed that the server view will also be refreshed with the deployed projects but WAS does not do that. Ant tasks will only update the server view to show whether the server is started. In order to see when the application has been deployed and started, the admin console needs to be used.
I still get a 404 error for the application and these are the logs that I get (C:\Program Files\IBM\SDP70\runtimes\base_v61\profiles\AppSrv01\logs\ffdc\server1_4b5c4b5c_09.03.10_13.10.28_2.txt)
Any inputs on how to troubleshoot would be helpful.
How is your EAR file laid out? How is your context root for your web app defined? The error message is telling you it can't find /Main/welcome.action, so you need to check your paths, layout, context root carefully.
The application works fine if I use Ant to install the application using the ear that I generated from RAD.
But I get a 404 for the ear that I have generated from Ant. As you had posted earlier I had gone through the ear's as best as I could but didn't find anything amiss. Any idea what I need to be looking for ? I get the feeling that the error message isn't reflecting what the underlying problem is
OK, well it seems to not be loading the JAR with the UserService class.
1.) Double check that the JAR is in the EAR at hte appropriate location
2.) Generate the EAR from RAD and then from ANT
3.) 'Unzip' the EARs from both builds and use a diff utility to see what the difference between them is
I suspect that the RAD generation of the EAR probably does some extra magic (maybe adds some config) that you need to effectively replicate in the ANT build.
Very very painful but I eventually got the wrong doer. EAR\ProjectWeb\META-INF\MANIFEST.MF had
So updated the code to
Alright, I am all done. I am mighty pleased with myself or should I be since I took some time to get this up and running.
Thanks Martijn, I owe you a beer !!. Also, I wouldn't want all this effort wasted. Do you think this post makes more sense in the Ant forum. Maybe I could post my complete Ant script later on, once I get to clean it up or is there someplace else that I can put up my scripts.