Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.1.RELEASE
    • Fix Version/s: 3.3.0.RC2
    • Component/s: EDITING
    • Labels:
      None

      Description

      I have to wait >10 seconds until sts finished loading a single context-xml. This happens after each java-editor save in the project. It's not usable. I don't know when this problem occured first time ... it older versions of STS I don't have this effect. Can someone please check/explain what happens during this "application-context-xml-loading".

      1. jstack.txt
        63 kB
        Jason Erickson
      2. jstack.txt
        50 kB
        Jason Erickson
      3. jstack2.txt
        63 kB
        Jason Erickson
      4. jstack3.txt
        63 kB
        Jason Erickson
      5. jstack4.txt
        62 kB
        Jason Erickson

        Activity

        Hide
        jhericks Jason Erickson added a comment -

        I will say that the annoying delay comes when I have to do multiple saves. So, I save a file, which kicks of a build, part of which is this "Loading xxxContext.xml" stuff but that's running in the background. In the meantime, I make a couple of other changes and try to save again, but now I get the popup dialog showing me the progress on "Loading xxxContext.xml" that has to complete before it can complete my save operation.

        Show
        jhericks Jason Erickson added a comment - I will say that the annoying delay comes when I have to do multiple saves. So, I save a file, which kicks of a build, part of which is this "Loading xxxContext.xml" stuff but that's running in the background. In the meantime, I make a couple of other changes and try to save again, but now I get the popup dialog showing me the progress on "Loading xxxContext.xml" that has to complete before it can complete my save operation.
        Hide
        ahoehma Andreas Höhmann added a comment -

        I guess the hanging bean-xml validation has nothing to do with multi module projects etc.

        In the stacktrace we can see the situation:

        "Background Thread-36 (Spring IDE/3.0.0)" daemon prio=6 tid=0x504c2400 nid=0x2e4 runnable [0x549ee000]
        java.lang.Thread.State: RUNNABLE
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)

        • locked <0x0e850088> (a java.net.SocksSocketImpl)
          at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
          at java.net.PlainSocketImpl.connect(Unknown Source)
          at java.net.SocksSocketImpl.connect(Unknown Source)
          at java.net.Socket.connect(Unknown Source)
          at java.net.Socket.connect(Unknown Source)
          at sun.net.NetworkClient.doConnect(Unknown Source)
          at sun.net.www.http.HttpClient.openServer(Unknown Source)
          at sun.net.www.http.HttpClient.openServer(Unknown Source)
        • locked <0x0e8501c8> (a sun.net.www.http.HttpClient)
          at sun.net.www.http.HttpClient.<init>(Unknown Source)
          at sun.net.www.http.HttpClient.New(Unknown Source)
          at sun.net.www.http.HttpClient.New(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
          at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
          at org.eclipse.wst.internet.cache.internal.Cache.refreshCacheEntry(Cache.java:286)
          at org.eclipse.wst.internet.cache.internal.Cache.getResource(Cache.java:144)
          at org.eclipse.wst.internet.cache.internal.CacheURIResolverExtension.resolve(CacheURIResolverExtension.java:44)
          at org.eclipse.wst.common.uriresolver.internal.ExtensibleURIResolver.resolvePhysicalLocation(ExtensibleURIResolver.java:112)
          at org.springframework.ide.eclipse.beans.core.internal.model.namespaces.XmlCatalogDelegatingEntityResolver.resolveEntity(XmlCatalogDele
          gatingEntityResolver.java:87)
          at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
          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.startElement(Unknown Source)
          at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
          at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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)

        How can we solve this?

        1. org.eclipse.wst.internet.cache.*** seems to ignore my proxy configuration

        a) General>NetworkConnections>Manual>localhost:3128

        b) eclipse.ini
        -Djava.net.useSystemProxies=false
        -Dhttp.nonProxyHosts="localhost|127.0.0.1"
        -Dhttp.proxyHost=localhost
        -Dhttp.proxyPort=3128
        -Dhttps.proxyHost=localhost
        -Dhttps.proxyPort=3128

        2. maybe I'm using a wrong xsd schema location (I guess not)

        <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.2.xsd">

        3. idea: sts can contain all spring related xsd's or search/find the xsd's in the classpath

        regards
        andreas

        Show
        ahoehma Andreas Höhmann added a comment - I guess the hanging bean-xml validation has nothing to do with multi module projects etc. In the stacktrace we can see the situation: "Background Thread-36 (Spring IDE/3.0.0)" daemon prio=6 tid=0x504c2400 nid=0x2e4 runnable [0x549ee000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) locked <0x0e850088> (a java.net.SocksSocketImpl) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at sun.net.NetworkClient.doConnect(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) at sun.net.www.http.HttpClient.openServer(Unknown Source) locked <0x0e8501c8> (a sun.net.www.http.HttpClient) at sun.net.www.http.HttpClient.<init>(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.http.HttpClient.New(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) at org.eclipse.wst.internet.cache.internal.Cache.refreshCacheEntry(Cache.java:286) at org.eclipse.wst.internet.cache.internal.Cache.getResource(Cache.java:144) at org.eclipse.wst.internet.cache.internal.CacheURIResolverExtension.resolve(CacheURIResolverExtension.java:44) at org.eclipse.wst.common.uriresolver.internal.ExtensibleURIResolver.resolvePhysicalLocation(ExtensibleURIResolver.java:112) at org.springframework.ide.eclipse.beans.core.internal.model.namespaces.XmlCatalogDelegatingEntityResolver.resolveEntity(XmlCatalogDele gatingEntityResolver.java:87) at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source) 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.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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) How can we solve this? 1. org.eclipse.wst.internet.cache.*** seems to ignore my proxy configuration a) General>NetworkConnections>Manual>localhost:3128 b) eclipse.ini -Djava.net.useSystemProxies=false -Dhttp.nonProxyHosts="localhost|127.0.0.1" -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=3128 2. maybe I'm using a wrong xsd schema location (I guess not) <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.2.xsd "> 3. idea: sts can contain all spring related xsd's or search/find the xsd's in the classpath regards andreas
        Hide
        mlippert Martin Lippert added a comment -

        Thanks for the stack trace. The general XSD lookup mechanism is implemented to that is looks at the classpath of your project, but it also consults the XML catalog of WTP.
        Can you post the rest of the stack trace as well, so that I can see where this call is coming from?

        Show
        mlippert Martin Lippert added a comment - Thanks for the stack trace. The general XSD lookup mechanism is implemented to that is looks at the classpath of your project, but it also consults the XML catalog of WTP. Can you post the rest of the stack trace as well, so that I can see where this call is coming from?
        Hide
        mlippert Martin Lippert added a comment -

        I am closing this report now. We worked a lot on performance in this area and improved the overall speed of loading Spring context files significantly. If you observe additional slowdowns or performance issues, please open new issues and attach thread dumps, if possible. We will continue to work on performance and already have a number of additional items open to capture specific areas for further improvements. Please feel free to add additional findings.

        Show
        mlippert Martin Lippert added a comment - I am closing this report now. We worked a lot on performance in this area and improved the overall speed of loading Spring context files significantly. If you observe additional slowdowns or performance issues, please open new issues and attach thread dumps, if possible. We will continue to work on performance and already have a number of additional items open to capture specific areas for further improvements. Please feel free to add additional findings.
        Hide
        mlippert Martin Lippert added a comment -

        We moved issue tracking for this project to https://github.com/spring-projects/spring-ide.
        If you would like to comment on or re-open this issue, please file a new issue at GitHub and refer to this one.

        Show
        mlippert Martin Lippert added a comment - We moved issue tracking for this project to https://github.com/spring-projects/spring-ide . If you would like to comment on or re-open this issue, please file a new issue at GitHub and refer to this one.

          People

          • Assignee:
            mlippert Martin Lippert
            Reporter:
            ahoehma Andreas Höhmann
          • Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: