GeoServer REST API Importer Schema Does not Exist Error

Description

I'm trying to replace my existing tables in my Oracle 12c database. I'm using Geoserver 12.3.2.

I'm trying to replace the same file with a different version. My shapefile will be updated regularly so I need to this process many times. I'm only trying to replace the columns in it. I've created the first file exactly like this without changing the "updateMode" and I succeeded.

1. First I POST it with import.json and get the id;

------------------------------------------------

curl -u usersswrd-XPOST -H "Content-type: application/json" -d @import.json "http://localhost:8080/geoserver/rest/imports"

import.json;

{
"import": {
"targetWorkspace": {
"workspace": {
"name": "workspace_name"
}
},
"targetStore": {
"dataStore": {
"name": "Oracle_data_Store"
}
},
"data": {
"type": "file",
"file": "C:/Users/user/Downloads/New_Folder/shapefile.shp"
}

2. Then I update my CRS with layerupdate.json;

curl -u userassword -XPUT -H "Content-type: application/json" -d @layerupdate.json "http://localhost:8080/geoserver/rest/imports/6/tasks/0/layer/"

layerupdate.json;

{
layer : {
srs: "EPSG:4326"
}
}

3. Then I change the mode to replace with replace.json

curl -u userassword -XPUT -H "Content-type: application/json" -d @replace.json "http://localhost:8080/geoserver/rest/imports/6/tasks/0/"

Replace.json;

{
"task": {
"updateMode": "REPLACE"
}
}

Then I get a response saying my tasks are ready

4. Now I POST the task;

curl -u userassword -XPOST "http://localhost:8080/geoserver/rest/imports/6"

But I get an error saying:

"errorMessage":"Schema 'layer_name' does not exist."

What can I do to fix this?

Environment

None

Status

Assignee

Unassigned

Reporter

Omer Kantarcioglu

Triage

Fix versions

None

Affects versions

Priority

Medium
Configure