我在google上搜到一个页面,看了半天,不知道啥东东,我用JBuilder编译,tomcat用自带的:
A. Common QuestionsIf running an installation script produces the following error message: java.net.ConnectException: Connection timed outat org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2870)at ... That probably means all outgoing HTTP traffic from machineA is blocked unless it goes through a specific proxy. You need to update the file data/runtime/runtime.local.properties in the module iceni-bootstrap to define the following properties: http.proxyHost=<name of the cache>
http.proxyPort=<port of the cache>
You might also need to define the property http.nonProxyHost . The properties http.proxyHost and http.proxyPort indicate the proxy server and port that the http protocol handler will use. http.nonProxyHosts indicates the hosts which should be connected too directly and not through the proxy server. More informations on how to set these properties can be found at http://java.sun.com/j2se/1.4.1/docs/guide/net/properties.html . The properties defined in that file will be set both by the bootstrap mechanism and the application started through the bootstrap

解决方案 »

  1.   


    为什么不用jdom呢,操作起来很方便。  public static Document Readfromfile(String filePath) {
        try {
          java.io.File XmlFile;
          String XmlFileName;
          XmlFile = new java.io.File(filePath);
          SAXBuilder builder = new SAXBuilder();
          Document anotherDocument = builder.build(new File(filePath));
          return anotherDocument;
        }
        catch (Exception e) {
          e.printStackTrace();
          return null;
        }
      }
      

  2.   

    你还做了其他事吗
    java.net.ConnectException: Connection timed out: connect
      

  3.   

    楼上兄弟,"其他事情"?,没有啊,就是想从“D:\\temp11.xml”中解析出根节点,用来画svg图的
      

  4.   

    这应该是DTD 的问题, 如果xml 开头有doctype 申明, 一般里面会是个DTD的url
    所以你一解析就会先连这个url导致
    java.net.ConnectException: Connection timed out: connect
      

  5.   

    不一定要用DTD的话,就去掉他,应该就好了。
      

  6.   

    首先感谢rex0y(没学好九阳神功就妄想几小时练成乾坤大挪) 同志,受到rex0y的启发,因为我刚开始以为是程序问题,因为我以前也做过类似的东西,后来我才觉得应该是XML文件的问题,当然<!DOCTYPE ……> 先去掉,因为DTD有可能找不到,现在再试试!