关于weblogic中操纵Dom4j、Xerces招致实施线程挂起的问题[Java编程]
本文“关于weblogic中操纵Dom4j、Xerces招致实施线程挂起的问题[Java编程]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
这两天有客户跟我说了个问题,说他们发现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)
......
我们可以看看SAXParserFactory.newInstance()的实现,
1 public static SAXParserFactory newInstance()
2 throws FactoryConfigurationError
3 {
4 try
5 {
6 return (SAXParserFactory)FactoryFinder.find("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
7 }
8 catch(FactoryFinder.ConfigurationError configurationerror)
9 {
10 throw new FactoryConfigurationError(configurationerror.getException(), configurationerror.getMessage());
11 }
12 }
以上是“关于weblogic中操纵Dom4j、Xerces招致实施线程挂起的问题[Java编程]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |