• 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
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

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

 
Ranch Hand
Posts: 333
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: 13072
281
  • 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: 22256
119
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: 333
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: 333
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: 333
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, no news?
 
this is supposed to be a surprise, but it smells like a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic