Yeah, finally got it to work after digging into the database.dtd and
figuring out what I needed to turn on.

Is there a doc that tells what all of the fields and attributes do?

If not I would be more than willing to kickstart it...

-warner

----- Original Message -----
From: "Warner Onstine" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 30, 2001 9:52 AM
Subject: Re: error when trying to save through OM object


> Tracked down some config bugs and some scripts not being copied correctly.
> Now I am getting this error when trying to insert:
>
> java.sql.SQLException: General error: Column 'PK_PROJECT_ID' cannot be
null
>
> Now, this is my primary key that I have defined in my database schema. I
was
> under the impression that the turbine id_table was supposed to handle all
> the key stuff (which I had set up similar to scarab, let me know if this
is
> wrong =).
>
> Any help is greatly appreciated.
>
> -warner
>
> ----- Original Message -----
> From: "Warner Onstine" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 29, 2001 10:10 PM
> Subject: error when trying to save through OM object
>
>
> > Hi all,
> > Finally worked through some of the setup stuff and have run into a new
> > problem and was hoping for some help.
> >
> > I have generated some OM classes using torque and have set everything up
> in
> > my Action (which extends VelocityAction) to use a particular OM called
> > Project.
> >
> > Now the Action gets called correctly. I can retrieve the field which I
am
> > referencing on the form now here is where I hit the snag:
> >
> >         Project project = new Project();
> >             try {
> >                 project.setName(projectName);
> >                 project.save("story");
> >             } catch (Exception e) {
> >                 e.printStackTrace();
> >                 data.setMessage("Error while saving :: " +
e.toString());
> >                 throw new Exception("Error while attempting to save.");
> >             }
> >
> > Now "story" is the database (which is also referenced in the
> > TurbineResources.properties file). What happens is the Exception gets
> caught
> > and it is a
> > NullPointerException
> >         at
> >
org.apache.turbine.om.peer.BasePeer.rollBackTransaction(BasePeer.java:366)
> >         at
> com.warneronstine.story.om.BaseProject.save(BaseProject.java:423)
> >         at
> > com.warneronstine.story.actions.AddProject.doInsert(AddProject.java:36)
> >         at java.lang.reflect.Method.invoke(Native Method)
> >         at
> >
>
org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(VelocityA
> > ctionEvent.java:166)
> >         at
> >
>
org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityActionE
> > vent.java:114)
> >
> > Any ideas on what I am doing incorrectly?
> >
> > Turbine 2.1
> > Torque 2.1
> > Velocity 1.2-dev
> > mysql 2.0.4
> >
> > Running on Tomcat 4.0b5
> > Mysql 3.23.36
> > all on Win2k pro
> >
> > Thanks in advance, please let me know if I left anything out.
> >
> > -warner
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to