This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes java.util.zip in Thread Dump ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "java.util.zip in Thread Dump ?" Watch "java.util.zip in Thread Dump ?" New topic
Author

java.util.zip in Thread Dump ?

Ravi Kumar
Greenhorn

Joined: Aug 20, 2003
Posts: 3
When i do a thread dump on my java application i often see the following in the thread dump :
(This came as a surprise to me as to why is java.util.zip being called ?). My application is simply creating some xml documents etc.. and has nothing to do with zip files.

Is this any kind of memory problem ? Would it cause performance issues etc. ?

The Thread Dump copied below :

at java.util.zip.Inflater.inflateBytes(Native Method)

at java.util.zip.Inflater.inflate(Inflater.java:219)

- locked <359967e8> (a java.util.zip.Inflater)

at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:128)

at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)

at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:450)

at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)

- locked <57b70d68> (a java.io.InputStreamReader)

at java.io.InputStreamReader.read(InputStreamReader.java:167)

at java.io.BufferedReader.fill(BufferedReader.java:136)

at java.io.BufferedReader.readLine(BufferedReader.java:299)

- locked <57b70d68> (a java.io.InputStreamReader)

at java.io.BufferedReader.readLine(BufferedReader.java:362)

at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:168)

at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:93)

at com.mypackage.MyDocument.createDocument(MyDocument.java:203)
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24189
    
  34

The XML machinery is reading configuration information out of a text file inside the JAR file it comes packaged in. The ZIP and JAR formats are identical, so java.util.zip is used to read JARs.


[Jess in Action][AskingGoodQuestions]
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: java.util.zip in Thread Dump ?
 
It's not a secret anymore!