Skip to content

Commit

Permalink
fix some class loading issues
Browse files Browse the repository at this point in the history
  • Loading branch information
elguardian committed Nov 18, 2024
1 parent 72ae836 commit 67e2159
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

import static java.lang.Thread.currentThread;

public class JSONUtils {

private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
Expand All @@ -51,7 +53,7 @@ public static Object stringTreeToValue(String value, String javaType) {
if (Objects.isNull(value) || Objects.isNull(javaType)) {
return null;
}
return OBJECT_MAPPER.readValue(value, Class.forName(javaType));
return OBJECT_MAPPER.readValue(value, currentThread().getContextClassLoader().loadClass(javaType));
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.ForeignKey;
import jakarta.persistence.IdClass;
import jakarta.persistence.Table;

@Entity
Expand All @@ -35,7 +34,6 @@
@AttributeOverride(name = "value", column = @Column(name = "input_value"))
})
@AssociationOverride(name = "taskInstance", foreignKey = @ForeignKey(name = "jbpm_user_tasks_inputs_tid"))
@IdClass(TaskNamedDataEntityPK.class)
public class TaskInputEntity extends TaskNamedDataEntity<byte[]> {

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ create table jbpm_user_tasks_deadline_timer (


create table jbpm_user_tasks_reassignment_timer (
task_id varchar(50) not null,
task_id varchar(50) not null,
reassignment_job_id varchar(255) not null,
reassignment_type varchar(255) not null,
reassignment_value bytea,
java_type varchar(255),
java_type varchar(255),
primary key (task_id, reassignment_job_id)
);

Expand Down

0 comments on commit 67e2159

Please sign in to comment.