• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

@Cascade annotation

Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I'm facing this problem: I have a OneToMany relationship, here is my code:
@OneToMany(mappedBy = "school")
public List<Student> getStudents() {
return students;

public void setStudents(List<Student> students) {
this.students = students;
But..when I try to deploy my app netbeans says:
warning: Cannot find annotation method 'value()' in type 'org.hibernate.annotations.Cascade': class file for org.hibernate.annotations.Cascade not found
An exception has occurred in the compiler (1.6.0). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for org.hibernate.annotations.CascadeType not found

I don't know if it is a library that is missing or something else...anyone knows what could be happen???
author and cow tipper
Posts: 5006
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like the Hibernate library that contains this class is missing on your runtime classpath.


Remember, your compile time classpath and runtime classpaths are different. It sounds like your compile time classpath is fine, but at runtime, things are misconfigured.

The CascadeType is just in the jar file that comes with the annotations download from Hibernate. It should be easy to add it into the runtime classpath of your application.
Don't MAKE me come back there with this tiny ad:
Garden Master Course kickstarter
    Bookmark Topic Watch Topic
  • New Topic