Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

descriptor information is NOT complete

 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
can anyone tell me why the following descriptor information is not complete ?

Given the definition for an entity, Book:

The associated descriptor file has the following snippet pertaining to this entity:


No other parts of the deployment descriptor affect this configuration.
This persistent unit does NOT deploy because the descriptor information is NOT complete.
Why ?
 
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not very strong with EJB XML descriptors but I'm guessing this has something to do with this property:

metadata-complete defines whether the metadata description for this element is complete or not (in other words, if annotations present at the class level should be considered or not).

Try adding an Id element to your descriptor or mark the metadata-complete as false and let us know how it works.
 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Celino

10. @Entity11. public class Book {12. @Id Integer id;13. @Column(name="NAMEBOOK")14. String bookName;15. public java.util.Date loanDate;16. }




do like this-

@Entity
public class Book
{
String bookName;
@Id
@Column(name="NAMEBOOK")
public String getBookName(String bookName){
return bookName;
}
public void setBookName(String bookName){
this.bookName = bookName;
}
public java.util.Date loanDate;}
 
Ranch Hand
Posts: 246
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read the following thread:-
You can find the answers here: https://coderanch.com/t/418748/java-EJB-SCBCD/certification/Answers-Sun-Free-Proficiency-Assessment

Thanks,

Naveen Katoch
 
Celinio Fernandes
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by nav katoch:
Read the following thread:-
You can find the answers here: https://coderanch.com/t/418748/java-EJB-SCBCD/certification/Answers-Sun-Free-Proficiency-Assessment

Thanks,

Naveen Katoch


it does not explain why.
 
Ranch Hand
Posts: 329
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Celinio, have you tried what Paul suggested?

As he has already explained, the metadata-complete attribute indicates whether all the needed metadata is defined in the deployer descriptor. If that's the case, metadata specified in annotations is ignored. Now, the problem with your example is that you are not specifying Id in metadata (as the one deplcared in annotations is not considered).
 
reply
    Bookmark Topic Watch Topic
  • New Topic