It is currently Fri May 18, 2012 3:33 pm


Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Basic question about 'ant' and project build issues
PostPosted: Tue Sep 16, 2008 2:59 pm 

Joined: Thu Sep 11, 2008 3:26 pm
Posts: 11
Location: Bismarck, ND
I have a large project that I'm working on right now written primarily in .jsp. It is used primarily to enter, sort, and process data from several MySQL tables on the back-end. Unfortunately the previous coder has written it almost entirely in JSP; to the point where almost all of the logic, database access, and other functions that should normally go in beans is written in JSP tags. Anyway, I digress...

This project was handed off to me in a NetBeans project bundle. I had a lot of issues with NetBeans, so I switched to Eclipse. The new version of eclipse seemed broken in some areas, too, so I ended up switching to editing my files with 'vim' on my Linux system, rebuilding with 'ant', and then redeploying and troubleshooting under tomcat6+apache on my local webserver.

I recently completed the first round of changes to this project. These consisted of edits only to one .jsp file; not one that is loaded immediately upon entering index.jsp of the project. When I moved on to the next section of edits, it consisted primarily of edits to one of the few JavaScript files that implements AJAX functions for the project. The source file was in <project_home>/web/js/AjaxFunctions.js. The first few times that I implemented changes and rebuilt the project I found (with ant -v) that it was allegedly including the new .js file due to it being outdated; yet when I looked with firebug at the javascript include when I went to that portion of the project, I was still seeing the previous javascript with none of my changes implemented.

I attempted a few things to try to get it to see my changes, and although it stated that it was including it due to it being outdated, I could not see my new javascript code in firebug. So after awhile (this being my first JSP project and first time working with ant), I was running out of ideas for troubleshooting and I ended up doing 'ant clean; ant' to attempt to force a complete rebuild.

This broke the entire project. I don't even see the index.jsp login page, it just takes me immediately to the unexplained server error page; I find this rather odd being as I never made changes to any of the files that are loaded immediately upon entry into the project. I tried replacing the modified AjaxFunctions.js file with the old one and it made no difference. Upgraded ant from 1.7.0 to 1.7.1 and still nothing. Eventually I had to wipe the project directory and reinstall from the backup that I made yesterday before leaving work.

Due to my unfamiliarity with ant I'm really at a loss here. Can anybody give me some tips or ideas on what the issue might be here and where I might look to resolve this? Anything you can offer that would point me in the right direction is very much appreciated.

Thanks in advance.

Oh, also I'm more than willing to post any bits of code and/or the build.xml file that you think may be relevant; I'm not sure what's relevant at this point due to my lack of knowledge of ant at this point.

Damon Getsman
-=-=-=-
ITRx http://www.itrx-nd.com/
Programmer/Systems Administrator
-=-=-=-

_________________
-=-=-=-
ITRx http://www.itrx-nd.com/
Systems Administrator/Programmer
-=-=-=-


Top
 Profile Send private message  
 
 Post subject: JavaScript building issues, too
PostPosted: Tue Sep 16, 2008 8:32 pm 

Joined: Thu Sep 11, 2008 3:26 pm
Posts: 11
Location: Bismarck, ND
Okay, after a little bit more digging it seems to me that there are actually 2 problems. The first of which I described fairly well above; if I do an 'ant clean; ant' it hoses the entire project, even if I do it from the original netbeans environment that the project was created from by the original coder.

The second problem, the one that is more important to me at this point, is that ant and tomcat refuse to see any changes to my <project_home>/web/js/AjaxFunctions.js file. For the longest time rebuilding & redeploying wouldn't even copy the new version of AjaxFunctions.js to the tomcat6 container. I finally got past this by 'touch'ing the <project_home>/web/js directory. However even now that I can verify the new edits to AjaxFunctions.js are present in that directory, FireBug still shows that it is the OLD javascript being executed when I go to the applicable page.

How do I get ant and tomcat to recognize the changes and begin using my new JavaScript code? I can't seem to find any documentation applicable to this by googling; admittedly my google-fu is not the best, but I would think I should've stumbled across something by now.

Any help appreciated, especially on the JavaScript issue.

-Damon Getsman

_________________
-=-=-=-
ITRx http://www.itrx-nd.com/
Systems Administrator/Programmer
-=-=-=-


Top
 Profile Send private message  
 
 Post subject: Re: Basic question about 'ant' and project build issues
PostPosted: Tue Sep 16, 2008 8:52 pm 

Joined: Thu Sep 11, 2008 3:26 pm
Posts: 11
Location: Bismarck, ND
Oh dear god.

Never mind on the JavaScript issue; stupid mistake.

Still curious as to why the whole project is broken when I try to clean & rebuild, though.

_________________
-=-=-=-
ITRx http://www.itrx-nd.com/
Systems Administrator/Programmer
-=-=-=-


Top
 Profile Send private message  
 
 Post subject: Re: Basic question about 'ant' and project build issues
PostPosted: Tue Oct 14, 2008 10:38 am 
Site Admin

Joined: Sat Aug 02, 2008 8:00 am
Posts: 147
Is the ant script configured properly to deploy the war file on tomcat after rebuild ?
maybe the rebuild succeeds but it is not installed on the server
did u try extracting a war file and install it manually on tomcat?
it will be more clear if you post the build.xml for me to investigate

_________________

Muhammad Safwat Fuad
The Java Code Admin
Java Technical Lead.
Mobile: +2010-2942-538
Email:mtv134@yahoo.com


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


Who is online

Registered users: Google [Bot], Immapyevolley, irrallcrigree


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
twilightBB Style by Daniel St. Jules of Gamexe.net

[
SEO MOD © 2007 StarTrekGuide ]