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]>

Reply via email to