I have this situation:

   class Enterprise1Bean implements EntityBean {
     public java.util.Vector elements;
     public static final Class elements_type = Normal_Java_Bean1.class;

     public void setElements(java.util.Vector newElements){
       elements = newElements;
     }
     public java.util.Vector getElements(){
       return elements;
     }

     /*********************
      * Other EJB methods *
      *********************/
   }

   class Normal_Java_Bean1 {
     public java.util.Vector elements;
     public static final Class elements_type = Normal_Java_Bean2.class;

     public void setElements(java.util.Vector newElements){
       elements = newElements;
     }
     public java.util.Vector getElements(){
       return elements;
     }
   }

   class Normal_Java_Bean2 {
     public String text;

     public void setText(String newText){
       text = newText;
     }
     public String getText(){
       return text;
     }
   }


   Now I want to map everything in an 1-to-N-to-N or-mapping.
   That means... What you see... An EJB has a Vector of elements, which have
other Vectors of other Elements.

   Trying to deploy that I receive a NullPointerException ( I think it's
while creating the table for the Normal_Java_Bean2, beacause
Normal_Java_Bean1 has no primary key to map into).

   Tried Map-Mapping, because there is a primary key, to no avail however:

   <map-mapping> can only be used on the types java.util.Map,
java.util.Hashtable, java.util.Properties (not Normal_Java_Bean1)


   HELP!

   Lachezar



Reply via email to