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]

Reply via email to