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 / January 2006

Tip: Looking for answers? Try searching our database.

Garbage Statement

Thread view: 
Ravi Shankar Nair - 11 Jan 2006 21:28 GMT
Dear all,

I have a J2EE application called THUB. Other applications will invoke my
THUB using a servlet URL call, writing the parameters in the stream. In
THUB, within the receiving servlet, I get the parameters from stream and
invoke an EJB which does translation of the message from EDI to XML. The
application is working for very high load for about 10 months. The
application is deplyed in BEA Weblogic 8.1.

Today the one, exactly one and the first one in 10 months reported a problem
saying that the traslated output XML contains some characters which are not
part of the message. When I looked, I have seen that, the Garbage
Collector's message is printed as the first line as:-

[GC 240575K->130513K(511232K), 0.1076972 secs] <trade version="1.0"
date="20060111" time="123806"><std_dec
version="1.0"><std_dec_header><int_no>

<!--- valid XML tags here -->

</trade>

There is no clue at all. I am using a FileWriter to write the output. Can
any experts out there kindly help me on how this line crept in ? Please note
that the start up script contains option "verbosegc", which should and must
write to the console output rather than to a file, provided the fact that I
am not at all setting any output stream. After my translation, I just open
the file and write the translated XML output to a file using FileWriter and
I close it after I write. Any clues, thanks

Regards,

Ravi
John C. Bollinger - 12 Jan 2006 02:53 GMT
> Today the one, exactly one and the first one in 10 months reported a problem
> saying that the traslated output XML contains some characters which are not
[quoted text clipped - 16 lines]
> the file and write the translated XML output to a file using FileWriter and
> I close it after I write. Any clues, thanks

Supposing that the problem was not a transient VM blooper, I'd look for
invocations of System.setOut() and System.setErr().  These might cause
the verbose GC output to be directed to some other stream than whichever
of the VM's standard streams it normally goes to.  I speculate that some
code in your application, possibly in a third-party library, is using
one of these to temporarily change the System's output or error stream.
  One might do that, for instance, to glue in code that was originally
(and unwisely) written to use the standard streams explicitly.

Signature

John Bollinger
jobollin@indiana.edu



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.