Closed nicolasduminil closed 3 months ago
The problem is that FileMetadata
does not have a default constructor -if you add one everything works as expected.
This is a general issue with the multipart handling that is being tracked in other issues, so I am going to close this one. Hopefully we can update the multipart handling soon to address all these cases - cc @FroMage
Yes, I confirm that doing that solves the issue. My bad, I didn't realize that adding an explicit non default constructor removes the parameterless one. I've noticed that the original quick-start didn't declare a non default constructor and I thought to remove it as well from my example, but finally I didn't, 'cause it didn't seem to me the most likely reason to prevent the implementation from working.
Perhaps a more intuitive behavior, like a more specific exception, would be helpful ?
Many thanks for your help and support.
Perhaps a more intuitive behavior, like a more specific exception, would be helpful ?
Indeed, but ideally we would just make it work and not require a non-args constructor :)
Many thanks for your help and support.
YW
This is a general issue with the multipart handling that is being tracked in other issues, so I am going to close this one. Hopefully we can update the multipart handling soon to address all these cases - cc @FroMage
Any other issue in particular?
Hello,
I've used the Quarkus quick start examples here to implement a simple RESTesay endpoint. The original example works as expected, of course, however mine doesn't and, while executing the associated unit test, it keeps returning HTTP 400.
I tried to reduce the two implementations such that to figure out what exactly produces this behavior and, finally, I came up with two almost identical implementations, the original one slightly modified which works as expected, and the one adapted by me, which doesn't and which, whatever I do, returns HTTP 400.
Could anyone please let me know what might be the problem here ?
Expected behavior
Running the quick start unit test works as expected by running the simple example adapted by me from this same quick start doesn't and returns HTTP 400.
Actual behavior
I expect that both implementations run identically given that, apart a few minor details, that's almost the same code.
How to Reproduce?
Clone the sample repository:
git clone https://github.com/nicolasduminil/quarkus-s3.git
cd
to the root directorycd quarkus-s3
Run the unit test:
mvn test
The unit test fails as shown below:
Output of
uname -a
orver
Linux nicolas-XPS-15-9570 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
java version "21.0.3" 2024-04-16 LTS Java(TM) SE Runtime Environment (build 21.0.3+7-LTS-152) Java HotSpot(TM) 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)
Quarkus version or git rev
3.11
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546) Maven home: /opt/apache-maven-3.9.5 Java version: 21.0.3, vendor: Oracle Corporation, runtime: /usr/lib/jvm/jdk-21-oracle-x64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.15.0-107-generic", arch: "amd64", family: "unix"
Additional information
N/A