You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
support for creating Spring XML config files #1163
Hi @martinlippert , I'm trying to install STS 3.9.14 plugin in Eclipse IDE , then it's giving multiple errors and I have resolved these by installing new STS 4 plugin , but the main purpose of using 3.9.14 version STS plugin is to work with spring based projects with XML configurations , there is need of using spring bean configuration file , namespaces which is not available in STS 4 plugin , so is Spring team planning for the same spring IDE support in STS 4 also , it will be really helpful as many spring based legacy projects are still going in XML and Java based configurations
Thanks
#STS 4 issue #Support for Spring IDE features @martinlippert
Thanks @sanketcs30 for reaching out to us with this request. The STS 3.x plugins for Eclipse are no longer maintained and especially due to the continuous evolution of the underlying Eclipse platform, the old versions of the STS 3.x plugins for Eclipse don't work anymore with the latest Eclipse versions.
We are encouraging the transition to the Spring Tools 4 for Eclipse and VSCode since a number of years now and your projects that use Spring XML configurations should still work fine with using Spring Tools 4. The piece that I would like to understand in more depth here is what exactly are you missing in the Spring Tools 4? Can you describe those features in more detail and maybe provide sample projects to illustrate those?
There is basic support for working with Spring XML configuration files in Spring Tools 4, like content-assist for bean refs, class names, etc. So what exactly is not (yet) working, what features are you missing the most?
Acutally STS 4 is not having options to create spring bean file , adding namespaces for different spring modules like spring core , aop , mvc , transaction which were available in STS 3 plugin
Let me try to summarize: Support for cresting new Spring XML configuration files with an easy way to select the Spring XML namespaces based on the libraries on the classpath of the project.
What about adding additional Spring XML namespaces to existing Spring XML config files? Is this something you would need as well? Or do you mostly select those namespaces when creating Spring XML config files?
Yes @martinlippert Support for cresting new Spring XML configuration files with an easy way to select the Spring XML namespaces based on the libraries on the classpath of the project , it is not available in STS 4 , like in STS 3 plugin when we use following steps File --> new --> other ---> spring ---> spring beans configuration file and after clicking that configuration file option it will create spring bean configuration file , also in that file itself there will be small tabs like namespaces that is not available in sts 4
Like the image showing namespaces tab
How can we get these options in STS 4 , so it will be helpful if these features of STS 3 are added in STS 4 plugin
Thanks @sanketcs30 for reaching out to us with this request. The STS 3.x plugins for Eclipse are no longer maintained and especially due to the continuous evolution of the underlying Eclipse platform, the old versions of the STS 3.x plugins for Eclipse don't work anymore with the latest Eclipse versions.
We are encouraging the transition to the Spring Tools 4 for Eclipse and VSCode since a number of years now and your projects that use Spring XML configurations should still work fine with using Spring Tools 4. The piece that I would like to understand in more depth here is what exactly are you missing in the Spring Tools 4? Can you describe those features in more detail and maybe provide sample projects to illustrate those?
There is basic support for working with Spring XML configuration files in Spring Tools 4, like content-assist for bean refs, class names, etc. So what exactly is not (yet) working, what features are you missing the most?
Hi @martinlippert , may I ask how to work with Spring XML configuration files in Spring Tools 4? I can't find this option from the pure latest version of STS4 (4-4.21.0.RELEASE) with no plugin.
Hi @martinlippert can you please mention steps for how to create that spring-config.xml file , as I'm trying to work with the STS 4.21.0 version , there is no option of creating that xml file like previously we used to create like File -> New -> Other -> Spring configuration file
Can u please mention those steps to create spring config file and also please mention how to add static namespaces as you have mentioned in the previous post , it will be nice if you add any recordings for that
Is support for spring config file will be available from STS 4.21.1 version , which is not available on the official site for the download
Thanks
Hi @martinlippert , as you have mentioned in last post I have installed STS 4.21.1 version and tried to create spring bean configuration file , but I was unable to find the option to add namespaces or spring XML config file skeleton option as you have mentioned in the last post , can u please help me with how to get spring XML config file skeleton option or is there any way to add that option
@batobolg This looks like a different problem (showing an error when content-assist should show up for types), so please open a separate issue for this.
It would also be good if you could open the Error Log view and and paste the details for the error message here, so that we can get a better understanding of that is wrong here.
It might also be useful if you could enable the logging of the language server process (Preferences -> Language Servers -> Spring Language Servers -> Logging to Console). You have to restart the IDE for this change to take effect. Once that is done, the log output from the language server process shows up in the Console view, so the content of that might be useful here as well.
@martinlippert I'm really sorry for writing in closed topic but I can't get classpath XSDs to work.
I was testing STS versions from 4.24.0 up to 4.27.0 with fresh new spring starter webmvc project.
Spring XML Config files support is enabled.
I can generate XML config file, but no Content Assist is available for referenced namespace, spring-context as an example:
If I put something from context namespace I'm getting an error:
If I enable external resources downloading Content Assist works but uses resources from website instead of classpath:
tiles-configurer is a good example of element that doesn't exist in actual schema:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 11 in XML document from class path resource [spring-config.xml] is invalid
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:411) ~[spring-beans-6.2.1.jar:6.2.1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:347) ~[spring-beans-6.2.1.jar:6.2.1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:319) ~[spring-beans-6.2.1.jar:6.2.1]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:184) ~[spring-beans-6.2.1.jar:6.2.1]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:220) ~[spring-beans-6.2.1.jar:6.2.1]
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:191) ~[spring-beans-6.2.1.jar:6.2.1]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromImportedResources$0(ConfigurationClassBeanDefinitionReader.java:391) ~[spring-context-6.2.1.jar:6.2.1]
at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:986) ~[na:na]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromImportedResources(ConfigurationClassBeanDefinitionReader.java:359) ~[spring-context-6.2.1.jar:6.2.1]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148) ~[spring-context-6.2.1.jar:6.2.1]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:121) ~[spring-context-6.2.1.jar:6.2.1]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:430) ~[spring-context-6.2.1.jar:6.2.1]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:290) ~[spring-context-6.2.1.jar:6.2.1]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349) ~[spring-context-6.2.1.jar:6.2.1]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118) ~[spring-context-6.2.1.jar:6.2.1]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:791) ~[spring-context-6.2.1.jar:6.2.1]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:609) ~[spring-context-6.2.1.jar:6.2.1]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.4.1.jar:3.4.1]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.4.1.jar:3.4.1]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.4.1.jar:3.4.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.4.1.jar:3.4.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.4.1.jar:3.4.1]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.4.1.jar:3.4.1]
at com.example.demo.SpringStarterDemoApplication.main(SpringStarterDemoApplication.java:12) ~[main/:na]
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:tiles-configurer'.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:512) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3596) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2144) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:850) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2726) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:114) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:542) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:889) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:247) ~[na:na]
at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:342) ~[na:na]
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77) ~[spring-beans-6.2.1.jar:6.2.1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:441) ~[spring-beans-6.2.1.jar:6.2.1]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399) ~[spring-beans-6.2.1.jar:6.2.1]
... 23 common frames omitted
Hey @boolivar, thanks for reporting. This is most likely related to #581. Let's see if we can find a quick workaround to deal with this until the mentioned issue is resolved.
I tried to find a workaround for this and here is what I found working in my case. Would be awesome if you could give this a try as well to see if that works on your side as well.
I enabled the 'download external resources like referenced xsd' in Preferences -> XML (Wild Web Developer)
I added my own catalog file in Preferences -> XML (Wild Web Developer) -> Catalogs
This catalog file looks like this (as an example):
The exact path for the URI in there, of course, depends on your local machine. And it points to one specific version of the spring-webmvc library and the exact path to the XSD file in that library file. But this should trigger the XML tooling to use this specific XSD to validate the XML files when they refer to this namespace.
It is not y very nice workaround (lots of custom stuff you need to do here), but maybe it helps to work with the XML files as long as the final solution to automatically pick up the right XSD within this new XML editor is released.
At first only Content Assist started working while Validator highlighted some errors.
I'm not sure, but it looks like it was complaining on elements in XSD that was imported from XSD I use, after IDE restart or whatever it started working.
I'll let you know if I encounter issues that matter.
Anyway thank you very much for your response and your time!
Activity
martinlippert commentedon Dec 21, 2023
Thanks @sanketcs30 for reaching out to us with this request. The STS 3.x plugins for Eclipse are no longer maintained and especially due to the continuous evolution of the underlying Eclipse platform, the old versions of the STS 3.x plugins for Eclipse don't work anymore with the latest Eclipse versions.
We are encouraging the transition to the Spring Tools 4 for Eclipse and VSCode since a number of years now and your projects that use Spring XML configurations should still work fine with using Spring Tools 4. The piece that I would like to understand in more depth here is what exactly are you missing in the Spring Tools 4? Can you describe those features in more detail and maybe provide sample projects to illustrate those?
There is basic support for working with Spring XML configuration files in Spring Tools 4, like content-assist for bean refs, class names, etc. So what exactly is not (yet) working, what features are you missing the most?
sanketcs30 commentedon Dec 21, 2023
Acutally STS 4 is not having options to create spring bean file , adding namespaces for different spring modules like spring core , aop , mvc , transaction which were available in STS 3 plugin
martinlippert commentedon Dec 21, 2023
Let me try to summarize: Support for cresting new Spring XML configuration files with an easy way to select the Spring XML namespaces based on the libraries on the classpath of the project.
What about adding additional Spring XML namespaces to existing Spring XML config files? Is this something you would need as well? Or do you mostly select those namespaces when creating Spring XML config files?
[-]Spring IDE support for STS 4 plugin for Eclipse[/-][+]support for creating Spring XML config files[/+]martinlippert commentedon Dec 21, 2023
(I updated the title if this issue accordingly)
sanketcs30 commentedon Dec 21, 2023
Yes @martinlippert Support for cresting new Spring XML configuration files with an easy way to select the Spring XML namespaces based on the libraries on the classpath of the project , it is not available in STS 4 , like in STS 3 plugin when we use following steps
File --> new --> other ---> spring ---> spring beans configuration file and after clicking that configuration file option it will create spring bean configuration file , also in that file itself there will be small tabs like namespaces that is not available in sts 4
Like the image showing namespaces tab

