structurizr / onpremises

Structurizr on-premises installation
https://docs.structurizr.com/onpremises
MIT License
140 stars 54 forks source link

Error using cli to push to onpremise instullation #9

Closed brown99 closed 1 year ago

brown99 commented 1 year ago

On-Premise Environment

cli:

Command

structurizr push 

Output

Pushing workspace 2 to REDACTED
 - creating new workspace
 - parsing model and views from REDACTED
 - merge layout from remote: true
 - storing previous version of workspace in null
 - pushing workspace
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Nov 22, 2022 2:32:16 PM com.structurizr.api.StructurizrClient getWorkspace
INFO: Getting workspace with ID 2
Nov 22, 2022 2:32:16 PM com.structurizr.api.StructurizrClient getWorkspace
SEVERE: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (String)""; line: 1, column: 0]
Nov 22, 2022 2:32:16 PM com.structurizr.api.StructurizrClient putWorkspace
SEVERE: com.structurizr.api.StructurizrClientException: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (String)""; line: 1, column: 0]
com.structurizr.api.StructurizrClientException: com.structurizr.api.StructurizrClientException: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (String)""; line: 1, column: 0]
        at com.structurizr.api.StructurizrClient.putWorkspace(StructurizrClient.java:420)
        at com.structurizr.cli.PushCommand.run(PushCommand.java:133)
        at com.structurizr.cli.StructurizrCliApplication.run(StructurizrCliApplication.java:29)
        at com.structurizr.cli.StructurizrCliApplication.main(StructurizrCliApplication.java:82)
Caused by: com.structurizr.api.StructurizrClientException: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (String)""; line: 1, column: 0]
        at com.structurizr.api.StructurizrClient.getWorkspace(StructurizrClient.java:353)
        at com.structurizr.api.StructurizrClient.putWorkspace(StructurizrClient.java:373)
        ... 3 more
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (String)""; line: 1, column: 0]
        at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4765)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4667)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3629)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3597)
        at com.structurizr.api.ApiResponse.parse(ApiResponse.java:46)
        at com.structurizr.api.StructurizrClient.getWorkspace(StructurizrClient.java:347)
        ... 4 more
simonbrowndotje commented 1 year ago

What url are you specifying for the push command?

bemayr commented 6 months ago

Just stumbled upon this issue myself and for future people having this issue the problem was the missing /api suffix for the URL. After adding the suffix, the error was gone.