-1

In MuleSoft.U Development Fundamentals Walkthrough 8-1, step 39, I am trying to deploy the project but it fails. The console shows the following error:

ERROR 2019-04-24 17:02:29,203 [WrapperListener_start_runner] [event: ] org.mule.runtime.module.deployment.impl.internal.application.DefaultMuleApplication: null org.mule.runtime.api.exception.MuleRuntimeException: There was '1' error while parsing the given file 'implementation.xml'. Full list: org.xml.sax.SAXParseException; systemId: http://www.mulesoft.org/schema/mule/american-flights-api/current/mule-american-flights-api.xsd; lineNumber: 186; columnNumber: 50; sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://www.mulesoft.org/schema/mule/american-flights-api,java.lang.StringEnumType'.

As stated in this topic: https://forums.mulesoft.com/questions/105886/mulesoftu-dev-fund-mule-4-wt-81-error-a-schema-can.html?childToView=106391#answer-106391

I have tried to change the enum types in the design center (and then import that to the project), but it continues to fail (same error).

I also checked the schema files in the xml of my implementation, they are the correct number of schemas, and none of them is doubled.

It seems that the problems start when I connect my project to the api in anypoint exchange. However, that api works fine, i've used it before.

1 Answers1

0

It’s not the xml configuration in your project. It’s the xml configuration in the connector to the American flights api.

Once you have changed the RAML to not include enum:

Publish the changed raml to exchange through api designer. Using the publish to exchange button.

This will generate a new REST connector version for your new API version.

In Anypoint Studio, you need to remove the American flights api connector module. In the Mule palette on the right hand side, Select the module, right click and choose 'Remove module'.

Add a new module from exchange and choose the new latest version of your American flights api connector. In the Mule palette on the right hand side, Click 'Search in Exchange' and search for the american connector. Make sure to select the latest version.

Ryan Carter
  • 11,441
  • 2
  • 20
  • 27
  • Thank you!! That solved part of my problem with the enum types. When adding the module though, the dependency in the pom file was not updated (it was still calling the previous version instead of the new one). Once I noticed that and changed it, the project finally deployed – carolivieira Apr 26 '19 at 16:04