Skip to content

Validation against Spring XML files make UI hang or block #20

@in-fke

Description

@in-fke

First of all, I hope I am in the right project. Eclipse Source Code Repos are a mess right now.
I spent 30 minutes trying to find the proper source code and/or issue management and may have failed miserably.

Steps to reproduce

Have a Spring XML in the workspace and XML Validation on.

Some file such as

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
	xmlns:beans="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/security
       http://www.springframework.org/schema/security/spring-security.xsd
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/util
       http://www.springframework.org/schema/util/spring-util.xsd">

	
</beans:beans>

Background jobs may hang with the following stack.

"Worker-307: Validation" #3649 [25120] prio=5 os_prio=0 cpu=1265.62ms elapsed=1228.92s tid=0x00000244e7bab000 nid=25120 runnable  [0x000000dcde1fc000]
   java.lang.Thread.State: RUNNABLE
        at sun.nio.ch.SocketDispatcher.read0(java.base@23.0.2/Native Method)
        at sun.nio.ch.SocketDispatcher.read(java.base@23.0.2/SocketDispatcher.java:46)
        at sun.nio.ch.NioSocketImpl.tryRead(java.base@23.0.2/NioSocketImpl.java:256)
        at sun.nio.ch.NioSocketImpl.implRead(java.base@23.0.2/NioSocketImpl.java:307)
        at sun.nio.ch.NioSocketImpl.read(java.base@23.0.2/NioSocketImpl.java:346)
        at sun.nio.ch.NioSocketImpl$1.read(java.base@23.0.2/NioSocketImpl.java:796)
        at java.net.Socket$SocketInputStream.implRead(java.base@23.0.2/Socket.java:1116)
        at java.net.Socket$SocketInputStream.read(java.base@23.0.2/Socket.java:1103)
        at java.io.BufferedInputStream.fill(java.base@23.0.2/BufferedInputStream.java:291)
        at java.io.BufferedInputStream.read1(java.base@23.0.2/BufferedInputStream.java:347)
        at java.io.BufferedInputStream.implRead(java.base@23.0.2/BufferedInputStream.java:420)
        at java.io.BufferedInputStream.read(java.base@23.0.2/BufferedInputStream.java:399)
        at sun.net.www.http.HttpClient.parseHTTPHeader(java.base@23.0.2/HttpClient.java:827)
        at sun.net.www.http.HttpClient.parseHTTP(java.base@23.0.2/HttpClient.java:759)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(java.base@23.0.2/HttpURLConnection.java:1706)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(java.base@23.0.2/HttpURLConnection.java:1615)
        at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(java.base@23.0.2/HttpURLConnection.java:3222)
        at org.eclipse.wst.internet.cache.internal.Cache.cacheResource(Cache.java:209)
        at org.eclipse.wst.internet.cache.internal.Cache.getResource(Cache.java:136)
        at org.eclipse.wst.internet.cache.internal.CacheURIResolverExtension.resolve(CacheURIResolverExtension.java:44)
        at org.eclipse.wst.common.uriresolver.internal.ExtensibleURIResolver.resolvePhysicalLocation(ExtensibleURIResolver.java:113)
        at org.eclipse.wst.xml.core.internal.validation.XMLValidator._internalResolveEntity(XMLValidator.java:652)
        at org.eclipse.wst.xml.core.internal.validation.XMLValidator$MyEntityResolver.resolveEntity(XMLValidator.java:610)
        at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.eclipse.wst.xml.core.internal.validation.XMLValidator.validate(XMLValidator.java:372)
        at org.eclipse.wst.xml.core.internal.validation.eclipse.Validator.validate(Validator.java:97)
        at org.eclipse.wst.xml.core.internal.validation.core.AbstractNestedValidator.validate(AbstractNestedValidator.java:283)
        at org.eclipse.wst.xml.core.internal.validation.core.AbstractNestedValidator.validate(AbstractNestedValidator.java:88)
        at org.eclipse.wst.validation.Validator$V2.validate(Validator.java:1178)
        at org.eclipse.wst.validation.internal.ValManager.validate(ValManager.java:704)
        at org.eclipse.wst.validation.internal.ValManager$1.visit(ValManager.java:665)
        at org.eclipse.wst.validation.internal.ValManager.accept(ValManager.java:783)
        at org.eclipse.wst.validation.internal.ValManager.validate(ValManager.java:669)
        at org.eclipse.wst.validation.internal.ValBuilderJob$Visitor.visit(ValBuilderJob.java:299)
        at org.eclipse.core.internal.resources.Resource.lambda$1(Resource.java:154)
        at org.eclipse.core.internal.resources.Resource$$Lambda/0x00000244a2cb32d0.visit(Unknown Source)
        at org.eclipse.core.internal.resources.Resource.lambda$0(Resource.java:122)
        at org.eclipse.core.internal.resources.Resource$$Lambda/0x00000244a2503a20.visitElement(Unknown Source)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:90)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:90)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:90)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:90)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:90)
        at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:135)
        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:131)
        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:92)
        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:154)
        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:142)
        at org.eclipse.wst.validation.internal.ValBuilderJob.fullBuild(ValBuilderJob.java:219)
        at org.eclipse.wst.validation.internal.ValBuilderJob.run(ValBuilderJob.java:178)
        at org.eclipse.wst.validation.internal.ValBuilderJob.runInWorkspace(ValBuilderJob.java:126)
        at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Tested under this environment:

  • Windows
  • Version: 2025-06 (4.36.0) Build id: 20250605-1316
  • Eclipse Web Tools Platform Common URI Resolver Framework 1.4.0.v202308161955 org.eclipse.wst.common.uriresolver

For the love of god, I was unable to find the source code of
org.eclipse.wst.internet.cache.internal.Cache
I was curious whether this class sets a proper timeout on HttpURLConnection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions