db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andras Balogh <and...@reea.net>
Subject Re: Sybase error
Date Mon, 29 Mar 2004 07:06:52 GMT
    Hello Derek,

    I think you have the same problem as i did a long time ago, the
com.workingdogs.village.Column.readonly() method
always returns true and the update statement is not built correcty.
    See my post about the problems i had :
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=torque-user@db.apache.org&msgId=368929

I think your problem will go away if you take the village sources:
http://share.whichever.com/index.php?SCREEN=village
modify the above mentioned readonly() method to return false and rebuild 
the village.jar file.


Best wishes,
Andras.

Derek B. Greer wrote:

> I'm having difficulty getting the bookstore example working with 
> Sybase Anywhere.  I ran across
> http://wiki.apache.org/db-torque/TutorialErrata which suggested using 
> some torque.dsfactory settings.
> Adding in these settings cleared up a few things, but I'm still 
> getting errors.  If someone has this example
> working on Windows with Sybase Anywhere, please post your config 
> files.  Otherwise, if anyone can
> point out what's going wrong here please help.  Here is my current 
> Torque.properties and the resulting barf:
>
> ---------------------------------------------------------------------
> log4j.rootCategory = DEBUG, default
> log4j.appender.default = org.apache.log4j.FileAppender
> log4j.appender.default.file = ./torque.log
> log4j.appender.default.layout = org.apache.log4j.SimpleLayout
>
> torque.database.default = bookstore
> torque.database.bookstore.driver = com.sybase.jdbc2.jdbc.SybDriver
> torque.database.bookstore.url = jdbc:sybase:Tds:localhost:49153/bookstore
> torque.database.bookstore.username = dba
> torque.database.bookstore.password = sql
>
> torque.database.bookstore.adapter=sybase
> torque.dsfactory.bookstore.factory= 
> org.apache.torque.dsfactory.SharedPoolDataSourceFactory
> torque.dsfactory.bookstore.pool.defaultMaxActive=30
> torque.dsfactory.bookstore.pool.testOnBorrow=true
> torque.dsfactory.bookstore.pool.validationQuery=SELECT 1
> torque.dsfactory.bookstore.connection.driver = 
> com.sybase.jdbc2.jdbc.SybDriver
> torque.dsfactory.bookstore.connection.url = 
> jdbc:sybase:Tds:localhost:49153/bookstore
> torque.dsfactory.bookstore.connection.user = dba
> torque.dsfactory.bookstore.connection.password = sql
> ---------------------------------------------------------------------
>
>
> [DEBUG] TorqueInstance - 
> -init(c:/eclipse/workspace/torque-example/schema/Torque.properties)
> [DEBUG] TorqueInstance - -Config Object is 
> org.apache.commons.configuration.PropertiesConfiguration@b89838
> [DEBUG] TorqueInstance - 
> -init(org.apache.commons.configuration.PropertiesConfiguration@b89838)
> [DEBUG] TorqueInstance - 
> -setConfiguration(org.apache.commons.configuration.PropertiesConfiguration@b89838) 
>
> [DEBUG] TorqueInstance - -initialize()
> [DEBUG] TorqueInstance - 
> -setConfiguration(org.apache.commons.configuration.BaseConfiguration@111a3ac) 
>
> [DEBUG] TorqueInstance - 
> -initAdapters(org.apache.commons.configuration.BaseConfiguration@111a3ac)
> [DEBUG] TorqueInstance - -Adding sybase -> bookstore as Adapter
> [DEBUG] TorqueInstance - 
> -initDataSourceFactories(org.apache.commons.configuration.BaseConfiguration@111a3ac)

>
> [DEBUG] TorqueInstance - -handle: bookstore DataSourceFactory: 
> org.apache.torque.dsfactory.SharedPoolDataSourceFactory
> [DEBUG] AbstractDataSourceFactory - -Starting initCPDS
> [DEBUG] TorqueInstance - -getConfiguration() = 
> org.apache.commons.configuration.BaseConfiguration@111a3ac
> [DEBUG] AbstractDataSourceFactory - -applyConfiguration(null, 
> org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@1e0be38)
> [DEBUG] AbstractDataSourceFactory - 
> -applyConfiguration(org.apache.commons.configuration.BaseConfiguration@1e859c0, 
> org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@1e0be38)
> [DEBUG] ConvertUtils - -Convert string 
> 'com.sybase.jdbc2.jdbc.SybDriver' to class 'java.lang.String'
> [DEBUG] AbstractDataSourceFactory - 
> -setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@1e0be38, 
> driver, com.sybase.jdbc2.jdbc.SybDriver)
> [DEBUG] ConvertUtils - -Convert string 
> 'jdbc:sybase:Tds:localhost:49153/bookstore' to class 'java.lang.String'
> [DEBUG] AbstractDataSourceFactory - 
> -setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@1e0be38, 
> url, jdbc:sybase:Tds:localhost:49153/bookstore)
> [DEBUG] ConvertUtils - -Convert string 'dba' to class 'java.lang.String'
> [DEBUG] AbstractDataSourceFactory - 
> -setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@1e0be38, 
> user, dba)
> [DEBUG] ConvertUtils - -Convert string 'sql' to class 'java.lang.String'
> [DEBUG] AbstractDataSourceFactory - 
> -setSimpleProperty(org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS@1e0be38, 
> password, sql)
> [DEBUG] SharedPoolDataSourceFactory - -Starting initJdbc2Pool
> [DEBUG] TorqueInstance - -getConfiguration() = 
> org.apache.commons.configuration.BaseConfiguration@111a3ac
> [DEBUG] AbstractDataSourceFactory - -applyConfiguration(null, 
> org.apache.commons.dbcp.datasources.SharedPoolDataSource@5e3974)
> [DEBUG] AbstractDataSourceFactory - 
> -applyConfiguration(org.apache.commons.configuration.BaseConfiguration@df503, 
> org.apache.commons.dbcp.datasources.SharedPoolDataSource@5e3974)
> [ERROR] AbstractDataSourceFactory - -Property: defaultMaxActive value: 
> 30 is not supported by DataSource: 
> org.apache.commons.dbcp.datasources.SharedPoolDataSource
> [DEBUG] ConvertUtils - -Convert string 'true' to class 'boolean'
> [ERROR] AbstractDataSourceFactory - -Property: testOnBorrow value: 
> true is not supported by DataSource: 
> org.apache.commons.dbcp.datasources.SharedPoolDataSource
> [DEBUG] ConvertUtils - -Convert string 'SELECT 1' to class 
> 'java.lang.String'
> [ERROR] AbstractDataSourceFactory - -Property: validationQuery value: 
> SELECT 1 is not supported by DataSource: 
> org.apache.commons.dbcp.datasources.SharedPoolDataSource
> [DEBUG] TorqueInstance - -Adding a dummy entry for default, mapped 
> onto bookstore
> [DEBUG] TorqueInstance - -getConfiguration() = 
> org.apache.commons.configuration.BaseConfiguration@111a3ac
> [DEBUG] IDBroker - -IDBroker thread was started.
> [DEBUG] IDBroker - -Forced id retrieval - no available list
> [DEBUG] IDBroker - -updateQuantity: UPDATE ID_TABLE SET QUANTITY = 10 
> WHERE TABLE_NAME = 'author'
> [DEBUG] IDBroker - -updateNextId: UPDATE ID_TABLE SET NEXT_ID = 1080 
> WHERE TABLE_NAME = 'author'
> com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -131: Syntax error 
> near ')' on line 1
>    at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2538)
>    at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1922)
>    at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
>    at 
> com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
>    at 
> com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
>    at 
> com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1611)
>    at 
> com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1594)
>    at 
> com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:89)

>
>    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:899)
>    at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:742)
>    at com.fedex.fsme.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:215)
>    at com.fedex.fsme.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:561)
>    at com.fedex.fsme.BaseAuthor.save(BaseAuthor.java:571)
>    at com.fedex.fsme.BaseAuthor.save(BaseAuthor.java:535)
>    at com.fedex.fsme.BaseAuthor.save(BaseAuthor.java:515)
>    at com.fedex.fsme.test.Test.main(Test.java:37)
> rethrown as org.apache.torque.TorqueException: ASA Error -131: Syntax 
> error near ')' on line 1
>    at 
> org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:236)
>    at 
> org.apache.torque.util.BasePeer.insertOrUpdateRecord(BasePeer.java:903)
>    at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:742)
>    at com.fedex.fsme.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:215)
>    at com.fedex.fsme.BaseAuthorPeer.doInsert(BaseAuthorPeer.java:561)
>    at com.fedex.fsme.BaseAuthor.save(BaseAuthor.java:571)
>    at com.fedex.fsme.BaseAuthor.save(BaseAuthor.java:535)
>    at com.fedex.fsme.BaseAuthor.save(BaseAuthor.java:515)
>    at com.fedex.fsme.test.Test.main(Test.java:37)
> Caused by: com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -131: 
> Syntax error near ')' on line 1
>    at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2538)
>    at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1922)
>    at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
>    at 
> com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
>    at 
> com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
>    at 
> com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1611)
>    at 
> com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1594)
>    at 
> com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatement.java:89)

>
>    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:899)
>    ... 7 more
> Exception in thread "main"
>
>
>
>
>
> Derek Greer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>



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