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
Date Wed, 03 Dec 2003 18:31:57 GMT
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.connectionWaitTimeout=10
> > torque.dsfactory.T0064.connection.driver = 
> > com.ibm.as400.access.AS400JDBCDriver
> > torque.dsfactory.T0064.connection.url =
> > jdbc:as400://asmctest/t0064
> > torque.dsfactory.T0064.connection.user = T0064 
> > torque.dsfactory.T0064.connection.password =
> password
> > 
> > ----------------------------------------------
> > 
> > Again tables are created but can't insert data.
> Get the 
> > following exceptions:
> > 
> > 
> > 
> > 265 [main] DEBUG dsfactory.TorqueDataSourceFactory
>  - Setting 
> > datasource property: url
> > 281 [main] DEBUG dsfactory.TorqueDataSourceFactory
>  - Setting 
> > datasource property: user
> > 281 [main] DEBUG dsfactory.TorqueDataSourceFactory
>  - Setting 
> > datasource property: password
> > 281 [main] DEBUG dsfactory.TorqueDataSourceFactory
>  - 
> > Starting initTorqueClassic
> > 296 [main] DEBUG dsfactory.TorqueDataSourceFactory
>  - Setting 
> > datasource property: defaultMaxConnections
> > 312 [main] DEBUG dsfactory.TorqueDataSourceFactory
>  - Setting 
> > datasource property: maxExpiryTime
> > 343 [main] DEBUG dsfactory.TorqueDataSourceFactory
>  - Setting 
> > datasource property: connectionWaitTimeout
> > 359 [main] DEBUG torque.Torque  - Adding a dummy
> entry for 
> > default, mapped onto T0064
> > 421 [Thread-0] DEBUG oid.IDBroker  - IDBroker
> thread was started.
> > java.sql.SQLException: [SQL0104] Token ) was not
> valid. Valid 
> > tokens: DAY PATH YEAR LABEL MONTH OPTION RESULT
> CONNECTION 
> > TRANSACTION.
> > 	at
> >
>
com.ibm.as400.access.JDError.throwSQLException(JDError.java:388)
> > 	at
> >
>
com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDB
> > CStatement.java:1088)
> > 	at
> >
>
com.ibm.as400.access.AS400JDBCPreparedStatement.<init>(AS400JD
> > BCPreparedStatement.java:208)
> > 	at
> >
>
com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS40
> > 0JDBCConnection.java:1419)
> > 	at
> >
>
com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS40
> > 0JDBCConnection.java:1371)
> > 	at
> >
>
org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl.prepa
> > reStatement(PooledConnectionImpl.java:271)
> > 	at
> >
>
org.apache.commons.dbcp.cpdsadapter.ConnectionImpl.prepareStat
> > ement(ConnectionImpl.java:372)
> > 	at
> >
>
com.workingdogs.village.Record.saveWithInsert(Unknown
> > Source)
> > 	at com.workingdogs.village.Record.save(Unknown
> > Source)
> > 	at com.workingdogs.village.Record.save(Unknown
> > Source)
> > 	at
> >
>
org.apache.torque.util.BasePeer.insertOrUpdateRecord(BasePeer.
> > java:891)
> > 	at
> >
>
org.apache.torque.util.BasePeer.doInsert(BasePeer.java:725)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeamPeer.doInsert(BaseTeamPeer.java:213)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeamPeer.doInsert(BaseTeamPeer.java:559)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeam.save(BaseTeam.java:1072)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeam.save(BaseTeam.java:1034)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeam.save(BaseTeam.java:1014)
> > 	at
> >
>
com.suz.torque.PitcherStats.main(PitcherStats.java:40)
> > rethrown as org.apache.torque.TorqueException:
> > [SQL0104] Token ) was not valid. Valid tokens: DAY
> PATH YEAR 
> > LABEL MONTH OPTION RESULT CONNECTION TRANSACTION.
> > 	at
> >
>
org.apache.torque.util.BasePeer.insertOrUpdateRecord(BasePeer.
> > java:895)
> > 	at
> >
>
org.apache.torque.util.BasePeer.doInsert(BasePeer.java:725)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeamPeer.doInsert(BaseTeamPeer.java:213)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeamPeer.doInsert(BaseTeamPeer.java:559)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeam.save(BaseTeam.java:1072)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeam.save(BaseTeam.java:1034)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeam.save(BaseTeam.java:1014)
> > 	at
> >
>
com.suz.torque.PitcherStats.main(PitcherStats.java:40)
> > rethrown as org.apache.torque.TorqueException:
> > [SQL0104] Token ) was not valid. Valid tokens: DAY
> PATH YEAR 
> > LABEL MONTH OPTION RESULT CONNECTION TRANSACTION.
> > 	at
> >
>
org.apache.torque.util.BasePeer.doInsert(BasePeer.java:729)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeamPeer.doInsert(BaseTeamPeer.java:213)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeamPeer.doInsert(BaseTeamPeer.java:559)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeam.save(BaseTeam.java:1072)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeam.save(BaseTeam.java:1034)
> > 	at
> >
>
com.suz.torque.pitchers.BaseTeam.save(BaseTeam.java:1014)
> 
=== message truncated ===


__________________________________
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