Can you post your <middlegen> task invocation source? Aslak
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > [EMAIL PROTECTED] > Sent: 9. januar 2003 21:30 > To: [EMAIL PROTECTED] > Subject: [Middlegen-user] FYI, guid=false generates invalid INSERT SQL > > > > > > > If you set guid="false" in middlegen's cmp20 tag, you can turn off > automatic primary key generation (what I was trying to do w/ my > Users simple sample. However, the method to instantiate an EJB is > wrong doesn't include the primary key in the method: > > public java.lang.String ejbCreate( java.lang.String password, > java.lang.String accessLevel, java.lang.String email ) > > In this case, it should have included username which was my primary > key. > > On the Struts "new user" form that is automatically generated, I see a > username, > password, and email. However, when you put text in username and > password, you'll > see this on your J2EE server (I'm using JBoss): > > at java.lang.Thread.run(Thread.java:536) > 14:55:11,359 ERROR [Engine] ActionServlet: Create error > javax.ejb.CreateException: Could not create > entity:java.sql.SQLException: Try to > insert null into a non-nullable column in statement [INSERT INTO > USERS (Usernam > e, Password, AccessLevel, Email) VALUES (NULL, 'pw', '', '')] > at > org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(J > DBCCreateEntityCommand.java:199) > at > org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCr > eateEntityCommand.java:131) > > You can see that the INSERT statement is missing the username field > which is > the primary key. > > I'll file this as a bug as well. Just wanted to let folks know in > case they > try something like this. > > > ken > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > middlegen-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/middlegen-user ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user
