com.fasterxml.jackson.core.JsonParseException

Unrecognized token 'swagger': was expecting ('true', 'false' or 'null') at [Source: src\main\resources\yaml\nscl_test.yaml; line: 1, column: 9]

Samebug tips4

If you're using Java Chronicle it might be a Cleanup problem. Either add @ignore to the test or delete the memory map file and do it again.

If you're using Facebook API, they now use OAuth2, so your URL should contain version number, like this:
facebook.authorizationURL="https://graph.facebook.com/v2.3/oauth/authorize"

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web660

  • via GitHub by zcb22000
    , 6 months ago
    Unrecognized token 'swagger': was expecting ('true', 'false' or 'null') at [Source: src\main\resources\yaml\nscl_test.yaml; line: 1, column: 9]
  • via GitHub by yucer
    , 6 months ago
    Unrecognized token 'swagger': was expecting ('true', 'false' or 'null') at [Source: src\main\resources\petstore.yaml; line: 1, column: 9]
  • Unrecognized token 'swagger': was expecting ('true', 'false' or 'null') at [Source: src\main\resources\petstore.yaml; line: 1, column: 9]
  • Stack trace

    • com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'swagger': was expecting ('true', 'false' or 'null') at [Source: src\main\resources\yaml\nscl_test.yaml; line: 1, column: 9] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1419) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:508) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3201) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2360) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:794) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:690) at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3105) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3051) at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:1861) at io.swagger.parser.SwaggerCompatConverter.readResourceListing(SwaggerCompatConverter.java:147) at io.swagger.parser.SwaggerCompatConverter.read(SwaggerCompatConverter.java:74) at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:72) at io.swagger.parser.SwaggerParser.read(SwaggerParser.java:52) at io.github.swagger2markup.Swagger2MarkupConverter$Builder.readSwagger(Swagger2MarkupConverter.java:321) at io.github.swagger2markup.Swagger2MarkupConverter$Builder.<init>(Swagger2MarkupConverter.java:301) at io.github.swagger2markup.Swagger2MarkupConverter.from(Swagger2MarkupConverter.java:116) at com.huawei.m2m.ecosystem.codegen.SpringServerGenerator.generateFiles(SpringServerGenerator.java:74) at com.huawei.m2m.ecosystem.codegen.SpringServerGenerator.main(SpringServerGenerator.java:51)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Once, 3 weeks ago
    Unknown user
    Once, 11 months ago
    109 more bugmates