Skip to content

[MSHADE-460] Cannot find default constructor of record #672

Open
@jira-importer

Description

@jira-importer

Markus Karg opened MSHADE-460 and commented

I have setup up a small demo project which uses JSONB to deserialize JSON into a Java record. The created JAR works fine when using java -cp with the full class-path as shown by mvn dependency:build-classpath. As soon as I am building an uberjar using the Maven Shade Plugin, at runtime I end up with an exception like "Cannot create instance of a class: class eu.headcrashing.jaxrsdoneright.sebootstrap.HelloWorld$TimeInfo, No default constructor found". I already replaced the contained record class file, but the result is the same. As it seems, besides merging services descriptors, there seems to be some more resource type to get merge – but which?! Possibly there is just something missing in the plugin's docs, possible we actually need to invent a new type of transformer.

(BTW, minimizeJar is false, and it works once using a class instead of a record)


Affects: 3.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:majorMajor loss of function

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions