primarykey autho-increment
pls, i'm having problem with ejb create method that has to create an auto increment in mysql database table.
DATABASE TABLE: create table createpincode(id MEDIUMINT NOT NULL AUTO_INCREMENT,seriano char(30) NOT NULL, pincode char(30) NOT NULL,type char(30) NOT NULL, PRIMARY KEY(id));
e.g public void createpins(int pins, String type){
String id=null;
try{
pinlocal=pinhome.create(new Integer(id),serialno,pins,type);
}catch(Exception ex){}
}
the error at the jboss is
Exception in method: public abstract void sessions.NewsessionLocalBusiness.create(int, java.lang.String):
javax.ejb.Exception:null at session.NewsessionBean.createpins2(NewsessionBean. java:271) at sun.reflect.NativemethodAccessorImpl.invoke(unknow n source). what should i do becouse it works fine without the auto_increment primary key.