db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caoilte O'Connor ...@caoilte.org>
Subject Re: Problems with save() method with Peer class
Date Thu, 07 Aug 2003 14:34:54 GMT
probably just a configuration problem, but worth noting I've 
had that problem (or something very similar) ever since I 
started using torque. 

I've never been able to find out from anyone official what's 
causing it, but I suspect its a problem (for me) that 
sneaks in when my torque setup is serialized during a 
tomcat restart/ schema change. (I use postgresql)

If there isn't just something stupid wrong with your 
Torque.properties file I solved it by doing this just after 
I initialised Torque,

CustomerMapBuilder customerBuilder = 
	new CustomerMapBuilder();
customerBuilder.doBuild();

ie rebuild the offending map.

i also did this in my copy of Torque.java initialize(c) 
function and recompiled,

if (mapBuilders == null) 
  mapBuilders = 
    Collections.synchronizedList(new ArrayList());

I'd love to know if there's a better solution / official 
reason. 

I'm using 3.0.2 and torque standalone with struts,

c


On Thursday 07 August 2003 15:21, Matt Reath wrote:
> I have a Customer table in a mysql database. The torque
> build process creates the database, tables, and source
> code with no error. When I call the customer class:
>
> Customer customer = new Customer();
> .
> .
> .
> customer.save();
>
> I get a java.lang.NullPointerException when I call the
> save method. I narrowed it down to the getMapBuilder()
> method. I can create a CustomerMapBuilder object and then
> call the getDatabaseMap() function but it gives me
> java.lang.NullPointerException. I've been trying to hunt
> the problem down but it seems to be in the torque code
> itself. I've attached my config files.
>
> If anybody could help me get this working that would be
> great.
>
> Matthew Reath
> Integration Engineer
> Cable Constructors, Inc.
> 105 Kent Street
> Iron Mountain, MI 49801
> Phone: (906) 774-6621 x2134
> Fax: (906) 774-9120
> Email: matt.reath@cciinc.us
> Web: http://www.cciinc.us


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