createException problem
skaari Oct 2, 2004 8:44 AMHello
I really don't know what I'm doing wrong, but I get the following createException():
Does anybody know what I'm doing wrong?
13:42:07,375 ERROR [ServerSettingsEJB] Could not create entity
java.sql.SQLException: Column count does not match in statement [INSERT INTO SERVERSETTINGSEJB (id, smtpServer, popAuthentication, popServer, popUserName, popPassword) VALUES (?, ?, ?, ?, ?, ?)]
I have the following code:
public abstract class ServerSettingsBean implements EntityBean {
public String ejbCreate(String smtpServer,String popAuthentication, String popServer, String popUserName, String popPassword) throws CreateException{ setId(KeyGenerator.getNewKey());
 setSmtpServer(smtpServer);
 setPopAuthentication(popAuthentication);
 setPopServer(popServer);
 setPopUserName(popUserName);
 setPopPassword(popPassword);
 return null;
 } (and of course according postcreate())
// key manipulation methods
 public abstract String getId();
 public abstract void setId(String id);
 // persistent fields
public abstract String getSmtpServer();
public abstract void setSmtpServer( String smtpServer );
public abstract String getPopServer();
public abstract void setPopServer( String popServer );
public abstract String getPopUserName();
public abstract void setPopUserName( String popUserName );
public abstract String getPopAuthentication();
public abstract void setPopAuthentication(String popAuthentication);
public abstract String getPopPassword();
public abstract void setPopPassword( String popPassword );
}
public interface ServerSettingsHomeLocal extends EJBLocalHome {
public ServerSettingsLocal create(String smtpServer,String popAuthentication, String popServer, String popUserName, String popPassword) throws CreateException;
 <ejb-name>ServerSettingsEJB</ejb-name>
 <local-home>org.bfh.hti.ben.ejb.ServerSettingsHomeLocal</local-home>
 org.bfh.hti.ben.ejb.ServerSettingsLocal
 <ejb-class>org.bfh.hti.ben.ejb.ServerSettingsBean</ejb-class>
 <persistence-type>Container</persistence-type>
 <prim-key-class>java.lang.String</prim-key-class>
 false
 <cmp-version>2.x</cmp-version>
 <abstract-schema-name>ServerSettings</abstract-schema-name>
 <cmp-field>
 <field-name>id</field-name>
 </cmp-field>
 <cmp-field>
 <description xml:lang="de">no description
 <field-name>smtpServer</field-name>
 </cmp-field>
 <cmp-field>
 <description xml:lang="de">no description
 <field-name>popAuthentication</field-name>
 </cmp-field>
 <cmp-field>
 <description xml:lang="de">no description
 <field-name>popServer</field-name>
 </cmp-field>
 <cmp-field>
 <description xml:lang="de">no description
 <field-name>popUserName</field-name>
 </cmp-field>
 <cmp-field>
 <description xml:lang="de">no description
 <field-name>popPassword</field-name>
 </cmp-field>
 <primkey-field>id</primkey-field>
 <security-identity>
 <use-caller-identity/>
 </security-identity>