UberJar with REST app runs on Payara Micro 4.1.2.174 but not 4.1.2.181

24 views
Skip to first unread message

Vasilis Souvatzis

unread,
Feb 22, 2018, 5:35:50 PM2/22/18
to Payara Forum
I was testing the uberjar creation with Payara Micro on this simple app.

According to the documentation, I added the plugins to the build section and then ran Maven with 

mvn clean package && mvn exec:exec 

to generate my uberjar. If I have the 174 version, it works nicely and when the jar is launched it shows the REST endpoints.

If I use the 181 version, it says it's launched correctly but instead of the REST endpoints it says "Application not registered" or something like that.

Same behaviour if I deploy the war file on the respective micro versions.

Am I missing something? Could it be a bug?

Vasilis Souvatzis

unread,
Feb 22, 2018, 5:38:44 PM2/22/18
to Payara Forum
Hold on, I'm looking at the release notes and it seems there's no need for the --deploy argument.

This is the culprit isn't it?

Mike Croft

unread,
Feb 23, 2018, 3:35:50 AM2/23/18
to Payara Forum
Hi Vasilis,

We actually have a new Maven plugin for Payara Micro:
https://docs.payara.fish/documentation/ecosystem/maven-plugin.html

There's a simple example with my MicroProfile fault-tolerance example on GitHub:
https://github.com/payara/Payara-Examples/tree/master/microprofile/fault-tolerance

In the pom I have added the plugin goal to the install phase, so any mvn install will create the Uber JAR. This should also be much quicker than using the exec plugin, since it doesn't need to launch Payara Micro to package the WAR into the uber jar. I wrote a blog about it too which explains things in more detail:
http://blog.payara.fish/using-the-payara-micro-maven-plugin

Ondrej Mihályi

unread,
Feb 23, 2018, 3:44:40 AM2/23/18
to Vasilis Souvatzis, Payara Forum
Hi Vasilis,

This is possibly a bug if your application deployed correctly. The --deploy argument has nothing to do with it, it's optional. 

The message you see shhould be printed if the application doesn't have any REST endpoints. 

Dňa 22. 2. 2018 11:38 PM používateľ "Vasilis Souvatzis" <vas...@gmail.com> napísal:
--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/6c995bd3-0982-47ce-9e3d-8fa1f338050c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vasilis Souvatzis

unread,
Feb 23, 2018, 1:51:41 PM2/23/18
to Payara Forum
Ahhh cheers, I'll try with the new plugin then. I've bookmarked those blog posts and microprofile examples but hadn't had time to test them yet.

Thanks Mike and Ondro!


On Friday, 23 February 2018 00:35:50 UTC+2, Vasilis Souvatzis wrote:
Reply all
Reply to author
Forward
0 new messages