Project: mulestudio
Issue STUDIO-3158: Studio throws weird exception when getting metadata
After upgrading to a new connector version, the attached project started to throw the following exception when trying to test connector or to get metadata. Funny thing is that the exact same code, with the exact same connector worked just fine when added to a brand new project. org.mule.common.MuleArtifactFactoryException: Error initializing org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.doGetArtifact(SpringXmlConfigurationMuleArtifactFactory.java:149) org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.getArtifactForMessageProcessor(SpringXmlConfigurationMuleArtifactFactory.java:56) org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.getArtifactForMessageProcessor(SpringXmlConfigurationMuleArtifactFactory.java:39) org.mule.tooling.metadata.api.utils.MetadataRetriever.getExternalMetadata(MetadataRetriever.java:65) org.mule.tooling.ui.modules.core.metadata.MetadataManager.getMetadata(MetadataManager.java:43) org.mule.tooling.ui.modules.core.metadata.GetMetadataAction$1$1.run(GetMetadataAction.java:64) java.lang.Thread.run(Thread.java:722) Caused by: org.mule.api.config.ConfigurationException: Line 3 in XML document from is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 305; cvc-complex-type.2.4.a: Invalid content was found starting with element 'servicesource:create-dynamic'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description, "http://www.mulesoft.org/schema/mule/core":abstract-message-source, "http://www.mulesoft.org/schema/mule/core":abstract-inbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response}' is expected. (org.mule.api.lifecycle.InitialisationException) org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:52) org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78) org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:103) org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:59) org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.doGetArtifact(SpringXmlConfigurationMuleArtifactFactory.java:129)	... 6 more Caused by: org.mule.api.lifecycle.InitialisationException: Line 3 in XML document from is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 305; cvc-complex-type.2.4.a: Invalid content was found starting with element 'servicesource:create-dynamic'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description, "http://www.mulesoft.org/schema/mule/core":abstract-message-source, "http://www.mulesoft.org/schema/mule/core":abstract-inbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response}' is expected. org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:117) org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:119) org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73) org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)	... 10 more Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 3 in XML document from is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 305; cvc-complex-type.2.4.a: Invalid content was found starting with element 'servicesource:create-dynamic'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description, "http://www.mulesoft.org/schema/mule/core":abstract-message-source, "http://www.mulesoft.org/schema/mule/core":abstract-inbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response}' is expected. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) org.mule.config.spring.MuleApplicationContext.loadBeanDefinitions(MuleApplicationContext.java:113) org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451) org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89) org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:109)	... 13 more Caused by: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 305; cvc-complex-type.2.4.a: Invalid content was found starting with element 'servicesource:create-dynamic'. One of '{"http://www.mulesoft.org/schema/mule/core":annotations, "http://www.mulesoft.org/schema/mule/core":description, "http://www.mulesoft.org/schema/mule/core":abstract-message-source, "http://www.mulesoft.org/schema/mule/core":abstract-inbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-message-processor, "http://www.mulesoft.org/schema/mule/core":abstract-outbound-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-message-processor, "http://www.mulesoft.org/schema/mule/core":response}' is expected. org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) org.apache.xerces.parsers.XMLParser.parse(Unknown Source) org.apache.xerces.parsers.DOMParser.parse(Unknown Source) org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75) org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)	... 22 more
Story points: 8