Yes, I know, a lot of these problems may not be caused by quarkus but rather other tools in the stack. However, I still cound them here since quarkus makes it extra hard to fix them.
Reactive as a concept sounds quite appealing. Yay, performance, am i right? In practice however, this rarely is worth the hassle. Just look at this abomination of a function.
And, unsurprisingly, I'm not the only one with this opinion! So, yeah, if you're just starting out, DO NOT use reactive programming (at least for databases, RESTEasy reactive is probably fine). Just use virtual threads.
however, it is fixed when adding another field.
- "show more" button for
quarkus.hibernate-orm.database.generation
doesn't do anything FetchType.EAGER
fucks up application as it tries to acquire a JDBC connection despite using the reactive driver- fetching throws "unsaved transient instance" error..?
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(nullable = false)
var owner: Person = Person(),
@ManyToOne(fetch = FetchType.EAGER, optional = false)
var contest: Contest = Contest(),
@ManyToMany(fetch = FetchType.EAGER)
var members: MutableSet<Person> = mutableSetOf()
=> works fine
then, changing the FetchType
to LAZY
for members
makes the field null
ok, understandable, RIGHT?
well, changing the type to LAZY
for contest
doesn't make it null
, no, it THROWS AN EXCEPTION:
object references an unsaved transient instance - save the transient instance before flushing : Contest.organizer -> Person
FINALLY
changing owner
to EAGER
MAKES IT THROW ANOTHER EXCEPTION
org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection [Not using JDBC] [n/a]
I DO NOT USE JDBC LMAO
Invoking sessionFactory.schemaManager.validateMappedObjects()
works on the initial application startup, however, subsequent calls cause the WHOLE APPLICATION to hang entirely. Even the web worker pool is blocked!
For some reason, the devs thought it'd be a great idea to start a whole fucking kubernetes cluster as a devservices when all you tried to do was load some config maps in prod.
The docs don't state anything valuable either, should probably paste it in here but cba to do that rn tbh.~~
Turns out they have a different use case. One of them loads them using the kubernetes API and the other one with a native envFrom
mostly an upstream issue but still annoying AF for a project that is meant to provide ootb integrations this leads to custom code that needs to be written in order to execute the migrations over a temporary JDBC connection (which in turn requires the JDBC driver for the whole application... yikes)
See quarkusio/quarkus#37904 Essentially, when using the management interface, the prometheus metrics route is exposed there. However, the Kubernetes resource generator doesn't respect that and still provides the main application port, thus causing scrapes to fail.
HUGE security vulnerability that allows you to bypass any type of authentication / authorization entirely by just omitting the Authorization
header. With the header, it correctly yeets you, without, quarkus shits itself and doesn't actually disconnect you.
Originally came up in June of 2022 and is still a problem as of very late 2023. How the fuck?
See quarkusio/quarkus#13565
It took me several hours to setup Java 21 support for quarkus. It took them AGES to officially support it.
Required me to manually set the quarkus.jib.base-jvm-image
, override the kotlin BOM and manually depend on the kotlin stdlib.
The postgres devservice is using version 14... That $hit came out back in 2021... For a "revolutionary" and "modern" framework, this is a no-go.
"Amazingly fast boot time, incredibly low RSS memory (not just heap size!) offering near instant scale up and high density memory utilization in container orchestration platforms like Kubernetes."
this is a VERY SIMPLE application with ZERO handled requests btw...
"Zero config, live reload in the blink of an eye and streamlined code for the 80% common usages, flexible for the remainder 20%."
yeah, about that zero config... actually, even to JUST USE HIBERNATE REACTIVE, MANUALLY DISABLING JDBC IN THE PROPERTIES IS REQUIRED. This in itself is a huge problem and perfectly represents what's wrong with the whole framework.
honestly, can't remember the exact issue, but i did find this cool screenshot:
I think I fixed it by setting
quarkus.datasource.jdbc=false
See quarkusio/quarkus#36638 and quarkusio/quarkus-quickstarts#1343 This LITERALLY BROKE projects downloaded from the OFFICIAL BOOTSTRAP SITE. You seriously can't make this shit up
Just to see an error message, I had to use a tracing tool to dig into the traces generated (which, frankly, did generate reasonably well, although the error message was cut off causing me to MISS THE WHOLE FUCKING REASON). Without this tool, I would be absolutely SCREWED as I wouldn't have been able to find out that I misconfigured the hostname of the datasource... How is this shit not logged??
i still DO NOT use JDBC... wtf? also thanks for the absolutely helpful stacktrace that doesn't contain a single class of mine
apparently this is caused by using
Uni.combine().all()
again, sometimes an upstream issue. still, quarkus' error messages often times don't help you debug problems AT ALL
After exporting my application and deploying it, the pod crashed instantly on startup. The full stack trace:
Caused by: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because the return value of "org.eclipse.microprofile.config.ConfigValue.getValue()" is null
at io.quarkus.runtime.configuration.ConfigRecorder.handleConfigChange(ConfigRecorder.java:45)
at io.quarkus.deployment.steps.ConfigGenerationBuildStep$checkForBuildTimeConfigChange1532146938.deploy_22(Unknown Source)
at io.quarkus.deployment.steps.ConfigGenerationBuildStep$checkForBuildTimeConfigChange1532146938.deploy(Unknown Source)
... 11 more
wow, incredibly helpful!
To debug this issue further (as there were no logs either), I attached my debugger to the remote instance (as it worked fine in dev).
When the exception was thrown, the breakpoint triggered and I found this:
(
result
is currentValue
)
Turns out that quarkus sets build-time properties to null
when evaluation doesn't work (as the environment variables obviously aren't set at build time) BUT fails to check for those at runtime.
This breaks the flyway job on kubernetes (even when 1:1 following the guide!) See Issue #37040 I've since gotten rid of it as it just introduced problems and, due to a separate bug (being that the kubernetes extension uses the wrong config key), it didn't even do any good anyway.
When updating an existing entity with two fields and the values 0
and null
, nothing actually is changed.
Setting the first to 1
works, setting the second to something nonnull works too. Just this combination is flawed.
Probably some shitty "performance optimization" that fails miserably. This is exactly why i make my own shit: because it just works and doesn't have these incredibly weird problems
fun onStartup(@ObservesAsync startupEvent: StartupEvent) {
// never called
}
fun onStartup(@Observes startupEvent: StartupEvent) {
// this works though!
}
Inb4 anyone complains about the swearing;
![image](https://private-user-images.githubusercontent.com/63104422/293456384-80dd7696-0138-4c37-998e-97c1ddee85cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwMTcwNTYsIm5iZiI6MTcyMDAxNjc1NiwicGF0aCI6Ii82MzEwNDQyMi8yOTM0NTYzODQtODBkZDc2OTYtMDEzOC00YzM3LTk5OGUtOTdjMWRkZWU4NWNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAzVDE0MjU1NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcwYTZlOTRiY2Q0MzljMDY2ZjYxNjFkN2UzOTAyOTZmODI3MmZiN2NmZTdlMTQ5NjgwZjJiNjgwYmNmODAzYmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gv9YsFxzRu-o_eVVvMzm7gQYILcbETu302rQ9ql9Q2I)