Open ggam opened 6 years ago
The problem with the bundle
goal is that it doesn't deploy the kafka resource adapter before the app is deployed and therefore the app doesn't see the classes when deployed. We need to fix the order of deployments to fix this problem.
The option <useUberJar>true</useUberJar>
probably changes the deployment order and the adapter is deployed before the app.
Alternatively, you can use the "start" goal of the plugin with the --outputUberJar
argument, as used here: https://github.com/OndrejM-demonstrations/Reactive-and-Micro-with-MicroProfile-and-Payara/blob/f7e5c14858008339f0f623f23dbdca9e0914f1b8/BTCFrontend/pom.xml#L143
Trying to do: https://docs.payara.fish/documentation/user-guides/mdb-in-payara-micro.html with the bundle goal as this issue payara/ecosystem-maven#74 and I have the same error. Rar file was deployed after main project and this last fails on deploy time.
org.glassfish.deployment.common.DeploymentException: Resource Adapter not present: RA Name: [activemq-rar-5.14.5], Type: [AODD] (I skipped other stacktrace for brevity)
The option <useUberJar>true</useUberJar>
hasn't been fine for me.
Deployment order configuration on pom.xml could be a good solution.
Created internal ticket MP-71 to address the issue.
The following pom.xml doesn't deploy the Kafka resource adapter:
My application only contains a
@MessageDriven
class and nothing more. I get some not very intuitive error message, along with a ClassNotFoundException for KafkaListener:However, it works when I add
<useUberJar>true</useUberJar>
.