db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gedin Frederic <frederic.ge...@jaluna.com>
Subject Re: getMapBuilder() throws nullpointer exception
Date Fri, 11 Apr 2003 04:33:34 GMT
Maybe should you investigate the way you configured torque to use the 
database.

Could you check if the class HTMLControlMapBuilder exists in package 
......om.map and has the static variable CLASS_NAME well defined?
If no, the you should investigate your schema or your build.properties

Hope this will help you find your way

Frederic


Josh Holtzman a écrit:

>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
>===========================
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
>For additional commands, e-mail: torque-user-help@db.apache.org
>
>  
>




Mime
View raw message