[DB Torque Wiki] Updated: TutorialErrata
Hi, I'm getting this error even I'm using the same propertie file I did use before and was working. The error message is: IDBroker is being used with db 'geniedb', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation. ---Error---Connection object was null. This could be due to a misconfiguration of the DataSourceFactory. Please can someone tell me what it is wrang, and how to solve the probleme. Thank you in advance. Sincerly. Aha. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2005-02-05T16:58:14 Editor: JimRoycroft Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -4,3 +4,24 @@ +The example at the bottom of the Peers Howto (On Criterion) should probably read like this: + + + +Criteria crit = new Criteria(); + +Criteria.Criterion a1 = crit.getNewCriterion(ABC.A, new Integer(1), Criteria.LESS_THAN); + +Criteria.Criterion b2 = crit.getNewCriterion(ABC.B, new Integer(2), Criteria.GREATER_THAN); + +Criteria.Criterion a5 = crit.getNewCriterion(ABC.A, new Integer(5), Criteria.GREATER_THAN); + +Criteria.Criterion b3 = crit.getNewCriterion(ABC.B, new Integer(3), Criteria.LESS_THAN); + +crit.add(a1.and(b2).or(a5.and(b3))); + + + +Note the conversion from int to Object in the Criterion. - JR (my first edit!) + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-08-19T21:41:40 Editor: ScottEade <[EMAIL PROTECTED]> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata The tutorial update has addressed all of the problems previously listed. Change Log: -- @@ -1,132 +1,6 @@ -= The existing Tutorial should be used with Torque-3.0! = += The Tutorial has been updated for Torque-3.1! = -If someone would like to indicate updates that are necessary to bring the tutorial up to the latest release then please note your findings here. +If you find any problems with the Tutorial you can list them below. -I tried to follow the tutorial on the torque web site. It worked very well except for the following issues, which I had difficulties with: - * It took me a while to figure out that I should have downloaded torque-gen as well as torque itself in step 1 (Ok, the link points at a directory where both files are listed, but a short hint for the stupid cannot hurt ;-)). It seems that the tutorial is not yet adapted to the situation of a separate generator. Some files which are said to be in the root of torque are actually located in the root of torque-gen. - * Also, it would be worth while mentioning that one should call {{{Torque.init(path_to_config_file)}}} at the start of the java code, before one starts using torque classes. - --- ThomasFischer in [http://nagoya.apache.org/scarab/issues/id/TRQD26 TRQD26] - - - - -= Towards a tutorial for Torque-CVS = - -I just got the CVS version of Torque to generate XML schema from my running db, so I will post some things that I think might be nice to have in a tutorial. - - * the directory structure is nothing like that listed in any of the docs, which is really vexing - * so I used maven, that seeming to be the thing to do, and because I couldn't find the files to modify to go the ant route. - * In retrospect, maven use could be pretty painless, except for the following problem that kept tripping me up. If I did the following:{{{ -cd db-torque -maven install:plugin -maven torque:jdbc -}}} - - Then I would get an error, as the maven plugin could not find the source for my org.postgres.Driver. The only fix I could figure out was to directly edit {{{~/.maven/plugins/maven-torque-plugin-3.2/project.xml}}} and insert the following dependecy node: {{{ - - postgresql - 7.4.1-jdbc3 - -root - - -}}} - - I could not get this dependency to stick by editing any of the project.xml files in db-torque, nor in {{{myproject/project.xml}}}. After adding that hack, the following worked: {{{ -mkdir newproject -cd newproject -[create project.xml] -mkdir -p src/schema -touch src/schema/schema.xml -maven torque:jdbc -}}} producing the following output (with my server name changed) {{{ -| \/ |__ _Apache__ ___ -| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ -|_| |_\__,_|\_/\___|_||_| v. 1.0-rc1-SNAPSHOT - -torque:init: - -torque:jdbc: -[torque-jdbc-transform] Torque - JDBCToXMLSchema starting -[torque-jdbc-transform] Your DB settings are: -[torque-jdbc-transform] driver : org.postgresql.Driver -[torque-jdbc-transform] URL : jdbc:postgresql://your.server.com:5432/tracer -[torque-jdbc-transform] user : susieq -[torque-jdbc-transform] schema : -[torque-jdbc-transform] DB driver sucessfuly instantiated -[torque-jdbc-transform] DB connection established -[torque-jdbc-transform] Getting table list... -[torque-jdbc-transform] Building column/table map... -[torque-jdbc-transform] Processing table: arbitrary_points -[torque-jdbc-transform] Processing table: geometry_columns -[torque-jdbc-transform] Processing table: gps_obs -[torque-jdbc-transform] Processing table: gps_segment -[torque-jdbc-transform] Processing table: gps_trace -[torque-jdbc-transform] Processing table: spatial_ref_sys -[torque-jdbc-transform] /home/susieq/javawork/newproject/src/schema/schema.xml -[torque-jdbc-transform] Torque - JDBCToXMLSchema finished -BUILD SUCCESSFUL -Total time: 12 seconds -Finished at: Wed Mar 17 16:25:13 PST 2004 -}}} - - - -= I suppose Torque.properties in the tutorial should be updated? = - -I've spend a day figuring out what's wrong with the Bookstore example (I used torque-3.1.tar.gz and torque-gen-3.1.tar.gz) as I always get the following error messages: -{{{ -[WARN] IDBroker - -IDBroker is being used with db 'bookstore', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation. Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database. -java.lang.NullPointerException: There was no DataSourceFactory configured for the connection bookstore - -}}} - -My original '''Torque.prope
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-07-07T15:46:42 Editor: 213.39.130.142 <> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -116,3 +116,17 @@ Then I could run the bookstore example. I'm not too sure if this type of configuration should be mention in the tutorial but it sure works for me. Thanks += Another reason for "... no DataSourceFactory configured ..." = + +I am using SAPDB had some problems to get my test application running. The reason was that some code uses upper case. So, when my database property is: +{{{ +torque.database.default=foo +}}} + +I have to use upper case in all other properties: +{{{ +torque.dsfactory.FOO.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory +... +}}} + +At least it works for me now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-20T18:41:42 Editor: DomSiroros <[EMAIL PROTECTED]> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -77,7 +77,7 @@ = I suppose Torque.properties in the tutorial should be updated? = -I've spend a day figuring out what's wrong with the BookStore example (I used torque-3.1.tar.gz and torque-gen-3.1.tar.gz) as I always get the following error messages: +I've spend a day figuring out what's wrong with the Bookstore example (I used torque-3.1.tar.gz and torque-gen-3.1.tar.gz) as I always get the following error messages: {{{ [WARN] IDBroker - -IDBroker is being used with db 'bookstore', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation. Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database. java.lang.NullPointerException: There was no DataSourceFactory configured for the connection bookstore - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-20T18:40:15 Editor: DomSiroros <[EMAIL PROTECTED]> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -77,9 +77,7 @@ = I suppose Torque.properties in the tutorial should be updated? = -Regarding torque-3.1.tar.gz and torque-gen-3.1.tar.gz, someone mention in the mailing list that we suppose to merge the two packages which answered many mysteries I encountered. - -I've also spend a day figuring out what's wrong with my code in the bookstore tutorial as I always get +I've spend a day figuring out what's wrong with the BookStore example (I used torque-3.1.tar.gz and torque-gen-3.1.tar.gz) as I always get the following error messages: {{{ [WARN] IDBroker - -IDBroker is being used with db 'bookstore', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation. Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database. java.lang.NullPointerException: There was no DataSourceFactory configured for the connection bookstore @@ -115,5 +113,6 @@ torque.dsfactory.bookstore.connection.password = 1234 }}} -Then I could run the bookstore example. +Then I could run the bookstore example. I'm not too sure if this type of configuration should be mention +in the tutorial but it sure works for me. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-20T18:34:37 Editor: DomSiroros <[EMAIL PROTECTED]> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -77,7 +77,7 @@ = I suppose Torque.properties in the tutorial should be updated? = -Regarding torque-3.1.tar.gz and torque-gen-3.1.tar.gz,, someone mention in the mailing list that we suppose to merge the two packages which answered many mysteries I encountered. +Regarding torque-3.1.tar.gz and torque-gen-3.1.tar.gz, someone mention in the mailing list that we suppose to merge the two packages which answered many mysteries I encountered. I've also spend a day figuring out what's wrong with my code in the bookstore tutorial as I always get {{{ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-20T18:33:24 Editor: DomSiroros <[EMAIL PROTECTED]> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -76,7 +76,10 @@ = I suppose Torque.properties in the tutorial should be updated? = -I've spend a day figuring out what's wrong with my code in the bookstore tutorial as I always get + +Regarding torque-3.1.tar.gz and torque-gen-3.1.tar.gz,, someone mention in the mailing list that we suppose to merge the two packages which answered many mysteries I encountered. + +I've also spend a day figuring out what's wrong with my code in the bookstore tutorial as I always get {{{ [WARN] IDBroker - -IDBroker is being used with db 'bookstore', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation. Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database. java.lang.NullPointerException: There was no DataSourceFactory configured for the connection bookstore - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-19T22:22:31 Editor: 208.147.1.1 <> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -73,8 +73,9 @@ Finished at: Wed Mar 17 16:25:13 PST 2004 }}} + -= Torque.properties should be changed = += I suppose Torque.properties in the tutorial should be updated? = I've spend a day figuring out what's wrong with my code in the bookstore tutorial as I always get {{{ [WARN] IDBroker - -IDBroker is being used with db 'bookstore', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation. Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database. @@ -98,7 +99,7 @@ }}} The above '''Torque.properties''' does not work. So I tried the new one indicated in -[Pool-config Howto|http://db.apache.org/torque/configuration-howto.html] +[http://db.apache.org/torque/configuration-howto.html Pool-config Howto] {{{ torque.dsfactory.bookstore.factory= org.apache.torque.dsfactory.SharedPoolDataSourceFactory @@ -111,5 +112,5 @@ torque.dsfactory.bookstore.connection.password = 1234 }}} -Then I could run the bookstore example +Then I could run the bookstore example. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-19T22:20:09 Editor: 208.147.1.1 <> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -81,6 +81,35 @@ java.lang.NullPointerException: There was no DataSourceFactory configured for the connection bookstore }}} -Only to discovered later that I should've used the one indicated in the new tutorial +My original '''Torque.properties''' file I used from the old tutorial + +{{{ +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 = org.gjt.mm.mysql.Driver +torque.database.bookstore.url = jdbc:mysql://127.0.0.1/bookstore +torque.database.bookstore.username = user +torque.database.bookstore.password = password +}}} + +The above '''Torque.properties''' does not work. So I tried the new one indicated in +[Pool-config Howto|http://db.apache.org/torque/configuration-howto.html] + +{{{ +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 = org.gjt.mm.mysql.Driver +torque.dsfactory.bookstore.connection.url = jdbc:mysql://localhost:3306/bookstore +torque.dsfactory.bookstore.connection.user = root +torque.dsfactory.bookstore.connection.password = 1234 +}}} + +Then I could run the bookstore example - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-19T22:14:27 Editor: 208.147.1.1 <> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -73,3 +73,14 @@ Finished at: Wed Mar 17 16:25:13 PST 2004 }}} + += Torque.properties should be changed = +I've spend a day figuring out what's wrong with my code in the bookstore tutorial as I always get +{{{ +[WARN] IDBroker - -IDBroker is being used with db 'bookstore', which does not support transactions. IDBroker attempts to use transactions to limit the possibility of duplicate key generation. Without transactions, duplicate key generation is possible if multiple JVMs are used or other means are used to write to the database. +java.lang.NullPointerException: There was no DataSourceFactory configured for the connection bookstore + +}}} +Only to discovered later that I should've used the one indicated in the new tutorial + + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-17T16:51:28 Editor: 128.200.36.28 <> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata discussion of building from CVS with maven Change Log: -- @@ -19,9 +19,57 @@ * the directory structure is nothing like that listed in any of the docs, which is really vexing * so I used maven, that seeming to be the thing to do, and because I couldn't find the files to modify to go the ant route. - * In retrospect, maven use could be pretty painless, except for the following problem that kept tripping me up. If I did the following:{ { { -cd db-torque; + * In retrospect, maven use could be pretty painless, except for the following problem that kept tripping me up. If I did the following:{{{ +cd db-torque maven install:plugin maven torque:jdbc -} } } Then I would get an error, as the maven plugin could not find the source for my org.postgres.Driver - +}}} + + Then I would get an error, as the maven plugin could not find the source for my org.postgres.Driver. The only fix I could figure out was to directly edit {{{~/.maven/plugins/maven-torque-plugin-3.2/project.xml}}} and insert the following dependecy node: {{{ + + postgresql + 7.4.1-jdbc3 + +root + + +}}} + + I could not get this dependency to stick by editing any of the project.xml files in db-torque, nor in {{{myproject/project.xml}}}. After adding that hack, the following worked: {{{ +mkdir newproject +cd newproject +[create project.xml] +mkdir -p src/schema +touch src/schema/schema.xml +maven torque:jdbc +}}} producing the following output (with my server name changed) {{{ +| \/ |__ _Apache__ ___ +| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~ +|_| |_\__,_|\_/\___|_||_| v. 1.0-rc1-SNAPSHOT + +torque:init: + +torque:jdbc: +[torque-jdbc-transform] Torque - JDBCToXMLSchema starting +[torque-jdbc-transform] Your DB settings are: +[torque-jdbc-transform] driver : org.postgresql.Driver +[torque-jdbc-transform] URL : jdbc:postgresql://your.server.com:5432/tracer +[torque-jdbc-transform] user : susieq +[torque-jdbc-transform] schema : +[torque-jdbc-transform] DB driver sucessfuly instantiated +[torque-jdbc-transform] DB connection established +[torque-jdbc-transform] Getting table list... +[torque-jdbc-transform] Building column/table map... +[torque-jdbc-transform] Processing table: arbitrary_points +[torque-jdbc-transform] Processing table: geometry_columns +[torque-jdbc-transform] Processing table: gps_obs +[torque-jdbc-transform] Processing table: gps_segment +[torque-jdbc-transform] Processing table: gps_trace +[torque-jdbc-transform] Processing table: spatial_ref_sys +[torque-jdbc-transform] /home/susieq/javawork/newproject/src/schema/schema.xml +[torque-jdbc-transform] Torque - JDBCToXMLSchema finished +BUILD SUCCESSFUL +Total time: 12 seconds +Finished at: Wed Mar 17 16:25:13 PST 2004 +}}} + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-17T16:09:10 Editor: 128.200.36.28 <> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata no comment Change Log: -- @@ -9,3 +9,19 @@ * Also, it would be worth while mentioning that one should call {{{Torque.init(path_to_config_file)}}} at the start of the java code, before one starts using torque classes. -- ThomasFischer in [http://nagoya.apache.org/scarab/issues/id/TRQD26 TRQD26] + + + + += Towards a tutorial for Torque-CVS = + +I just got the CVS version of Torque to generate XML schema from my running db, so I will post some things that I think might be nice to have in a tutorial. + + * the directory structure is nothing like that listed in any of the docs, which is really vexing + * so I used maven, that seeming to be the thing to do, and because I couldn't find the files to modify to go the ant route. + * In retrospect, maven use could be pretty painless, except for the following problem that kept tripping me up. If I did the following:{ { { +cd db-torque; +maven install:plugin +maven torque:jdbc +} } } Then I would get an error, as the maven plugin could not find the source for my org.postgres.Driver + - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-17T15:56:44 Editor: 128.200.36.28 <> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata some spelling errors fixed Change Log: -- @@ -1,11 +1,11 @@ -= The existing Tutorial should be used with Troque-3.0! = += The existing Tutorial should be used with Torque-3.0! = -If someone would like to indicate updates that are necessary to bring the turorial up to the latest release then please note your findings here. +If someone would like to indicate updates that are necessary to bring the tutorial up to the latest release then please note your findings here. I tried to follow the tutorial on the torque web site. It worked very well except for the following issues, which I had difficulties with: - * It took me a while to figure out that I should have downloaded torque-gen as well as torque itself in step 1 (Ok, the link points at a directory where both fileas are listed, but a short hint for the stupid cannot hurt ;-)). It seems that the tutorial is not yet adapted to the situation of a separate generator. Some files which are said to be in the root of torque are actually located in the root of torque-gen. + * It took me a while to figure out that I should have downloaded torque-gen as well as torque itself in step 1 (Ok, the link points at a directory where both files are listed, but a short hint for the stupid cannot hurt ;-)). It seems that the tutorial is not yet adapted to the situation of a separate generator. Some files which are said to be in the root of torque are actually located in the root of torque-gen. * Also, it would be worth while mentioning that one should call {{{Torque.init(path_to_config_file)}}} at the start of the java code, before one starts using torque classes. -- ThomasFischer in [http://nagoya.apache.org/scarab/issues/id/TRQD26 TRQD26] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[DB Torque Wiki] Updated: TutorialErrata
Date: 2004-03-17T14:49:27 Editor: ScottEade <[EMAIL PROTECTED]> Wiki: DB Torque Wiki Page: TutorialErrata URL: http://wiki.apache.org/db-torque/TutorialErrata typo Change Log: -- @@ -6,6 +6,6 @@ I tried to follow the tutorial on the torque web site. It worked very well except for the following issues, which I had difficulties with: * It took me a while to figure out that I should have downloaded torque-gen as well as torque itself in step 1 (Ok, the link points at a directory where both fileas are listed, but a short hint for the stupid cannot hurt ;-)). It seems that the tutorial is not yet adapted to the situation of a separate generator. Some files which are said to be in the root of torque are actually located in the root of torque-gen. - * Also, it would be worth while mentioning that one should call {{{Torque.init(path_to_config_file)}}} at the start of the java code, before one starsdt using torque classes. + * Also, it would be worth while mentioning that one should call {{{Torque.init(path_to_config_file)}}} at the start of the java code, before one starts using torque classes. -- ThomasFischer in [http://nagoya.apache.org/scarab/issues/id/TRQD26 TRQD26] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]