<p><br>hi, I deployed my app to jboss, but something wrong happen:<br> </p>
<p>2007-05-18 22:16:57,843 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed persistence.units:ear=favorites.ear,jar=favoritesEJB.jar,unitName=favorites<br>java.lang.NullPointerException<br> at org.hibernate.cfg.OneToOneSecondPass.doSecondPass
(OneToOneSecondPass.java:135)<br> at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)<br> at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:296)<br> at org.hibernate.cfg.Configuration.buildMappings
(Configuration.java:1115) <br> <br> <br>--- MBeans waiting for other MBeans ---<br>ObjectName: persistence.units:ear=favorites.ear,jar=favoritesEJB.jar,unitName=favorites<br> State: FAILED<br> Reason: java.lang.NullPointerException
<br> I Depend On:<br> jboss.jca:service=DataSourceBinding,name=DefaultDS<br> Depends On Me:<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=AddressFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear
,jar=favoritesEJB.jar,name=AdminFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=CommentFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=FavoritesDirectoryFacade,service=EJB3
<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=FavoritesFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=PermissionFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=
favoritesEJB.jar,name=RoleFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=SiteFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=TagFacade,service=EJB3<br>
jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=UsersFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=UserSiteFacade,service=EJB3</p>
<p>--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---<br>ObjectName: persistence.units:ear=favorites.ear,jar=favoritesEJB.jar,unitName=favorites<br> State: FAILED<br> Reason: java.lang.NullPointerException<br> I Depend On:
<br> jboss.jca:service=DataSourceBinding,name=DefaultDS<br> Depends On Me:<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=AddressFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar
,name=AdminFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=CommentFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=FavoritesDirectoryFacade,service=EJB3<br>
jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=FavoritesFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=PermissionFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar
,name=RoleFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=SiteFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=TagFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear
,jar=favoritesEJB.jar,name=UsersFacade,service=EJB3<br> jboss.j2ee:ear=favorites.ear,jar=favoritesEJB.jar,name=UserSiteFacade,service=EJB3</p>
<p>here is my code:<br>@Entity<br>@Table(name = "users", catalog = "favorites", uniqueConstraints = {})<br>public class Users implements java.io.Serializable {<br> private Set<UserSite> userSites = new HashSet<UserSite>(0);
<br>//...<br> @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "users")<br> public Set<UserSite> getUserSites() {<br> return this.userSites;<br> }</p>
<p> public void setUserSites(Set<UserSite> userSites) {<br> this.userSites = userSites;<br> }</p>
<p>}</p>
<p><br>@Entity<br>@Table(name = "user_site", catalog = "favorites", uniqueConstraints = {})<br>public class UserSite implements java.io.Serializable {</p>
<p> private Users users;<br>//...<br> @ManyToOne(cascade = {}, fetch = FetchType.LAZY)<br> @JoinColumn(name = "userId", unique = false, nullable = false, insertable = true, updatable = true)<br> public Users getUsers() {
<br> return this.users;<br> }</p>
<p> public void setUsers(Users users) {<br> this.users = users;<br> }<br>}</p>
<p>any advise?<br></p>