db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Holtzman" <j...@joshholtzman.com>
Subject getMapBuilder() throws nullpointer exception
Date Thu, 10 Apr 2003 23:23:11 GMT
I am new to Torque, and I'm trying to call save() on a torque object.
This is the result:

runtests:
    [junit] java.lang.NullPointerException
    [junit]     at
com.payvement.metaapp.BaseHTMLControl.save(BaseHTMLControl.java:892)
    [junit]     at
com.payvement.metaapp.MetaAppTest.testSaveAndGet(MetaAppTest.java:31)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    [junit]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
    [junit]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java
:25)
    [junit]     at java.lang.reflect.Method.invoke(Method.java:324)
    [junit]     at junit.framework.TestCase.runTest(TestCase.java:154)
    [junit]     at junit.framework.TestCase.runBare(TestCase.java:127)
    [junit]     at
junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit] .
    [junit]     at
junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]     at junit.framework.TestResult.run(TestResult.java:109)
    [junit]     at junit.framework.TestCase.run(TestCase.java:118)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:208)
    [junit] Time: 0.501

The save() method that Torque generates in the Base object looks like
this:

    public void save() throws Exception
    {
             save(HTMLControlPeer.getMapBuilder()
                .getDatabaseMap().getName());
     }

It appears that getMapBuilder() returns null, hence the null pointer
exception.  Does anyone know why this returns null?  Or better yet, does
anyone know how to fix this?  We're using Torque 3.0 with MySQL.

Thanks all!
Josh


===========================
JOSH HOLTZMAN Web Development
http://joshholtzman.com
josh@joshholtzman.com
===========================


Mime
View raw message