Re: sql statements execution error
Prestige Spas <[email protected]> Thu, 19 Feb 2009 20:17:00 -0800 (PST)
| Newsgroups | gmane.comp.jakarta.ojb.user |
|---|---|
| Message-ID | <[email protected]> |
Some more info on this issue for anyone that might be able to help:=0A(Sorr=
y for the size of the post, this gets more interesting around point 6, but =
i wanted to be complete)=0A=0A1. I have started a brand new project from oj=
b-blank.jar in order to =0Adiagnose what is going wrong here.=0A=0A2. Follo=
wed the getting-started guide here:=0Ahttp://db.apache.org/ojb/docu/getting=
-started.html=0Aas closely as possible to setup for mysql on a remote serve=
r=0A(yes, this server works fine for everything else, same user etc.)=0A=0A=
3. Extracted Tutorial 1 jar into the src/java directory=0A=0A4. Imported pr=
oject into eclipse=0A=0A5. Changed build.properties as follows:=0AUSER AND =
PASSWORD INFO - ALREADY WORKING USER SETUP ON SERVER=0AjcdAlias=3Ddefault=
=0AdatabaseName=3Djerc=0AdatabaseUser=3Djerc=0AdatabasePassword=3D********=
=0A=0AMYSQL SETTINGS - ADDED urlMachine for reference in torque.createUrl=
=0AdbmsName=3DMySQL=0AjdbcLevel=3D3.0=0AjdbcRuntimeDriver=3Dcom.mysql.jdbc.=
Driver=0AurlProtocol=3Djdbc=0AurlSubprotocol=3Dmysql=0AurlMachine=3D//obeli=
x:3306/=0AurlDbalias=3D${urlMachine}${databaseName}=0A=0ACHANGED CREATEURL =
- THIS WORKS=0Atorque.database=3Dmysql=0Atorque.database.createUrl=3D${urlP=
rotocol}:${urlSubprotocol}:${urlMachine}=0Atorque.database.buildUrl=3D${url=
Protocol}:${urlSubprotocol}:${urlDbalias}=0A=0Ajar.name=3Dojb-blank.jar=0AA=
LL OTHER SETTINGS ARE UNCHANGED=0A=0A6. Setup and Run ant tasks from eclisp=
e=0A6a. build task output:=0A=0ABuildfile: /home/brian/Workspace/ojb-blank/=
build.xml=0A=0Acompile:=0A [javac] Compiling 9 source files to /home/=
brian/Workspace/ojb-blank/build/classes=0A [javac] ----------=0A =
[javac] 1. WARNING in /home/brian/Workspace/ojb-blank/src/java/org/apache=
/ojb/tutorial1/Product.java (at line 23)=0A [javac] public class =
Product implements java.io.Serializable=0A [javac] ^=
^^^^^^=0A [javac] The serializable class Product does not declare a s=
tatic final serialVersionUID field of type long=0A [javac] ----------=
=0A [javac] 1 problem (1 warning)=0A=0Axdoclet:=0A [ojbdoclet] 2009=
-02-20 15:01:55,564 [Thread-37] INFO xdoclet.XDocletMain.start - Running <=
ojbrepository/>=0A [ojbdoclet] Generating ojb repository descriptor (buil=
d/repository_user.xml)=0A [ojbdoclet] Type org.apache.ojb.tutorial1.Produ=
ct=0A [ojbdoclet] Processed 1 types=0A [ojbdoclet] Processed 1 types=0A=
[ojbdoclet] 2009-02-20 15:01:58,376 [Thread-37] INFO xdoclet.XDocletMai=
n.start - Running <torqueschema/>=0A [ojbdoclet] Generating torque schema=
(build/database/project-schema.xml)=0A [ojbdoclet] Processed 1 types=0A=
=0Abuild:=0A [copy] Copying 7 files to /home/brian/Workspace/ojb-bla=
nk/build=0A [mkdir] Created dir: /home/brian/Workspace/ojb-blank/buil=
d/lib=0A [copy] Copying 14 files to /home/brian/Workspace/ojb-blank/=
build/lib=0A=0Abuild_if_with_mainclass:=0ABUILD SUCCESSFUL=0ATotal time: 7 =
seconds=0A=0A6b setup-db task output:=0A=0ABuildfile: /home/brian/Workspace=
/ojb-blank/build.xml=0A=0Acompile:=0A=0Axdoclet:=0A [ojbdoclet] 2009-02-2=
0 15:03:01,742 [Thread-38] INFO xdoclet.XDocletMain.start - Running <ojbre=
pository/>=0A [ojbdoclet] 2009-02-20 15:03:03,401 [Thread-38] INFO xdocl=
et.XDocletMain.start - Running <torqueschema/>=0A=0Asetup-db:=0A [co=
py] Copying 1 file to /home/brian/Workspace/ojb-blank/build/database=0A=0AB=
UILD FAILED=0A/home/brian/Workspace/ojb-blank/build.xml:185: The following =
error occurred while executing this line:=0A/home/brian/Workspace/ojb-blank=
/src/schema/build-torque.xml:97: taskdef A class needed by class org.apache=
.torque.task.TorqueJDBCTransformTask cannot be found: org.apache.torque.tas=
k.TorqueJDBCTransformTask=0A=0ATotal time: 6 seconds=0A=0A7. Added torque-g=
en.jar containing TorqueJDBCTransformTask to the eclipse build path, no goo=
d.=0A8. Copied lib dir into src/schema also (eclipse complained about that =
not existing)=0A9. Warning for JDBCTransformTask did not go away - all the =
other warnings did=0A10. SAME RESULT as 6b=0A11. Ran "ant setup-db" externa=
lly from ~/Workspace/ojb-blank/ in a console:=0Abrian@asterix:~/Workspace/o=
jb-blank$ ant setup-db=0ABuildfile: build.xml=0A=0Acompile:=0A=0Axdoclet:=
=0A[ojbdoclet] 2009-02-20 15:06:01,383 [main] INFO xdoclet.XDocletMain.sta=
rt - Running <ojbrepository/>=0A[ojbdoclet] 2009-02-20 15:06:01,626 [main] =
INFO xdoclet.XDocletMain.start - Running <torqueschema/>=0A=0Asetup-db:=0A=
=0Acheck-use-classpath:=0A=0Acheck-run-only-on-schema-change:=0A=0Asql-chec=
k:=0A=0Asql:=0A [echo] +------------------------------------------+=0A =
[echo] | |=0A [echo] | Gen=
erating SQL for YOUR Torque project! |=0A [echo] | =
|=0A [echo] +------------------------------------=
------+=0A=0Asql-classpath:=0A [echo] loading templates from classpath=
=0A[torque-sql] Using contextProperties file: /home/brian/Workspace/ojb-bla=
nk/build.properties=0A[torque-sql] Using classpath=0A[torque-sql] Generatin=
g to file /home/brian/Workspace/ojb-blank/build/database/report.jerc.sql.ge=
neration=0A[torque-sql] 2009-02-20 15:06:02,719 [main] INFO org.apache.tor=
que.engine.database.transform.XmlToAppData - Parsing file: 'ojbcore-schema.=
xml'=0A[torque-sql] 2009-02-20 15:06:02,749 [main] INFO org.apache.torque.=
engine.database.transform.DTDResolver - Resolver: used database.dtd from 'o=
rg.apache.torque.engine.database.transform' package=0A[torque-sql] 2009-02-=
20 15:06:02,801 [main] INFO org.apache.torque.engine.database.transform.Xm=
lToAppData - Parsing file: 'project-schema.xml'=0A[torque-sql] 2009-02-20 1=
5:06:02,802 [main] INFO org.apache.torque.engine.database.transform.DTDRes=
olver - Resolver: used database.dtd from 'org.apache.torque.engine.database=
.transform' package=0A=0Asql-template:=0A=0Acreate-db-check:=0A=0Acreate-db=
:=0A[torque-data-model] Using classpath=0A[torque-data-model] Generating to=
file /home/brian/Workspace/ojb-blank/build/database/create-db.sql=0A[torqu=
e-data-model] 2009-02-20 15:06:04,049 [main] INFO org.apache.torque.engine=
.database.transform.XmlToAppData - Parsing file: 'ojbcore-schema.xml'=0A[to=
rque-data-model] 2009-02-20 15:06:04,052 [main] INFO org.apache.torque.eng=
ine.database.transform.DTDResolver - Resolver: used database.dtd from 'org.=
apache.torque.engine.database.transform' package=0A[torque-data-model] 2009=
-02-20 15:06:04,131 [main] INFO org.apache.torque.engine.database.transfor=
m.XmlToAppData - Parsing file: 'project-schema.xml'=0A[torque-data-model] 2=
009-02-20 15:06:04,132 [main] INFO org.apache.torque.engine.database.trans=
form.DTDResolver - Resolver: used database.dtd from 'org.apache.torque.engi=
ne.database.transform' package=0A=0Ashutdown-check:=0A=0Aappend-shutdown-sq=
l:=0A [echo] =0A [echo] Executing the create-db.sql script ..=
.=0A [echo] =0A [sql] Executing resource: /home/brian/Workspac=
e/ojb-blank/build/database/create-db.sql=0A [sql] 2 of 2 SQL statement=
s executed successfully=0A=0Ainsert-sql:=0A=0Ashutdown-check:=0A=0Aadd-shut=
down-sql-file:=0A[torque-sql-exec] Executing file: /home/brian/Workspace/oj=
b-blank/build/database/project-schema.sql=0A[torque-sql-exec] Failed to exe=
cute: # -------------------------------------------------------------------=
----=0A[torque-sql-exec] # Product # -------------------------------------=
----------------------------------=0A[torque-sql-exec] drop table if exist=
s Product; CREATE TABLE Product ( id INTEGER NOT NULL, name VARCHAR (100), =
price FLOAT, stock INTEGER, PRIMARY KEY(id) );=0A[torque-sql-exec] com.mysq=
l.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL =
syntax; check the manual that corresponds to your MySQL server version for =
the right syntax to use near '; CREATE TABLE Product ( id INTEGER NOT NULL,=
name VARCHAR (100), price FLOAT, s' at line 3=0A[torque-sql-exec] Executin=
g file: /home/brian/Workspace/ojb-blank/build/database/ojbcore-schema.sql=
=0A[torque-sql-exec] Failed to execute: # ---------------------------------=
--------------------------------------=0A[torque-sql-exec] # OJB_HL_SEQ # =
-----------------------------------------------------------------------=0A[=
torque-sql-exec] drop table if exists OJB_HL_SEQ; CREATE TABLE OJB_HL_SEQ =
( TABLENAME VARCHAR (250) NOT NULL, MAX_KEY BIGINT, GRAB_SIZE INTEGER, VERS=
ION INTEGER, PRIMARY KEY(TABLENAME) ); # ----------------------------------=
-------------------------------------=0A[torque-sql-exec] # OJB_NRM # ----=
-------------------------------------------------------------------=0A[torq=
ue-sql-exec] drop table if exists OJB_NRM; CREATE TABLE OJB_NRM ( NAME VAR=
CHAR (250) NOT NULL, OID_ LONGBLOB, PRIMARY KEY(NAME) ); # ----------------=
-------------------------------------------------------=0A[torque-sql-exec]=
# OJB_DLIST # -----------------------------------------------------------=
------------=0A[torque-sql-exec] drop table if exists OJB_DLIST; CREATE TA=
BLE OJB_DLIST ( ID INTEGER NOT NULL, SIZE_ INTEGER, PRIMARY KEY(ID) ); # --=
---------------------------------------------------------------------=0A[to=
rque-sql-exec] # OJB_DLIST_ENTRIES # -------------------------------------=
----------------------------------=0A[torque-sql-exec] drop table if exist=
s OJB_DLIST_ENTRIES; CREATE TABLE OJB_DLIST_ENTRIES ( ID INTEGER NOT NULL, =
DLIST_ID INTEGER NOT NULL, POSITION_ INTEGER, OID_ LONGBLOB, PRIMARY KEY(ID=
) ); # --------------------------------------------------------------------=
---=0A[torque-sql-exec] # OJB_DSET # -------------------------------------=
----------------------------------=0A[torque-sql-exec] drop table if exist=
s OJB_DSET; CREATE TABLE OJB_DSET ( ID INTEGER NOT NULL, SIZE_ INTEGER, PRI=
MARY KEY(ID) ); # ---------------------------------------------------------=
--------------=0A[torque-sql-exec] # OJB_DSET_ENTRIES # ------------------=
-----------------------------------------------------=0A[torque-sql-exec] =
drop table if exists OJB_DSET_ENTRIES; CREATE TABLE OJB_DSET_ENTRIES ( ID I=
NTEGER NOT NULL, DLIST_ID INTEGER NOT NULL, POSITION_ INTEGER, OID_ LONGBLO=
B, PRIMARY KEY(ID) ); # ---------------------------------------------------=
--------------------=0A[torque-sql-exec] # OJB_DMAP # --------------------=
---------------------------------------------------=0A[torque-sql-exec] dr=
op table if exists OJB_DMAP; CREATE TABLE OJB_DMAP ( ID INTEGER NOT NULL, S=
IZE_ INTEGER, PRIMARY KEY(ID) ); # ----------------------------------------=
-------------------------------=0A[torque-sql-exec] # OJB_DMAP_ENTRIES # -=
----------------------------------------------------------------------=0A[t=
orque-sql-exec] drop table if exists OJB_DMAP_ENTRIES; CREATE TABLE OJB_DM=
AP_ENTRIES ( ID INTEGER NOT NULL, DMAP_ID INTEGER NOT NULL, KEY_OID LONGBLO=
B, VALUE_OID LONGBLOB, PRIMARY KEY(ID) );=0A[torque-sql-exec] com.mysql.jdb=
c.exceptions.MySQLSyntaxErrorException: You have an error in your SQL synta=
x; check the manual that corresponds to your MySQL server version for the r=
ight syntax to use near '; CREATE TABLE OJB_HL_SEQ ( TABLENAME VARCHAR (250=
) NOT NULL, MAX_KEY BIGINT, GR' at line 3=0A[torque-sql-exec] 0 of 2 SQL st=
atements executed successfully=0A=0ABUILD SUCCESSFUL=0ATotal time: 4 second=
s=0A=0AStill no luck, and now we see the same problem crop up yet again. I =
tried the following to debug this:=0A1. Create an ant task insert-sql in bu=
ild.xml that directly calls the insert-sql task in build-torque.xml:=0A =
<target name=3D"insert-sql">=0A <property name=3D"torque.buildFile"=
=0A value=3D"${source.schema.dir}/build-torque.xml"/>=0A =
<property name=3D"torque.project"=0A value=3D"${data=
baseName}"/>=0A <property name=3D"torque.schema.dir"=0A =
value=3D"${build.dir}/database"/>=0A <property name=3D"torque.o=
utput.dir"=0A value=3D"${build.dir}/database"/>=0A =
<property name=3D"torque.sql.dir"=0A value=3D"${torque.out=
put.dir}"/>=0A <property name=3D"torque.useClasspath"=0A =
value=3D"true"/>=0A <property name=3D"torque.database.driver"=
=0A value=3D"${jdbcRuntimeDriver}"/>=0A <property n=
ame=3D"torque.database.user"=0A value=3D"${databaseUser}"/=
>=0A <property name=3D"torque.database.password"=0A =
value=3D"${databasePassword}"/>=0A =0A <ant dir=3D"."=0A =
antfile=3D"${torque.buildFile}"=0A target=3D"insert-sq=
l">=0A </ant>=0A </target>=0A=0A2. Edit the generated project-sch=
ema.sql and ojbcore-schema.sql and run "ant insert-sql"=0AI found that if t=
here is only 1 SQL statement in each .sql file this works! =0AFor example i=
f project-schema.sql reads:=0A# -------------------------------------------=
----------------------------=0A# Product=0A# ------------------------------=
-----------------------------------------=0Adrop table if exists Product;=
=0A=0ACREATE TABLE Product=0A(=0A id INTEGER NOT NULL,=
=0A name VARCHAR (100),=0A price FLOA=
T,=0A stock INTEGER,=0A PRIMARY KEY(id)=0A);=0A =0Ai=
t fails. if i remove everything before CREATE it works, but if I leave the =
drop table it fails.=0AI can leave the comments in and it succeeds.=0A=0ASo=
my question is - how do I get torque to automatically set up the DB for me=
? I thought this =0Awould be working out of the box? It is not convinient f=
or me to browse the .sql files=0Ato snip each one out into mysql manually e=
very time i change the schema.=0A=0AAnyone??? I Really need help on this on=
e.=0AThanks,=0A=0A-- =0ABrian=0A=0A=0A=0A=0A_______________________________=
_=0AFrom: Prestige Spas <[email protected]>=0ATo: [email protected]=
e.org=0ASent: Friday, 13 February, 2009 9:54:00 AM=0ASubject: Re: sql state=
ments execution error=0A=0AHello All,=0A=0AI have searched the archives and=
not seen an answer to this, but I am having the =0Asame trouble with the t=
orque "insert-sql" task, as called from the OJB build.xml.=0AI have attache=
d an old post that shows the exact same problem I am seeing here. =0AMy pro=
ject is assembled from ojb-blank.jar and my settings are similar to what is=
=0Areported below, except that I am not running inside of tomcat, simply t=
rying to=0Adevelop in eclipse at this stage and run from there. =0A=0A"ant =
setup-db" always returns BUILD SUCESSFUL but the ant task prints all the =
=0Asql statements together and says 0 of 2 statements executed sucessfully,=
the =0Aproblem being a MySQLSyntaxErrorException thrown when torque is try=
ing to =0Acreate the OJB_HL_SEQ table. I have tried this in ojb-blank.jar a=
lso and the=0Asame problem happened from day one. =0A=0AI am running OJB 1.=
0.4 with mysql 5.0.51a and version 5.0.8 of the mysql JDBC=0Adriver. Java v=
ersion is 1.5.0_16. If anyone out there is able to shed any light on =0Athi=
s I would appreciate it, as I have been tearing my hair out for days on thi=
s now =0Aand I cannot think what is wrong. Obviously ojb-blank should just =
work out of the =0Abox with MySQL, and I think i have set everything up cor=
rectly (profile=3Dmysql, =0Aedit the profile/mysql.profile, torque.database=
=3Dmysql, dbmsName=3DMySQL). I have =0Atested that the driver works with SQ=
uirreL and mysql-query-browser is able to =0Aexecute the generated SQL stat=
ements *individually* from =0Abuild/database/project-schema.sql (but not if=
i simply paste the whole file).=0A=0ATIA=0A-Brian=0A=0A=0A=0A=0A=0A>Hai,=
=0A>=0A>I have a problem in doing an ant build=0A>=0A>The sql statements th=
row=0A>=0A>[torque-sql-exec] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErr=
orException: You have an error=0A>in your SQL syntax; check the manual that=
corresponds to your MySQL server version for the=0A>right syntax to use ne=
ar 'CREATE TABLE Product ( id INTEGER NOT NULL, name VARCHAR (100),=0A>pric=
e FLOAT, sto' at line 3=0A>=0A>I want the ant script to create the database=
"productmanager" at runtime. I'm using MySQL=0A>Server version 5.1.6=0A>=
=0A>Below shown is my build.properties file:=0A>=0A>jcdAlias=3Ddefault=0A>d=
atabaseName=3Dproductmanager=0A>databaseUser=3Droot=0A>databasePassword=3Dr=
oot=0A>=0A>tomcat.home=3D${env.CATALINA_HOME}=0A>tomcat.url=3Dhttp://localh=
ost:8080=0A>tomcat.manager.url=3D${tomcat.url}/manager=0A># This user shoul=
d be present in the $CATALINA_HOME/conf/tomcat-users.xml file with the role=
=0A>'manager':=0A>tomcat.username=3Dtomcat=0A>tomcat.password=3Dtomcat=0A>=
=0A>embeddedDatabase=3Dfalse=0A>=0A>dbmsName=3DMySQL=0A>jdbcLevel=3D3.0=0A>=
jdbcRuntimeDriver=3Dcom.mysql.jdbc.Driver=0A>urlProtocol=3Djdbc=0A>urlSubpr=
otocol=3Dmysql=0A>urlDbalias=3D//localhost:3306/${databaseName}=0A>=0A>torq=
ue.database=3Dmysql=0A>=0A>torque.database.createUrl=3D${urlProtocol}:${url=
Subprotocol}://localhost:3306/${databaseName}=0A>=0A>torque.database.driver=
=3D${jdbcRuntimeDriver}=0A>=0A>torque.database.user=3D${databaseUser}=0A>=
=0A>torque.database.password=3D${databasePassword}=0A>=0A>torque.database.b=
uildUrl=3D${torque.database.createUrl}=0A>=0A>source.dir=3Dsrc=0A>source.ja=
va.dir=3D${source.dir}/java=0A>source.resource.dir=3D${source.dir}/resource=
s=0A>source.test.dir=3D${source.dir}/test=0A>source.schema.dir=3D${source.d=
ir}/schema=0A>source.webapp.dir=3D${source.dir}/webapp=0A>=0A>build.dir=3Db=
uild=0A>lib.dir=3Dlib=0A>lib.webapp.excludes=3Dxdoclet*.jar,xjavadoc*.jar,t=
orque*.jar,velocity*.jar=0A>=0A>target.dir=3Dtarget=0A>=0A>servlet.lib=3D${=
tomcat.home}/common/lib/servlet-api.jar=0A>jsp.lib=3D${tomcat.home}/common/=
lib/jsp-api.jar=0A>deploy.dir=3D${tomcat.home}/webapps=0A>=0A>embedded.data=
base.excludes=3D*schema.xml,*.sql,*.sql.generation,sqldb.map=0A>=0A>=0A>=0A=
>Below shown is the log details: (see the highlighted text in red color)=0A=
>=0A>C:\Users\karthiksg\Desktop\webapp-sample\webapp-sample>ant=0A>Buildfil=
e: build.xml=0A>=0A>compile:=0A>=0A>xdoclet:=0A>[ojbdoclet] 2008-11-09 17:5=
1:00,188 [main] INFO xdoclet.XDocletMain.start - Run=0A>ning <ojbrepositor=
y/>=0A>[ojbdoclet] 2008-11-09 17:51:00,783 [main] INFO xdoclet.XDocletMain=
.start - Run=0A>ning <torqueschema/>=0A>=0A>war:=0A>=0A>compile:=0A>=0A>xdo=
clet:=0A>[ojbdoclet] 2008-11-09 17:51:02,105 [main] INFO xdoclet.XDocletMa=
in.start - Run=0A>ning <ojbrepository/>=0A>[ojbdoclet] 2008-11-09 17:51:02,=
604 [main] INFO xdoclet.XDocletMain.start - Run=0A>ning <torqueschema/>=0A=
>=0A>setup-db:=0A>=0A>check-use-classpath:=0A>=0A>check-run-only-on-schema-=
change:=0A>=0A>sql-check:=0A>=0A>sql:=0A>[echo] +--------------------------=
----------------+=0A>[echo] | |=0A=
>[echo] | Generating SQL for YOUR Torque project! |=0A>[echo] | =
|=0A>[echo] +-------------------------------=
-----------+=0A>=0A>sql-classpath:=0A>[echo] loading templates from classpa=
th=0A>[torque-sql] Using contextProperties file: C:\Users\karthiksg\Desktop=
\webapp-sam=0A>ple\webapp-sample\build.properties=0A>[torque-sql] Using cla=
sspath=0A>[torque-sql] Generating to file C:\Users\karthiksg\Desktop\webapp=
-sample\webapp-=0A>sample\build\database\report.productmanager.sql.generati=
on=0A>[torque-sql] 2008-11-09 17:51:04,499 [main] INFO org.apache.torque.e=
ngine.datab=0A>ase.transform.XmlToAppData - Parsing file: 'ojbcore-schema.x=
ml'=0A>[torque-sql] 2008-11-09 17:51:04,522 [main] INFO org.apache.torque.=
engine.datab=0A>ase.transform.DTDResolver - Resolver: used database.dtd fro=
m 'org.apache.torque.=0A>engine.database.transform' package=0A>[torque-sql]=
2008-11-09 17:51:04,595 [main] INFO org.apache.torque.engine.datab=0A>ase=
.transform.XmlToAppData - Parsing file: 'project-schema.xml'=0A>[torque-sql=
] 2008-11-09 17:51:04,600 [main] INFO org.apache.torque.engine.datab=0A>as=
e.transform.DTDResolver - Resolver: used 'http://db.apache.org/torque/dtd/d=
ata=0A>base_3_0_1.dtd'=0A>=0A>sql-template:=0A>=0A>create-db-check:=0A>=0A>=
create-db:=0A>[torque-data-model] Using classpath=0A>[torque-data-model] Ge=
nerating to file C:\Users\karthiksg\Desktop\webapp-sample\=0A>webapp-sample=
\build\database\create-db.sql=0A>[torque-data-model] 2008-11-09 17:51:25,37=
8 [main] INFO org.apache.torque.engin=0A>e.database.transform.XmlToAppData=
- Parsing file: 'ojbcore-schema.xml'=0A>[torque-data-model] 2008-11-09 17:=
51:25,392 [main] INFO org.apache.torque.engin=0A>e.database.transform.DTDR=
esolver - Resolver: used database.dtd from 'org.apache.=0A>torque.engine.da=
tabase.transform' package=0A>[torque-data-model] 2008-11-09 17:51:25,457 [m=
ain] INFO org.apache.torque.engin=0A>e.database.transform.XmlToAppData - P=
arsing file: 'project-schema.xml'=0A>[torque-data-model] 2008-11-09 17:51:2=
5,463 [main] INFO org.apache.torque.engin=0A>e.database.transform.DTDResol=
ver - Resolver: used 'http://db.apache.org/torque/d=0A>td/database_3_0_1.dt=
d'=0A>=0A>shutdown-check:=0A>=0A>append-shutdown-sql:=0A>[echo]=0A>[echo] =
Executing the create-db.sql script ...=0A>[echo]=0A>[sql] Executing re=
source: C:\Users\karthiksg\Desktop\webapp-sample\webapp-=0A>sample\build\da=
tabase\create-db.sql=0A>[sql] 2 of 2 SQL statements executed successfully=
=0A>=0A>insert-sql:=0A>=0A>shutdown-check:=0A>=0A>add-shutdown-sql-file:=0A=
>[torque-sql-exec] Our new url -> jdbc:mysql://localhost:3306/productmanage=
r=0A>[torque-sql-exec] Executing file: C:\Users\karthiksg\Desktop\webapp-sa=
mple\webap=0A>p-sample\build\database\project-schema.sql=0A>[torque-sql-exe=
c] Failed to execute: # -----------------------------------------=0A>------=
------------------------=0A>[torque-sql-exec] # Product # ----------------=
---------------------------------=0A>----------------------=0A>[torque-sql-=
exec] drop table if exists Product; CREATE TABLE Product ( id INTEG=0A>ER =
NOT NULL, name VARCHAR (100), price FLOAT, stock INTEGER, PRIMARY KEY(id) )=
;=0A>[torque-sql-exec] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorExce=
ption: You=0A>have an error in your SQL syntax; check the manual that corre=
sponds to your MyS=0A>QL server version for the right syntax to use near 'C=
REATE TABLE Product ( id IN=0A>TEGER NOT NULL, name VARCHAR (100), price FL=
OAT, sto' at line 3=0A>[torque-sql-exec] Executing file: C:\Users\karthiksg=
\Desktop\webapp-sample\webap=0A>p-sample\build\database\ojbcore-schema.sql=
=0A>[torque-sql-exec] Failed to execute: # --------------------------------=
---------=0A>------------------------------=0A>[torque-sql-exec] # OJB_HL_=
SEQ # ----------------------------------------------=0A>-------------------=
------=0A>[torque-sql-exec] drop table if exists OJB_HL_SEQ; CREATE TABLE =
OJB_HL_SEQ ( TA=0A>BLENAME VARCHAR (250) NOT NULL, MAX_KEY BIGINT, GRAB_SIZ=
E INTEGER, VERSION INTEG=0A>ER, PRIMARY KEY(TABLENAME) ); # ---------------=
---------------------------------=0A>-----------------------=0A>[torque-sql=
-exec] # OJB_NRM # -------------------------------------------------=0A>--=
--------------------=0A>[torque-sql-exec] drop table if exists OJB_NRM; CR=
EATE TABLE OJB_NRM ( NAME VAR=0A>CHAR (250) NOT NULL, OID_ LONGBLOB, PRIMAR=
Y KEY(NAME) ); # ---------------------=0A>---------------------------------=
-----------------=0A>[torque-sql-exec] # OJB_DLIST # ---------------------=
--------------------------=0A>------------------------=0A>[torque-sql-exec]=
drop table if exists OJB_DLIST; CREATE TABLE OJB_DLIST ( ID I=0A>NTEGER N=
OT NULL, SIZE_ INTEGER, PRIMARY KEY(ID) ); # ---------------------------=0A=
>--------------------------------------------=0A>[torque-sql-exec] # OJB_D=
LIST_ENTRIES # ---------------------------------------=0A>-----------------=
---------------=0A>[torque-sql-exec] drop table if exists OJB_DLIST_ENTRIE=
S; CREATE TABLE OJB_DLIS=0A>T_ENTRIES ( ID INTEGER NOT NULL, DLIST_ID INTEG=
ER NOT NULL, POSITION_ INTEGER, O=0A>ID_ LONGBLOB, PRIMARY KEY(ID) ); # ---=
------------------------------------------=0A>--------------------------=0A=
>[torque-sql-exec] # OJB_DSET # ------------------------------------------=
------=0A>-----------------------=0A>[torque-sql-exec] drop table if exist=
s OJB_DSET; CREATE TABLE OJB_DSET ( ID INT=0A>EGER NOT NULL, SIZE_ INTEGER,=
PRIMARY KEY(ID) ); # -----------------------------=0A>--------------------=
----------------------=0A>[torque-sql-exec] # OJB_DSET_ENTRIES # ---------=
-------------------------------=0A>-------------------------------=0A>[torq=
ue-sql-exec] drop table if exists OJB_DSET_ENTRIES; CREATE TABLE OJB_DSET_=
=0A>ENTRIES ( ID INTEGER NOT NULL, DLIST_ID INTEGER NOT NULL, POSITION_ INT=
EGER, OID=0A>_ LONGBLOB, PRIMARY KEY(ID) ); # -----------------------------=
------------------=0A>------------------------=0A>[torque-sql-exec] # OJB_=
DMAP # ------------------------------------------------=0A>----------------=
-------=0A>[torque-sql-exec] drop table if exists OJB_DMAP; CREATE TABLE O=
JB_DMAP ( ID INT=0A>EGER NOT NULL, SIZE_ INTEGER, PRIMARY KEY(ID) ); # ----=
-------------------------=0A>------------------------------------------=0A>=
[torque-sql-exec] # OJB_DMAP_ENTRIES # -----------------------------------=
-----=0A>-------------------------------=0A>[torque-sql-exec] drop table i=
f exists OJB_DMAP_ENTRIES; CREATE TABLE OJB_DMAP_=0A>ENTRIES ( ID INTEGER N=
OT NULL, DMAP_ID INTEGER NOT NULL, KEY_OID LONGBLOB, VALUE=0A>_OID LONGBLOB=
, PRIMARY KEY(ID) );=0A>[torque-sql-exec] com.mysql.jdbc.exceptions.jdbc4.M=
ySQLSyntaxErrorException: You=0A>have an error in your SQL syntax; check th=
e manual that corresponds to your MyS=0A>QL server version for the right sy=
ntax to use near 'CREATE TABLE OJB_HL_SEQ ( TA=0A>BLENAME VARCHAR (250) NOT=
NULL, MAX_KEY BIGINT, GRAB' at line 3=0A>[torque-sql-exec] 0 of 2 SQL stat=
ements executed successfully=0A>=0A>copy-database-files:=0A>=0A>BUILD SUCCE=
SSFUL=0A>Total time: 46 seconds=0A>=0A>I can see the files build\database\c=
reatedb.sql ,=0A>build\database\ojbcore-schema.sql ,=0A>build\database\proj=
ect-schema.sql =0A>=0A>I can copy the statements from the .sql listed above=
and execute successfully in mysql command=0A>window.=0A>=0A>kindly do the =
needfull.=0A=0A=0A Make Yahoo!7 your homepage and win a trip to the Qu=
iksilver Pro. Find out more