• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.NoClassDefFoundError: javax/xml/bind/JAXB

 
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to create a xhtml page with primefaces datatable but I receiving error that I can't any idea.
My xhtml:

My pom:

Log error:

Thanks in advanced.
 
Saloon Keeper
Posts: 15488
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The POM you posted is invalid. Please post the real POM without copy errors.

Also remove the compiler plugin from your list of dependencies. Plugins are typically not used as dependencies.
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this a Tomcat server? And are you using Java 11 or higher?

In Java 11, Oracle removed all of the JEE code from the JDK and JRE. That was basically everything that was in the java.se.ee module but not in the java.se module, and included modules like java.activation, java.xml.ws and java.xml.bind. That last one is better known as JAXB. In other words, since Java 11, JAXB is no longer part of the JDK / JRE. You need to include a dependency for it now.

I did a quick search on Google for replacement dependencies, and I found this article by our own Jesper de Jong: https://jesperdj.com/2018/09/30/jaxb-on-java-9-10-11-and-beyond/ that explains the problem in more detail, and mentions the dependencies you need.
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, yes Java 14 and Tomcat server.
Thanks.
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After change my pom to jaxb-api 2.3.1 indicated in your response, problem still the same.
Pom:

Error log:

Thanks.
 
Cezar Apulchro
Ranch Hand
Posts: 675
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, no news?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic