PostgreSQL data types issue on clear docker installation of hawkbit 1.1.0
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
The failure is an UPDATE on table sp_target_filter_query that binds NULL as VARCHAR for column auto_assign_distribution_set (bigint). Find the JPA/Hibernate entity and repository that map that table and the auto-assign distribution-set field, then see how null is passed when a distribution set is deleted. Reproduce with hawkBit 1.1.0 microservices plus PostgreSQL 16 as described; done when that UPDATE uses a bigint (or typed null) and the distribution set can be removed without SQLState 42804.
Written by the indexing model from the issue text.
Description
Distribution set is unable to be removed. Server returns 500 error.
The reason is NULL type mismatch. It tries to set integer field to varchar NULL value.
The related log messages are the following:
hawkbit-mgmt | 2026-08-11T06:22:46.414Z TRACE 1 --- [mgmt-server] [DEFAULT:admin] [nio-8080-exec-1] o.postgresql.core.v3.QueryExecutorImpl : FE=> Parse(stmt=null,query="UPDATE sp_target_filter_query SET auto_assign_distribution_set = ($1), access_control_context = ($2), optlock_revision = (optlock_revision + $3), auto_assign_action_type = ($4) WHERE ((auto_assign_distribution_set IN ($5)) AND (tenant = $6))",oids={1043,1043,23,1043,20,1043})
hawkbit-mgmt | 2026-08-11T06:22:46.414Z TRACE 1 --- [mgmt-server] [DEFAULT:admin] [nio-8080-exec-1] o.postgresql.core.v3.QueryExecutorImpl : FE=> Bind(stmt=null,portal=null,$1=<(NULL)>,type=VARCHAR,$2=<(NULL)>,type=VARCHAR,$3=<('1'::int4)>,type=INT4,$4=<(NULL)>,type=VARCHAR,$5=<('9'::int8)>,type=INT8,$6=<('DEFAULT')>,type=VARCHAR)
...
hawkbit-mgmt | 2026-08-11T06:22:46.416Z TRACE 1 --- [mgmt-server] [DEFAULT:admin] [nio-8080-exec-1] o.postgresql.core.v3.QueryExecutorImpl : <=BE ErrorMessage(ERROR: column "auto_assign_distribution_set" is of type bigint but expression is of type character varying
hawkbit-mgmt | Hint: You will need to rewrite or cast the expression.
hawkbit-mgmt | Position: 67
hawkbit-mgmt | Location: File: parse_target.c, Routine: transformAssignedExpr, Line: 586
hawkbit-mgmt | Server SQLState: 42804)
I've reproduced it using hawkbit docker microservices of version 1.1.0 and PostreSQL:16 container.
- Uploaded a firmware
- Created a rollout
- Waited all device got updated
- Tried to remove the distribution set
I've worked it around by automate type casting for the related cases:
CREATE OR REPLACE FUNCTION cast_varchar_to_bigint(varchar)
RETURNS bigint AS $$
SELECT CASE WHEN $1 IS NULL OR $1 = '' THEN NULL ELSE $1::bigint END;
$$ LANGUAGE SQL IMMUTABLE STRICT;
CREATE CAST (varchar AS bigint)
WITH FUNCTION cast_varchar_to_bigint(varchar)
AS IMPLICIT;
CREATE OR REPLACE FUNCTION cast_varchar_to_int(varchar)
RETURNS integer AS $$
SELECT CASE WHEN $1 IS NULL OR $1 = '' THEN NULL ELSE $1::integer END;
$$ LANGUAGE SQL IMMUTABLE STRICT;
CREATE CAST (varchar AS integer)
WITH FUNCTION cast_varchar_to_int(varchar)
AS IMPLICIT;
- Dominant language
- Java
- Stars
- 601
- Forks
- 228
- Avg merge
- 15h 58m
- Merged PRs (30d)
- 62
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-hawkbit/hawkbit
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
eclipse-hawkbit/hawkbit#3429 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
eclipse-hawkbit/hawkbit#3436 ·
Maintainers usually reply within 1 day
-
Configurable automatic retries for failed actions (policy, backoff, rollout and auto-assignment support)May be free again @strailov claimed this 78 days ago, and no pull request is open. Openfeature request
eclipse-hawkbit/hawkbit#3251 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
IN_SYNC and rollout success can be recorded while the device still runs the old imageMay be free again @denislavprinov claimed this 110 days ago, and no pull request is open. Open
eclipse-hawkbit/hawkbit#3185 · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
doumentation: openapi.json is not updated after recent Hawkbit releasesMay be free again @denislavprinov claimed this 75 days ago, and no pull request is open. Open
eclipse-hawkbit/hawkbit#3035 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in eclipse-hawkbit/hawkbit
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days
-
code-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
carlos-emr/carlos#5258 ·
Maintainers usually reply within 1 day