• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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

 
Ranch Hand
Posts: 526
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: 14499
325
  • 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: 22701
129
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: 526
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: 526
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: 526
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, no news?
 
A berm makes a great wind break. And we all like to break wind once in a while. Like this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic