db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Bug: NullpointerException in Base<table>Manager
Date Sun, 30 Nov 2003 19:36:29 GMT
Hi all,

Out of the blue, my torque application has suddenly decided to bomb out 
with a NullPointerException when saving a specific object to the database.

The bombout occurs in the generated code Base<Table>Manager.java, where 
on about line 145, it says this:

     public static void putInstance(Persistent om)
         throws TorqueException
145:        getManager().putInstanceImpl(om);

 From the above, I conclude that getManager() is returning null. This is 
defined as:

      * Retrieves an implementation of the manager, based on the settings in
      * the configuration.
      * @return an implementation of NotedebitcreditManager.
     public static NotedebitcreditManager getManager()
         return (NotedebitcreditManager)

 From this, Torque.getManager() is returning null.

Question 1: Under what cicumstances can the above function return null, 
so that I can try and prevent those circumstances happening, and

Question 2: What can be done to ensure this function never returns null, 
but rather throws a descriptive exception instead?

I tried to check whether this bug was present in scarab, but scarab is down.

I am using torque and torque-gen v3.1 as published at 


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message