• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

Error binding json to java object

 
Ranch Hand
Posts: 77
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a follow up question for this post
I tried to make an implementation based on Stephan Van Hulst's tip, but getting following error:



Although I added both dependencies needed:



When googling the error online I saw that they used:



While I was using



but changing that resulted in:



Any idea how come?
 
Bartender
Posts: 15743
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're probably using incompatible versions of the JSON-B API and its implementation (Yasson).

I can give you the exact Maven coordinates if you give me a few hours. I'm on my phone right now.
 
Stephan van Hulst
Bartender
Posts: 15743
368
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what you need:
 
Stephan van Hulst
Bartender
Posts: 15743
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For future reference: Java EE is now called Jakarta EE, so you will find new versions of most enterprise APIs (like JSON-B) under a group ID that starts with jakarta.

Furthermore, don't rely on alpha/beta/RC versions of a dependency unless you really need to and know what you are doing. A general guideline is when the version of a plugin contains letters, don't use it.
 
Pieter Vandevelde
Ranch Hand
Posts: 77
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Stephan, you're awesome, you must be Belgian , (more likely Dutch, but anyways...)
 
Stephan van Hulst
Bartender
Posts: 15743
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm South African, but raised in the Netherlands.
 
Pieter Vandevelde
Ranch Hand
Posts: 77
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah your name sounded Dutch, but being from south-africa that not all weird, in any case, dankie, with your guidance I was abble to make it work and th eobjects are finally being populated
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic