javax.validation.constraints.NotNull is missing in Payara 4.73 ?

1,347 views
Skip to first unread message

Pablo Rafael López Martínez

unread,
Aug 16, 2017, 9:43:04 AM8/16/17
to Payara Forum

Hello guys!.

Yesterday afternoon I was testing the new Payara version. I tried to run an already runing app but a compiling error arrised: javax.validation.constraints.NotNull does not exist. I use Netbeans 8.2
I just changed the Payara 4.72 by 4.73. If I go back everything work fine again.
Any idea?

Thank you very much and sorry for my bad English.

Mike Croft

unread,
Aug 16, 2017, 10:10:02 AM8/16/17
to Payara Forum
Can you upload your code? Or give a link to it?

Pablo Rafael López Martínez

unread,
Aug 16, 2017, 10:45:17 AM8/16/17
to Payara Forum
Sure!

If I change back the server to Payara 4.72 it does compile ok, but with 4.73 does not.
I have been following the same procedure to make the payara server avalilable in Netbeans all the time.
Even more. I started a new project from scratch and the same compiling error is present.
Thank you for your help.
Auto Generated Inline Image 1

Pablo Rafael López Martínez

unread,
Aug 16, 2017, 10:54:46 AM8/16/17
to Payara Forum

The problem is with the javax.validation package. It is not findable by the compiler.



El miércoles, 16 de agosto de 2017, 9:10:02 (UTC-5), Mike Croft escribió:
Auto Generated Inline Image 1

ondrej....@gmail.com

unread,
Aug 17, 2017, 6:00:05 PM8/17/17
to Pablo Rafael López Martínez, Payara Forum

How do you add Payara libraries into your project? Is it maven-based project?

 

I guess that the application works fine with v4.173 even if you compile with 4.172, have you tried it?


Ondro

 

Od: Pablo Rafael López Martínez
Odesláno:středa 16. srpna 2017 16:54
Komu: Payara Forum
Předmět: [payara-forum] Re: javax.validation.constraints.NotNull is missing inPayara 4.73 ?

 


The problem is with the javax.validation package. It is not findable by the compiler.

cid:autoGeneratedInlineImage1



El miércoles, 16 de agosto de 2017, 9:10:02 (UTC-5), Mike Croft escribió:

Can you upload your code? Or give a link to it?

On Wednesday, 16 August 2017 14:43:04 UTC+1, Pablo Rafael López Martínez wrote:


Hello guys!.

Yesterday afternoon I was testing the new Payara version. I tried to run an already runing app but a compiling error arrised: javax.validation.constraints.NotNull does not exist. I use Netbeans 8.2
I just changed the Payara 4.72 by 4.73. If I go back everything work fine again.
Any idea?

Thank you very much and sorry for my bad English.

--
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...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/3ed8e46c-5d23-475e-b4a9-133641ff6409%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Pablo Rafael López Martínez

unread,
Aug 18, 2017, 9:29:24 AM8/18/17
to Payara Forum, prlo...@gmail.com
Hi!
It is not a maven project.I added a new Glassfish server, and selected a Payara folder, as I ever have done before till now.
Netbeans detects automatically  the payara's libraries as usually. In fact, nothing seems to have changed except that the compiler says the library does not exist. A picture bellow.
I tried to compile a very small app, but if I try to add anything in javax.validation the compiling process fails, as the picture in the last post shows.
Any idea?
Thank you very much!


Auto Generated Inline Image 1

Steve Millidge

unread,
Aug 20, 2017, 4:14:58 PM8/20/17
to Payara Forum
The class is in glassfish/modules/validation-api.jar


On Wednesday, 16 August 2017 14:43:04 UTC+1, Pablo Rafael López Martínez wrote:

Steve Millidge

unread,
Aug 20, 2017, 4:23:37 PM8/20/17
to Payara Forum
Essentially the jar file containing this class has been renamed from bean-validator.jar to validation-api.jar so you will need to update your NetBeans library definition. This is because we have changed how we use the bean validation jars from Hibernate. We now use them directly rather than repackaged so the jar file names have been changed.

Pablo Rafael López Martínez

unread,
Aug 30, 2017, 9:39:50 AM8/30/17
to Steve Millidge, Payara Forum
Thank you very much, dear Steve.
Problem solved!
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Payara Forum" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/payara-forum/GVzQk2twHGM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> payara-forum...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/payara-forum/220cc824-b5b9-40d8-b05e-d9bbdf3024a5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


--
Pablo, esclavo de Dios

Christian Salazar

unread,
Sep 18, 2017, 10:29:49 AM9/18/17
to Payara Forum
Ok, i got the same issue. I'm using Netbeans 8.1 'cause 8.2 had some issues when I tried it. So you are saying to update the libraries in Netbeans. Can you please advise where to do this? is there a config file to look for? Thanks... 

Lucas Nishimura

unread,
Sep 20, 2017, 10:43:48 AM9/20/17
to Payara Forum
Steve, can you look at gf-client.jar manifest ? it points to the old bean-validator.jar instead of the new one.

Steve Millidge

unread,
Sep 20, 2017, 10:49:59 AM9/20/17
to Payara Forum
OK do you want to raise an issue on GitHub or possibly even a PR?

Christian Salazar

unread,
Oct 9, 2017, 4:15:28 PM10/9/17
to Payara Forum
I have figured out a workaround this issue. Copy the jar file and rename it in the same folder to what it used to be. I copied validator-api.jar and renamed it bean-validator.jar. I restarted my netbeans and it worked. 

peterb

unread,
Aug 15, 2018, 10:36:16 PM8/15/18
to Payara Forum
nbproject/project.properties appears to be automagically rewritten with the names of specific jar files hard coded in <nb install dir>/enterprise/modules/org-netbeans-modules-glassfish-tooling.jar.  Short of hacking the tooling jar, creating a copy of the validator jar does seem to be the easiest solution. 

Peter
Message has been deleted

rukeka kambari

unread,
Nov 16, 2018, 8:51:40 AM11/16/18
to Payara Forum
Actually your trick works but it in deployment time I encountered an issue of duplicate annotation interfaces

rukeka kambari

unread,
Nov 16, 2018, 9:07:33 AM11/16/18
to Payara Forum
And instead of renaming and end up with unexpected errors, better copy the bean-validator and bean-validator-cdi jars from Payara 5.181 and paste them in modules of Payara 5.183. It works quite well but I know it is not the right way to fix this but in my case I had no choice because I wanted to move faster because I was adding a feature in an app already on the production. And I did find an issue with a class called Weld or something which failing to build managed bean or something like that. I did read the whole bunch of issues on Git hub somehow the guys didan amazing job but most of the solution did solve my issues so, the working workaround was to add those jars. JEjejejejeje!!!!


On Monday, October 9, 2017 at 10:15:28 PM UTC+2, Jedi Sal wrote:
Reply all
Reply to author
Forward
0 new messages