On 7/2/01 12:11 PM, "John McNally" <[EMAIL PROTECTED]> wrote:
> Do you have lines like the following in your
> TR.propsservices.DatabaseService.database.default=default
>
> services.DatabaseService.database.story.driver=org.gjt.mm.mysql.Driver
> services.DatabaseService.database.story.url=jdbc:mysql://localhost:3306/scarab
> services.DatabaseService.database.story.username=
> services.DatabaseService.database.story.password=
Just a reminder that this is for 2.2 code, these settings won't
work for 2.1.
>
> ?
>
> john mcnally
>
>
> Warner Onstine wrote:
>>
>> 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]
--
jvz.
Jason van Zyl
http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]