[ 
https://issues.apache.org/jira/browse/MSHADE-460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Markus Karg updated MSHADE-460:
-------------------------------
    Description: 
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)

  was: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.


> Cannot find default constructor of record
> -----------------------------------------
>
>                 Key: MSHADE-460
>                 URL: https://issues.apache.org/jira/browse/MSHADE-460
>             Project: Maven Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 3.5.1
>            Reporter: Markus Karg
>            Priority: Major
>
> 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)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to