• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

descriptor information is NOT complete

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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 ?
 
Paul Michael
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • 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.
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • 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;}
 
nav katoch
Ranch Hand
Posts: 246
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the following thread:-
You can find the answers here: http://www.coderanch.com/t/418748/java-EJB-SCBCD/certification/Answers-Sun-Free-Proficiency-Assessment

Thanks,

Naveen Katoch
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by nav katoch:
Read the following thread:-
You can find the answers here: http://www.coderanch.com/t/418748/java-EJB-SCBCD/certification/Answers-Sun-Free-Proficiency-Assessment

Thanks,

Naveen Katoch

it does not explain why.
 
Sergio Tridente
Ranch Hand
Posts: 329
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • 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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic