关于weblogic中使用Dom4j、Xerces导致执行线程挂起的问题
2009-09-22 00:00:00 来源:WEB开发网这两天有客户跟我说了个问题,说他们发现weblogic不停的load class,最后线程都挂在了Zip Entry操作上。让他们做了thread dump, 开始以为跟JDK的IO性能有关系,因为我曾经在HP\AIX上都碰到过线程挂起在zip操作上的问题,最终客户通过调整OS参数后,问题得到解决。但在拿到thread dump后, 发现问题不是他们说的那样,thread trace如下:
"ExecuteThread: '6' for queue: 'Out.Thread Pool'" daemon prio=5 tid=0005ff90 nid=54 lwp_id=1885955 waiting for monitor entry [0x239fa000..0x239f94f0]
at java.util.zip.ZipFile.getEntry(ZipFile.java:161)
- waiting to lock <35da8e78> (a sun.net.www.protocol.jar.URLJarFile)
at java.util.jar.JarFile.getEntry(JarFile.java:194)
at sun.net.www.protocol.jar.URLJarFile.getEntry(URLJarFile.java:89)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:95)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:107)
at java.net.URL.openStream(URL.java:913)
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:997)
at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:160)
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:87)
at org.dom4j.io.JAXPHelper.createXMLReader(JAXPHelper.java:46)
at org.dom4j.io.SAXHelper.createXMLReaderViaJAXP(SAXHelper.java:125)
at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:78)
at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)
at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)
at org.dom4j.io.SAXReader.read(SAXReader.java:435)
at org.dom4j.DocumentHelper.parseText(DocumentHelper.java:278)
......
更多精彩
赞助商链接