This is a somewhat unusual scenario. There are persons both working for this concern and persons who are clients. They share the same database table. Then there are different groups of people. Among the staff they can be admin staff and social workers and what have you. Among the clients they can be any of a number of groups, pensioners, jobless people, substance abusers, etc.
Any person can be a member of any number of groups. Then any number of staffmembers can be responsible for any number of groups. So, we have two m-m relationships: person -- group as a member person -- group as the owner of one or more groups One m-m relationship between two tables work fine, but when I define the second one (the two relationship tables have different names, of course) I get null pointer exceptions. impl19:34:24,082 INFO [Configuration] processing collection mappings | 19:34:24,131 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=nfss.par | java.lang.NullPointerException | at org.hibernate.cfg.annotations.TableBinder.bindFk(TableBinder.java:104) | at org.hibernate.cfg.annotations.CollectionBinder.bindCollectionSecondPass(CollectionBinder.java:877) | ements Serializable After a long stack trace comes: implement at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182) | 19:34:24,374 INFO [EJB3Deployer] Deployed: file:/usr/local/jboss-4.0.3/server/default/deploy/nfss.par | 19:34:24,376 ERROR [URLDeploymentScanner] Incomplete Deployment listing: | | --- MBeans waiting for other MBeans --- | ObjectName: jboss.j2ee:service=EJB3,module=nfss.par | State: FAILED | Reason: java.lang.NullPointerException | | --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- | ObjectName: jboss.j2ee:service=EJB3,module=nfss.par | State: FAILED | Reason: java.lang.NullPointerException | s Serializable Removing one of the m-m relationships solves the problem. I tried it from both sides - the relationship tables defined in different classes for the two relationships and then defining the relationship tables in the same class for the two relationships. No go. Can this be done? It should be possible. I user jBoss 4.0.3 and jBossIDE-1.5 and JDK 1.5.0.01 Thanks, View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922228#3922228 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922228 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user