How can we get these options in STS 4 , so it will be helpful if these features of STS 3 are added in STS 4 plugin
nealwei2008 commentedon Dec 22, 2023
Hi @martinlippert , may I ask how to work with Spring XML configuration files in Spring Tools 4? I can't find this option from the pure latest version of STS4 (4-4.21.0.RELEASE) with no plugin.
14 remaining items
GH-1163: small adjustments to proposal label and proposal documentati…
GH-1163: fixed problem with content-assist not showing up for fully q…
sanketcs30 commentedon Feb 4, 2024
Hi @martinlippert can you please mention steps for how to create that spring-config.xml file , as I'm trying to work with the STS 4.21.0 version , there is no option of creating that xml file like previously we used to create like File -> New -> Other -> Spring configuration file
Can u please mention those steps to create spring config file and also please mention how to add static namespaces as you have mentioned in the previous post , it will be nice if you add any recordings for that
Is support for spring config file will be available from STS 4.21.1 version , which is not available on the official site for the download
Thanks
martinlippert commentedon Feb 5, 2024
This will come as part of the
4.21.1release, so stay tuned.sanketcs30 commentedon Feb 15, 2024
Hi @martinlippert , as you have mentioned in last post I have installed STS 4.21.1 version and tried to create spring bean configuration file , but I was unable to find the option to add namespaces or spring XML config file skeleton option as you have mentioned in the last post , can u please help me with how to get spring XML config file skeleton option or is there any way to add that option
Options that are showing in XML file are:-
martinlippert commentedon Feb 15, 2024
Please make sure that you have enabled the Spring XML config file support in the
Settings -> Spring -> XML Config Files.martinlippert commentedon Jul 18, 2024
@batobolg This looks like a different problem (showing an error when content-assist should show up for types), so please open a separate issue for this.
It would also be good if you could open the Error Log view and and paste the details for the error message here, so that we can get a better understanding of that is wrong here.
It might also be useful if you could enable the logging of the language server process (
Preferences -> Language Servers -> Spring Language Servers -> Logging to Console). You have to restart the IDE for this change to take effect. Once that is done, the log output from the language server process shows up in the Console view, so the content of that might be useful here as well.Thanks!
boolivar commentedon Jan 1, 2025
@martinlippert I'm really sorry for writing in closed topic but I can't get classpath XSDs to work.
I was testing STS versions from
4.24.0up to4.27.0with fresh new spring starter webmvc project.Spring XML Config files support is enabled.
I can generate XML config file, but no Content Assist is available for referenced namespace,
spring-contextas an example:If I put something from
contextnamespace I'm getting an error:If I enable external resources downloading Content Assist works but uses resources from website instead of classpath:
tiles-configureris a good example of element that doesn't exist in actual schema:martinlippert commentedon Jan 2, 2025
Hey @boolivar, thanks for reporting. This is most likely related to #581. Let's see if we can find a quick workaround to deal with this until the mentioned issue is resolved.
martinlippert commentedon Jan 8, 2025
I tried to find a workaround for this and here is what I found working in my case. Would be awesome if you could give this a try as well to see if that works on your side as well.
Preferences -> XML (Wild Web Developer)Preferences -> XML (Wild Web Developer) -> CatalogsThis catalog file looks like this (as an example):
The exact path for the URI in there, of course, depends on your local machine. And it points to one specific version of the
spring-webmvclibrary and the exact path to the XSD file in that library file. But this should trigger the XML tooling to use this specific XSD to validate the XML files when they refer to this namespace.It is not y very nice workaround (lots of custom stuff you need to do here), but maybe it helps to work with the XML files as long as the final solution to automatically pick up the right XSD within this new XML editor is released.
boolivar commentedon Jan 10, 2025
@martinlippert I got this configuration working!
At first only Content Assist started working while Validator highlighted some errors.
I'm not sure, but it looks like it was complaining on elements in XSD that was imported from XSD I use, after IDE restart or whatever it started working.
I'll let you know if I encounter issues that matter.
Anyway thank you very much for your response and your time!
martinlippert commentedon Jan 13, 2025
@boolivar Glad to hear you got it working. Did you use the catalog for it, as described above? Or did you figure out another way to make this work?
boolivar commentedon Jan 14, 2025
@martinlippert I created a catalog based on your example