db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sonu Vijay <son...@yahoo.com>
Subject Re: R: R: Newbie - Torque with DB2/AS400 new info
Date Wed, 03 Dec 2003 19:01:57 GMT
Giulio,

I was trying to run an init command thru my program
and it was giving all those SQL Exceptions. init
command basically adds a list of teams to the TEAM
table.
Another command is like "add Jamie Martin Whitesox"
which adds Jamie Martin in the PITCHERS table and
makes his team to be Whitesox (which is a foreign
key). Since Whitesox or any other team wasn't there in
the select and the subsequent insert failed and I
could see the Select SQL being used in the stack
trace.

Then I manually entered the WhiteSox team in the TEAM
table and tried adding a pitcher again. Here is what I
get now, does this ring any bells :

34 [main] DEBUG dsfactory.TorqueDataSourceFactory  -
Setting datasource property: url
250 [main] DEBUG dsfactory.TorqueDataSourceFactory  -
Setting datasource property: user
250 [main] DEBUG dsfactory.TorqueDataSourceFactory  -
Setting datasource property: password
250 [main] DEBUG dsfactory.TorqueDataSourceFactory  -
Starting initTorqueClassic
250 [main] DEBUG dsfactory.TorqueDataSourceFactory  -
Setting datasource property: defaultMaxConnections
265 [main] DEBUG dsfactory.TorqueDataSourceFactory  -
Setting datasource property: maxExpiryTime
297 [main] DEBUG dsfactory.TorqueDataSourceFactory  -
Setting datasource property: connectionWaitTimeout
297 [main] DEBUG torque.Torque  - Adding a dummy entry
for default, mapped onto t0064
359 [Thread-0] DEBUG oid.IDBroker  - IDBroker thread
was started.
969 [main] DEBUG util.BasePeer  - SELECT TEAM.TEAM_ID,
TEAM.TEAM_NAME FROM TEAM WHERE
TEAM.TEAM_NAME='Whitesox'
1172 [main] DEBUG util.BasePeer  - Elapsed time=203 ms
org.apache.torque.TorqueException: IdGenerator for
table 'PITCHER' is null
	at
org.apache.torque.util.BasePeer.doInsert(BasePeer.java:690)
	at
com.suz.torque.pitchers.BasePitcherPeer.doInsert(BasePitcherPeer.java:220)
	at
com.suz.torque.pitchers.BasePitcherPeer.doInsert(BasePitcherPeer.java:570)
	at
com.suz.torque.pitchers.BasePitcher.save(BasePitcher.java:762)
	at
com.suz.torque.pitchers.BasePitcher.save(BasePitcher.java:724)
	at
com.suz.torque.pitchers.BasePitcher.save(BasePitcher.java:704)
	at
com.suz.torque.PitcherStats.main(PitcherStats.java:105)
















--- Sonu Vijay <sonupv@yahoo.com> wrote:
> Yeah its kinda tricky. I was thinking that since
> AS400
> support is there in Torque, there might be some way
> to
> make it work.
> I'm still trying  to make sure all cases are fine
> and
> stuff. But not sure if I'm going in the right
> direction
> 
> Vijay
> 
> 
> --- Giulio Vezzelli <giulio.vezzelli@infolog.it>
> wrote:
> > I suppose the statement Torque tries to execute is
> > malformed in AS/400's manners...
> > 
> > We should need to see the exact SQL which Torque
> > executes...
> > 
> > 
> > Giulio Vezzelli
> > Infolog S.r.l.
> > Via Alfieri, 28
> > Modena - 41100
> > Telefono : +39-059-822446
> > Sito web : http://www.infolog.it
> > E-mail : giulio.vezzelli@infolog.it
> >  
> >  
> > 
> > > -----Messaggio originale-----
> > > Da: Sonu Vijay [mailto:sonupv@yahoo.com] 
> > > Inviato: mercoledý 3 dicembre 2003 19.19
> > > A: Apache Torque Users List
> > > Oggetto: Re: R: Newbie - Torque with DB2/AS400 
> > > 
> > > Thanks for your reply. I tried to do the same
> and
> > now I tried 
> > > to use the example schema given in an article on
> > Torque 
> > > website. Here is the part from my
> > Torque.properties, where 
> > > T0064 in my library.:
> > > 
> > > ---------------------------------
> > > torque.database.default=T0064
> > > torque.database.T0064.adapter=db2app
> > > 
> > > ## Using torque's old pool
> > >
> >
>
torque.dsfactory.T0064.factory=org.apache.torque.dsfactory.Tor
> > > queDataSourceFactory
> > >
> >
> torque.dsfactory.T0064.pool.defaultMaxConnections=10
> > > torque.dsfactory.T0064.pool.maxExpiryTime=3600
> > >
> >
> torque.dsfactory.T0064.pool.

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.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