4 Replies Latest reply on Jul 26, 2004 11:03 AM by Bryan Rank

    Try to insert null into a non-nullable column...

    themuppeteer Newbie

      Hello guys,

      I'm making a game and I want to store the playfield (a 3 dimensional array of ints) into an entity bean. The bean has nothing more than a levelname (primary key) and playfield.
      (I work with the hypersonic db.)
      Therefore I created an object (I called it 'ground') that implements serializable wherein there is nothing more then my int[][][]map.
      When I try to add this into my entity bean , I get the error:

      14:19:10,734 ERROR [PlayField] Could not create entity

      java.sql.SQLException: Try to insert null into a non-nullable column in statement [INSERT INTO PLAYFIELD (ground) VALUES ('aced0005737200246f72672e6a626f73732e696e766f636174696f6e2e4d61727368616c6c656456616c7565eacce0d1f44ad0990c0000787077f4000000ecaced00057372000e6d6f65686168612e47726f756e64dd4497af6b6d15c40200015b00036d61707400165b5b5b4c6a6176612f6c616e672f496e74656765723b7870757200165b5b5b4c6a6176612e6c616e672e496e74656765723b46a4b16820df1cdf020000787000000002757200155b5b4c6a6176612e6c616e672e496e74656765723b5018476137e7175b020000787000000002757200145b4c6a6176612e6c616e672e496e74656765723bfe97ada00183e21b020000787000000001707571007e000700000001707571007e0005000000027571007e000700000001707571007e000700000001708f18b23b78')]

      at org.hsqldb.Trace.getError(Unknown Source)


      How comes ? It says it can't be null, but it isn't since you can see the values that are in 'ground'.

      I have found this question before on the internet but never with an answer.
      I hope I will get one here.
      Any hints are highly appreciated since I'm completely stuck... :(

      Best regards,
      themuppeteer