You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to programmatically add a path to the quarkus vertx setup using a build item (using NonApplicationRootPathBuildItem) using the code shown below. However, this code throws a ClassNotFoundException on a function lambda, I'm assuming it's the routFunction() lambda.
What is causing this. It seems Quarkus removes the lambda code from the -deployment build?
How to solve this?
@BuildStep
public void setupPush(BuildProducer<AdditionalBeanBuildItem> additionalBeans,
BuildProducer<RouteBuildItem> additionalRoutes,
NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem,
PubSubBuildTimeConfig config) {
if (!config.push().enabled()) {
return;
}
additionalBeans.produce(AdditionalBeanBuildItem
.builder()
.setUnremovable()
.addBeanClasses(GooglePubSubAuthenticationFilter.class, PubSubPushManager.class, GoogleTokenVerifier.class)
.build());
config.push().endpointPath().ifPresent(endpoint -> additionalRoutes.produce(nonApplicationRootPathBuildItem
.routeBuilder()
.routeFunction(endpoint, (route) -> route.method(HttpMethod.POST) // <-- It seems this causes the ClassNotFoundException
.consumes("application/json")
.handler(BodyHandler.create())
.handler(new PubSubPushEndpointHandler()))
.build()));
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to programmatically add a path to the quarkus vertx setup using a build item (using NonApplicationRootPathBuildItem) using the code shown below. However, this code throws a ClassNotFoundException on a function lambda, I'm assuming it's the
routFunction()
lambda.Beta Was this translation helpful? Give feedback.
All reactions