Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-13768

JSF trying to load DTD over the network

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 21.0.0.Beta1, 21.0.0.Final
    • None
    • JSF
    • None

      JSF trying to load DTD over the network

      	- locked <0x00000000e7e3c560> (a sun.net.www.protocol.http.HttpURLConnection)
      	at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:1033)
      	at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:941)
      	at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:908)
      	at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:241)
      	at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1001)
      	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
      	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)
      	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
      	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
      	at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)
      	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:298)
      	at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:474)
      	at org.apache.xpath.jaxp.XPathImpl.evaluate(XPathImpl.java:521)
      	at com.sun.faces.util.Util.getWebXmlVersion(Util.java:1361)
      	at com.sun.faces.el.ELUtils.tryAddCDIELResolver(ELUtils.java:311)
      	at com.sun.faces.el.ELUtils.buildFacesResolver(ELUtils.java:242)
      	at com.sun.faces.application.ApplicationAssociate.initializeELResolverChains(ApplicationAssociate.java:503)
      	at com.sun.faces.application.ApplicationImpl.performOneTimeELInitialization(ApplicationImpl.java:1405)
      	at com.sun.faces.application.ApplicationImpl.getELResolver(ApplicationImpl.java:529)
      	at javax.faces.application.ApplicationWrapper.getELResolver(ApplicationWrapper.java:621)
      	at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:256)
      
          /**
           * Get the web.xml version (if any).
           *
           * @param facesContext the Faces context.
           * @return the version found, or "" if none found.
           */
          public static String getWebXmlVersion(FacesContext facesContext) {
              String result = "";
              InputStream stream = null;
              try {
                  URL url = facesContext.getExternalContext().getResource("/WEB-INF/web.xml");
                  if (url != null) {
                      XPathFactory factory = XPathFactory.newInstance();
                      XPath xpath = factory.newXPath();
                      xpath.setNamespaceContext(new JavaeeNamespaceContext());
                      stream = url.openStream();
                      result = xpath.evaluate("string(/javaee:web-app/@version)", new InputSource(stream));
                  }
              } catch (MalformedURLException mue) {
              } catch (XPathExpressionException | IOException xpee) {
              } finally {
                  if (stream != null) {
                      try {
                          stream.close();
                      } catch (IOException ioe) {
                      }
                  }
              }
              return result;
          }
      

              mshikalw Moulali Shikalwadi
              fjuma1@redhat.com Farah Juma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: