0 Replies Latest reply on Jun 5, 2003 1:02 AM by wangjun188

    avax.ejb.CreateException: Could not create entity:java.sql.S

    wangjun188 Newbie

      I developed a entity ejb,it deploy right,but when I use jsp access it,examples
      ry
      {
      InitialContext ctx=new InitialContext();
      Object objRef=ctx.lookup("custom/Cmp1Custom");
      Cmp1CustomHome home=(Cmp1CustomHome)javax.rmi.PortableRemoteObject.narrow(objRef,Cmp1CustomHome.class);

      Cmp1Custom bean;
      /* util here right */

      bean=home.create("BK009","majun","shanghai");
      execute this ,get a exception:
      javax.ejb.CreateException: Could not create entity:java.sql.SQLException: Try to insert null into a non-nullable column in statement [INSERT INTO CMP1CUSTOM (CustomerID, CompanyName, ContactName) VALUES (NULL, NULL, NULL)]

      The file I had:
      Cmp1Custom
      Cmp1CustomHome
      Cmp1CustomEJB
      ejb-jar.xml
      jboss.xml
      jboss-web.xml
      I user jsp direct access mssqlserver right,but this ejb is not right,How can I solve it?
      thank you!
      wangjun188
      5/6 2003