• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual

 
Ranch Hand
Posts: 345
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm starting my learn in JSF with a simple web page but I'm receiving this error. Below are my files to execute the page.
My pom.xml:

XHTML:

Managed beans:


Error log:

Thanks in advanced.
 
Marshal
Posts: 22453
121
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
That class comes from a dependency you already have:

However, the scope is provided, which means it's not included in your web app. That's fine (and should be the case) for libraries provided by the container. However, I'm guessing this is Tomcat, and Tomcat doesn't come with CDI (full JEE containers like JBoss, WildFly, GlassFish and WebLogic do). You'll therefore have to include the dependency either in your JAR (by removing the scope), or by putting it in Tomcat somewhere. I heavily prefer the former.
 
Cezar Apulchro
Ranch Hand
Posts: 345
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, trying to solve this problem I do removed Apache Tomcat from my netbeans and I instal the WildFly server in my netbeans, after start WildFly I run my xhtml file but the log of Run show Deploying on tomcat90 I can't understand.
WildFly start log:

Run my xhtml log:

My pom.xml:

Thanks.
 
Cezar Apulchro
Ranch Hand
Posts: 345
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, 1 - Uninstall Apache Netbeans,
    2 - Install Apache Netbeans,
    3 - Install WildFly.25.0.0.Beta1 in Netbeans.
Now I am receiving "No suitable Deployment Server is defined for the project or globally."
Thanks.
 
Run away! Run away! Here, take this tiny ad with you:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic