Skip to content

The CLI Client is throwing an exception when getting a response from the On-Prem server #375

@ba-kr

Description

@ba-kr

Expected

Expected the CLI to get a successful push command to the server

Actual

JsonParseException on the response from the server after the push

 - merge layout from remote: true
 - storing previous version of workspace in null
 - pushing workspace
Getting workspace with ID 4
Putting workspace with ID 4
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]
com.structurizr.api.StructurizrClientException: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]
        at com.structurizr.api.WorkspaceApiClient.putWorkspace(WorkspaceApiClient.java:352)
        at com.structurizr.cli.PushCommand.run(PushCommand.java:137)
        at com.structurizr.cli.StructurizrCliApplication.run(StructurizrCliApplication.java:83)
        at com.structurizr.cli.StructurizrCliApplication.main(StructurizrCliApplication.java:104)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]
        at com.fasterxml.jackson.core.JsonParser._constructReadException(JsonParser.java:2660)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:741)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:2054)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:780)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:5004)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4910)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3860)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3828)
        at com.structurizr.api.ApiResponse.parse(ApiResponse.java:46)
        at com.structurizr.api.WorkspaceApiClient.putWorkspace(WorkspaceApiClient.java:346)
        ... 3 more

Steps to reproduce

structurizr.sh push -url $STRUCTURIZR_URL -id $WS_ID -key $WS_KEY -secret $WS_SECRET -workspace workspace.dsl debug

Version/build information

STRUCTURIZR_CLI_VERSION = 2024.12.07
STRUCTURIZR_ONPREM_VERSION = 2024.12.07

Severity

Major

Priority

Low (I have no budget and there's no rush, please fix this for free)

More information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions