PostgreSQL data types issue on clear docker installation of hawkbit 1.1.0
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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;
- Lingua principale
- Java
- Stelle
- 601
- Fork
- 228
- Merge medio
- 15h 58m
- PR unite (30g)
- 62
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-hawkbit/hawkbit
-
hawkbit-dmf-server 1.1.0 does not start: NoClassDefFoundError jakarta/servlet/ServletResponseAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
eclipse-hawkbit/hawkbit#3429 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
eclipse-hawkbit/hawkbit#3436 ·
I maintainer di solito rispondono entro 1 giorno
-
Configurable automatic retries for failed actions (policy, backoff, rollout and auto-assignment support)Forse di nuovo libera @strailov l’ha presa 77 giorni fa e non c’è nessuna pull request aperta. Apertafeature request
eclipse-hawkbit/hawkbit#3251 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
IN_SYNC and rollout success can be recorded while the device still runs the old imageForse di nuovo libera @denislavprinov l’ha presa 109 giorni fa e non c’è nessuna pull request aperta. Aperta
eclipse-hawkbit/hawkbit#3185 · 1 reazione · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
doumentation: openapi.json is not updated after recent Hawkbit releasesForse di nuovo libera @denislavprinov l’ha presa 74 giorni fa e non c’è nessuna pull request aperta. Aperta
eclipse-hawkbit/hawkbit#3035 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-hawkbit/hawkbit
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ome/ome-codecs#48 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
tonihele/OpenKeeper#672 ·
I maintainer di solito rispondono entro 4 giorni
-
Shaded google-api-client trust stores still include AAA Certificate Services (eMudhra CA compromise)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
snowflakedb/snowflake-jdbc#2763 ·
-
MacFileUtils: FSPathMakeRef passes an int where the C function takes its FSRef output pointerAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 79/100
java-native-access/jna#1746 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ControlSystemStudio/phoebus#3983 ·
I maintainer di solito rispondono entro 2 giorni