Hi Vikas, You twice set ";INTEGER" as a type in your XML:
<column name="OUTS_RECORDED" required="true" type=";INTEGER"/> <column name="STRIKE_OUTS" type=";INTEGER"/> This might be causing an error. Cloves Carneiro Jr -----Original Message----- From: Vikas Phonsa [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 2:09 PM To: 'Apache Torque Users List' Subject: RE: newbie's questions help pls Thanks for ur reply. I made the schema manually. Infact just copied from a tutorial. I don't know yet how to generate it my torque. And what I understand from a schema is the database schema definition in id-project-schema.xml and I'm including it below. When we say schema in torque, is that what we are referring or is there something else also. I downloaded two zip files torque-3.1.zip and torque-gen-3.1.zip from torque download site. But the tutorials that I found on the site and the article specified on torque website don't refer to these two different entities. So they all are probably referring to an older version of torque. And then names of the atleast some files in 3.1 are different than mentioned in those tutorials at some places. So should I go back and just use an older version only? I mean what is recommended. Here is the schema: <?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE database SYSTEM "http://jakarta.apache.org/turbine/dtd/database.dtd"> <!-- ==================================================================== --> <!-- --> <!-- I D B R O K E R S C H E M A --> <!-- --> <!-- ==================================================================== --> <!-- This is the XML schema use by Torque to generate the SQL for --> <!-- ID_TABLE table used by the id broker mechanism in Torque. --> <!-- ==================================================================== --> <!-- @author: <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a> --> <!-- @version $Id: id-table-schema.xml,v 1.2 2003/07/24 12:40:41 mpoeschl Exp $ --> <!-- ==================================================================== --> <database name="pitchers" defaultIdMethod="native"> <table name="PITCHER"> <column name="PITCHER_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/> <column name="LAST_NAME" required="true" size="30" type="VARCHAR"/> <column name="FIRST_NAME" required="true" size="30" type="VARCHAR"/> <column name="TEAM_ID" required="true" type="INTEGER"/> <foreign-key foreignTable="TEAM"> <reference local="TEAM_ID" foreign="TEAM_ID"/> </foreign-key> </table> <table name="TEAM" idMethod="none"> <column name="TEAM_ID" required="true" primaryKey="true" type="INTEGER"/> <column name="TEAM_NAME" required="true" size="30" type="VARCHAR"/> </table> <table name="GAME" idMethod="none"> <column name="PITCHER_ID" required="true" type="INTEGER"/> <column name="PLAYING_FOR" required="true" type="INTEGER"/> <column name="AGAINST_TEAM" required="true" type="INTEGER"/> <column name="OUTS_RECORDED" required="true" type=";INTEGER"/> <column name="HITS" type="INTEGER"/> <column name="RUNS" type="INTEGER"/> <column name="WALKS" type="INTEGER"/> <column name="STRIKE_OUTS" type=";INTEGER"/> <foreign-key foreignTable="PITCHER"> <reference local="PITCHER_ID" foreign="PITCHER_ID"/> </foreign-key> <foreign-key foreignTable="TEAM"> <reference local="PLAYING_FOR" foreign="TEAM_ID"/> </foreign-key> <foreign-key foreignTable="TEAM"> <reference local="AGAINST_TEAM" foreign="TEAM_ID"/> </foreign-key> </table> </database> -----Original Message----- From: Ramesh Sabeti [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 11:01 AM To: 'Apache Torque Users List' Subject: RE: newbie's questions help pls How did you come up with the schema? Manually or generated by Torque? > -----Original Message----- > From: Vikas Phonsa [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 13, 2003 10:26 AM > To: 'Apache Torque Users List' > Subject: RE: newbie's questions help pls > > Yeah I have a schema definition. And now when I run ant ant -f > build-torque.xml > > I get the following exception: > > I was following the instructions given in an article given on Torque site. > > Come on guys, is there no place where someone can learn to use the Torque > 3.1 > > All tutorials and even that article > (http://www.developer.com/java/article.php/10922_1457081_2) refers to > earlier versions of torque > > > > BUILD FAILED > file:C:/Downloads/TorqueGen/torque-gen-3.1/build-torque.xml:207: Exception > thrown by 'generator.parse'. For more information consult the velocity > log, > or invoke ant with the -debug flag. > at > org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:564) > at org.apache.tools.ant.Task.perform(Task.java:341) > at org.apache.tools.ant.Target.execute(Target.java:309) > at org.apache.tools.ant.Target.performTasks(Target.java:336) > at org.apache.tools.ant.Project.executeTarget(Project.java:1339) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397) > at > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143) > at org.apache.tools.ant.Task.perform(Task.java:341) > at org.apache.tools.ant.Target.execute(Target.java:309) > at org.apache.tools.ant.Target.performTasks(Target.java:336) > at org.apache.tools.ant.Project.executeTarget(Project.java:1339) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397) > at > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143) > at org.apache.tools.ant.Task.perform(Task.java:341) > at org.apache.tools.ant.Target.execute(Target.java:309) > at org.apache.tools.ant.Target.performTasks(Target.java:336) > at org.apache.tools.ant.Project.executeTarget(Project.java:1339) > at org.apache.tools.ant.Project.executeTargets(Project.java:1255) > at org.apache.tools.ant.Main.runBuild(Main.java:609) > at org.apache.tools.ant.Main.start(Main.java:196) > at org.apache.tools.ant.Main.main(Main.java:235) > Caused by: org.apache.velocity.exception.MethodInvocationException: > Invocation of method 'parse' in class org.apache.velocity.texen.Generator > threw exception class > org.apache.velocity.exception.MethodInvocationException : Invocation of > method 'get' in class java.util.Properties threw exception class > java.lang.NullPointerException : null > at > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java :3 > 09 > ) > at > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReferenc e. > ja > va:207) > at > org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference. ja > va > :357) > at > org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDir ec > ti > ve.java:135) > at > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav a: > 27 > 1) > at org.apache.velocity.Template.merge(Template.java:296) > at org.apache.velocity.texen.Generator.parse(Generator.java:425) > at org.apache.velocity.texen.Generator.parse(Generator.java:361) > at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Im > pl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java :2 > 60 > ) > at > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReferenc e. > ja > va:207) > at > org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference .j > av > a:250) > at > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94 ) > at > org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfState me > nt > .java:109) > at > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94 ) > at > org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344) > at > org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective .j > av > a:153) > at > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94 ) > at > org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344) > at > org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective .j > av > a:153) > at > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav a: > 27 > 1) > at org.apache.velocity.Template.merge(Template.java:296) > at org.apache.velocity.texen.Generator.parse(Generator.java:451) > at > org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:552) > ... 20 more > --- Nested Exception --- > org.apache.velocity.exception.MethodInvocationException: Invocation of > method 'parse' in class org.apache.velocity.texen.Generator threw > exception > class org.apache.velocity.exception.MethodInvocationException : Invocation > of method 'get' in class java.util.Properties threw exception class > java.lang.NullPointerException : null > at > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java :3 > 09 > ) > at > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReferenc e. > ja > va:207) > at > org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference. ja > va > :357) > at > org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDir ec > ti > ve.java:135) > at > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav a: > 27 > 1) > at org.apache.velocity.Template.merge(Template.java:296) > at org.apache.velocity.texen.Generator.parse(Generator.java:425) > at org.apache.velocity.texen.Generator.parse(Generator.java:361) > at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Im > pl > .java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java :2 > 60 > ) > at > org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReferenc e. > ja > va:207) > at > org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference .j > av > a:250) > at > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94 ) > at > org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfState me > nt > .java:109) > at > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94 ) > at > org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344) > at > org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective .j > av > a:153) > at > org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94 ) > at > org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:344) > at > org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective .j > av > a:153) > at > org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.jav a: > 27 > 1) > at org.apache.velocity.Template.merge(Template.java:296) > at org.apache.velocity.texen.Generator.parse(Generator.java:451) > at > org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:552) > at org.apache.tools.ant.Task.perform(Task.java:341) > at org.apache.tools.ant.Target.execute(Target.java:309) > at org.apache.tools.ant.Target.performTasks(Target.java:336) > at org.apache.tools.ant.Project.executeTarget(Project.java:1339) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397) > at > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143) > at org.apache.tools.ant.Task.perform(Task.java:341) > at org.apache.tools.ant.Target.execute(Target.java:309) > at org.apache.tools.ant.Target.performTasks(Target.java:336) > at org.apache.tools.ant.Project.executeTarget(Project.java:1339) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:397) > at > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143) > at org.apache.tools.ant.Task.perform(Task.java:341) > at org.apache.tools.ant.Target.execute(Target.java:309) > at org.apache.tools.ant.Target.performTasks(Target.java:336) > at org.apache.tools.ant.Project.executeTarget(Project.java:1339) > at org.apache.tools.ant.Project.executeTargets(Project.java:1255) > at org.apache.tools.ant.Main.runBuild(Main.java:609) > at org.apache.tools.ant.Main.start(Main.java:196) > at org.apache.tools.ant.Main.main(Main.java:235) > > > > -----Original Message----- > From: Engelhardt, ITS BetrWi AE2, FD > [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 13, 2003 1:21 AM > To: 'Apache Torque Users List' > Subject: AW: newbie's questions regarding tutorials > > Vikas, > did youe create any schema definition? > > Dieter > > -----Ursprüngliche Nachricht----- > Von: Vikas Phonsa [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 12. November 2003 23:04 > An: 'Apache Torque Users List' > Betreff: RE: newbie's questions regarding tutorials > > > Hi Cloves, > Thanks for your reply. Here's what is going on with me. I modified the > build.properties and ran the ant -f build-torque.xml and it did generate > some sql stuff but didn't generate any java classes. All I got in the > src/java folder is a file named "report.bookstore.om.generation" > > I just copied the stuff for build.properties given in the examples on > apache > and modified that to put my database information. > > But I got no java classes and Ant console gives no errors. > > Any ideas ? > > Thanks > > Vikas > > -----Original Message----- > From: Cloves Carneiro Jr. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 12, 2003 11:50 AM > To: Apache Torque Users List > Subject: RE: newbie's questions regarding tutorials > > Hi Vikas > > I assume the recommended distribution of Torque is the 3.1 release. I've > downloaded both torque-3.1.zip and torque-gen-3.1.zip. The tutorial you > mentioned seems to be a bit outdated. Extract torque-gen-3.1.zip to a > folder, edit build.properties to point to your database and create the db > schema definition XML in the schema folder. Run 'ant -f build-torque.xml' > and your classes will be generated. > Then, extract torque-3.1.zip, and use the JARs on the /lib folder to run > an > example using the classes you generated. > > > Cloves > > -----Original Message----- > From: Vikas Phonsa [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 12, 2003 2:32 PM > To: '[EMAIL PROTECTED]' > Subject: newbie's questions regarding tutorials > > > Hi Everybody, > > This is my first hr into torque and I was trying to go thru the tutorials > on > the website. I would appreciate a little guidance regarding the following: > > 1. At http://db.apache.org/torque/tutorial/step1.html they tell you to get > a > distribution of torque. I need to know which version of torque is > recommended. > > 2. On the same page they say " After you have obtained your copy of the > Torque, you can either unpack the jar-----". I downloaded the torque- > 3.1.zip > and its lib directory it does have torque jar but no source in it. So do I > have to download the zip with the source and build it in my IDE and > proceed > or what ? unjarring to get class files doesn't make much sense. So what do > those instructions imply when they say that unjar and obtain a specified > directory structure. > > Maybe I'm asking some stupid question but I'm kinda confused how to > proceed. > > Please guide > > Thanks > > Vikas > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]