• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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

 
Ranch Hand
Posts: 379
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: 13478
304
  • 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: 22563
122
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: 379
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: 379
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: 379
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, no news?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic