I refered to the persistent field named 'id' (since using getId() and setId()).
/L
torsdagen den 17 oktober 2002 kl 13.35 skrev Alex Loubyansky:
LP> Don't use long for your id, use Long instead. Following xdoclet, the key is of type String. Sometimes, field named 'id' is not a primary key :) Probably, JBossCMP was also suprised by it and threw the exception :)alex LP> Else you will have this LP> error each time you have null in database for the id field. LP> /Lennart LP> torsdagen den 17 oktober 2002 kl 12.31 skrev Jon Haugsand:Running JBoss 3.0.2 with a fairly trivial entity bean: /** * @ejb:interface-method view-type="both" * @ejb:persistent-field */ public abstract long getId(); /** */ public abstract void setId( long id ); /** * @ejb:interface-method */ public abstract void setNavn(String v); /** * @ejb:interface-method * @ejb:persistent-field * @ejb:pk-field */ public abstract String getNavn(); Sometimes the findByPrimaryKey returns NullPointerException. Has anyone experimented something similarly? -- Jon Haugsand, <[EMAIL PROTECTED]> Norges Bank, <http://www.norges-bank.no>-- Best regards, Alex Loubyansky ------------------------------------------------------- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfm _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
------------------------------------------------------- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfm _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
