Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Help with war file creation times

Thread view: 
Marcus Leon - 04 Oct 2005 15:12 GMT
We're trying to diagnose why Weblogic is recompiling our already
compiled JSPs.  The Weblogic JSP Precompilation Test Utility (uses
BCEL) says that the compiled JSP modified date is *prior* to the date
of the JSP but when I look at the date of the compiled JSP this doesn't
*appear* to be the case.  Does anyone know why this utility says the
compiled JSP modified date is much earlier that it appears to be?

We are examining the compiled JSP modified date by looking at the date
of the file in Winzip when we open the war file.  This date is the same
as when we extract the files to the filesystem with Winzip.

The dates are way off.  The utility says the date is a couple seconds
prior to the JSP modification time (eg 2003) when in Winzip it
correctly lists that the compiled JSP was just created (eg: Oct 4,
2005).

The war file is created using ant.  We tried using a new version of ant
to see if that made a difference.. it didn't.

Any help would be great!
Roedy Green - 04 Oct 2005 20:01 GMT
>Does anyone know why this utility says the
>compiled JSP modified date is much earlier that it appears to be?

First thing to do is make sure all clocks in your universe are
correct, including the CVS server.

For windows clocks you can sync them with
http://mindprod.com/webstarts/setclock.html

I hypothesise that Javac when it starts up grabs the system time and
uses that for stamping  all classes it creates this session.  With
ant, the effect is magnified since ant starts the compiling classes
only once for the entire ant script.

If that is true, then there are a number of ways you could fix it:

1. don't do any generating of new *.java files after the first compile
in an ant script. Move all the compiles to the end or even a separate
script.

2. write a BCEL or similar utility to look at the file date and insert
it as the class date.

3. explain the problem to BEA and ask them to use the file date
instead.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Marcus Leon - 04 Oct 2005 21:01 GMT
Thanks Roedy..  I *think* this has been resolved.  It was caused due to
a bug in the ant version I was using.  The fix was to use a more recent
version of ant and to set the war roundup prop to false.

That solution is described here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=17934

More good debugging info is here:
http://support.bea.com/application_content/product_portlets/support_patterns/wls
/Debugging_Recompilation_of_Precompiled_JSPs_Pattern.html



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.