hi,

i had a similar problem. but i used an old version of torque, i got it
to work with the dev version now. see other post for steps.

bye
fabian

On Sat, 2002-01-19 at 19:26, Stefan Krause wrote:
> Hi,
> 
> I use torque in the stand-alone version and I try to insert data into a
> database table.
> I use mysql. The peer classes are created. I compiled my test class
> "DBTest" succesfully.
> My database table to insert exists and is called "Contributor".
> Here is the code:
> 
> package org.openscience.nmrshiftdb;
> 
> public class DBTest
> {
>       public static void main(String args[])
>       {
>               Contributor con = new Contributor();
>               con.setFirstName("name");
>               con.setLastName("name");
>               con.setZipCode(1234);
>               try
>               {
>                       ContributorPeer.doInsert(con);
>                       con.save();
>               }
>               catch (Exception exc)
>               {
>               }
>       }
> }
> 
> When I do run I get the following exception:
> 
> run:
>      [java] Exception in thread "main"
> java.lang.ExceptionInInitializerError: java.lang.NullPointerException
>      [java]   at
> org.apache.torque.util.BasePeer.getMapBuilder(BasePeer.java:1922)
>      [java]   at
> org.opensience.nmrshiftdb.BaseContributorPeer.<clinit>(BaseContributorPeer.java:29)
>      [java]   at org.opensience.nmrshiftdb.DBTest.main(DBTest.java:36)
>      [java] Java Result: 1
> 
> Is it because it can't find the BasePeer class?
> I would be grateful for an advice.
> Thanks in advance.
> 
> Stefan
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 



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

Reply via email to