You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Chris Joelly <ch...@unycom.com> on 2004/01/28 16:09:32 UTC

Turbine / Torque mit sapdb

Hello!

i want to use Turbine via Torque against a sapdb database and have some
troubles building the database schema out of the xml schema definitions:

insert-sql:
[torque-sql-exec] Our new url -> jdbc:sapdb://uny-dev-mysql/aportal
[torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/id-table-schema.sql
[torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/turbine-schema.sql
[torque-sql-exec] Failed to execute: drop table TURBINE_SCHEDULED_JOB cascade 
[torque-sql-exec] com.sap.dbtech.jdbc.exceptions.DatabaseException: [-4004] (at 12): Unknown table name:TURBINE_SCHEDULED_JOB
[torque-sql-exec] Failed to execute: CREATE TABLE TURBINE_SCHEDULED_JOB ( JOB_ID INTEGER NOT NULL, SECOND INTEGER default -1 NOT NULL, MINUTE INTEGER default -1 NOT NULL, HOUR INTEGER default -1 NOT NULL, WEEK_DAY INTEGER default -1 NOT NULL, DAY_OF_MONTH INTEGER default -1 NOT NULL, TASK VARCHAR (99) NOT NULL, EMAIL VARCHAR (99), PROPERTY LONG BYTE )
[torque-sql-exec] com.sap.dbtech.jdbc.exceptions.DatabaseException: [-7006] (at 63): Reserved identifier not allowed
[torque-sql-exec] Failed to execute: ALTER TABLE TURBINE_SCHEDULED_JOB ADD PRIMARY KEY (JOB_ID) 
[torque-sql-exec] com.sap.dbtech.jdbc.exceptions.DatabaseException: [-4004] (at 13): Unknown table name:TURBINE_SCHEDULED_JOB
[torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/turbine-schema-idtable-init.sql
[torque-sql-exec] 33 of 36 SQL statements executed successfully
[torque-sql-exec] Our new url -> jdbc:sapdb://uny-dev-mysql/aportal
[torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/aportal-schema.sql
[torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/aportal-schema-idtable-init.sql
[torque-sql-exec] 68 of 71 SQL statements executed successfully

how can i handle the column names used in the table
TURBINE_SCHEDULED_JOB?

thx, Chris

-- 
mit freundlichen Grüßen / with kind regards
 
Ing. Christian Jölly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstraße 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
chris.joelly@unycom.com
http://www.unycom.com


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Turbine / Torque mit sapdb

Posted by Jeff Painter <pa...@kiasoft.com>.
-- begins comments correctly for oracle, mysql and postgres (those are the 
ones I know of)

the vm templates are probably a good place to start though



On Thu, 29 Jan 2004, Chris Joelly wrote:

> Hi again!
> 
> i see, torque uses velocity templates for the sql generation. they are
> within the torque jar file and uses ; as stetement separator, and -- for
> starting comments ...
> 
> i hope i have some time soon to correct this ... :-)
> 
> Chris
> 
> Am Thu, Jan 29, 2004 at 09:53:06AM +0100, Chris Joelly meinte:
> > 
> > the comments starts with -- but they should start with // for example...
> > 
> > does anybody know how torque can be configured for the script
> > generation? does torque use velocity for this task?
> 
> 

-- 
Regards,

Jeffery Painter

- --
painter@kiasoft.com                     http://kiasoft.com
PGP FP: 9CE8 83A2 33FA 32B1 0AB1  4E62 E4CB E4DA 5913 EFBC

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
 
iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U
YNXabx7DZOV2Hd9LwSTmGpY=
=dWiu
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Turbine / Torque mit sapdb

Posted by Chris Joelly <ch...@unycom.com>.
Hi again!

i see, torque uses velocity templates for the sql generation. they are
within the torque jar file and uses ; as stetement separator, and -- for
starting comments ...

i hope i have some time soon to correct this ... :-)

Chris

Am Thu, Jan 29, 2004 at 09:53:06AM +0100, Chris Joelly meinte:
> 
> the comments starts with -- but they should start with // for example...
> 
> does anybody know how torque can be configured for the script
> generation? does torque use velocity for this task?

-- 
mit freundlichen Grüßen / with kind regards
 
Ing. Christian Jölly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstraße 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
chris.joelly@unycom.com
http://www.unycom.com


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Turbine / Torque mit sapdb

Posted by Chris Joelly <ch...@unycom.com>.
Hello!

ok. i have corrected the generated sql script and added quotes around
the reserved key words.
but i think that there are some other troubles with the generated sql
script.

the comments starts with -- but they should start with // for example...

does anybody know how torque can be configured for the script
generation? does torque use velocity for this task?

thx, Chris

Am Wed, Jan 28, 2004 at 01:22:14PM -0500, Jeff Painter meinte:
> 
> it looks like SECOND, MINUTE, and HOUR are reserved keywords in SAPdb
> 
> TURBINE_SCHEDULED_JOB uses all three of these for column names. I'm not 
> sure what the solution would be other than to change the coding of these 
> column names or remove the Scheduler Service if you do not need it and 
> drop the creation of this table.
> 
> The methods are hard coded in 
> 
> 	o.a.t.services.schedule.JobEntry
> 
> 	setSecond()
> 	setMinute()
> 	setHour()
> 
> and in $tdkroot/webapps/appname/WEB-INF/conf/turbine-schema.xml
> 
>   <table name="TURBINE_SCHEDULED_JOB" idMethod="idbroker">
>     <column name="JOB_ID" required="true" primaryKey="true" type="INTEGER"/>
>     <column name="SECOND" default="-1" required="true" type="INTEGER"/>
>     <column name="MINUTE" default="-1" required="true" type="INTEGER"/>
>     <column name="HOUR" default="-1" required="true" type="INTEGER"/>
>     <column name="WEEK_DAY" default="-1" required="true" type="INTEGER"/>
>     <column name="DAY_OF_MONTH" default="-1" required="true" type="INTEGER"/>
>     <column name="TASK" required="true" size="99" type="VARCHAR"/>
>     <column name="EMAIL" size="99" type="VARCHAR"/>
>     <column name="PROPERTY" type="VARBINARY"/>
>   </table>
> 
> if you need the scheduler I'm guessing you would have to remap the fields 

-- 
mit freundlichen Grüßen / with kind regards
 
Ing. Christian Jölly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstraße 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
chris.joelly@unycom.com
http://www.unycom.com

In die Kirche ging ich morgens,
um Komödien zu schauen,
abends ins Theater, um mich
an der Predigt zu erbauen.
    -- Heinrich Heine (Reisebilder)

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Turbine / Torque mit sapdb

Posted by Jeff Painter <pa...@kiasoft.com>.
it looks like SECOND, MINUTE, and HOUR are reserved keywords in SAPdb

TURBINE_SCHEDULED_JOB uses all three of these for column names. I'm not 
sure what the solution would be other than to change the coding of these 
column names or remove the Scheduler Service if you do not need it and 
drop the creation of this table.

The methods are hard coded in 

	o.a.t.services.schedule.JobEntry

	setSecond()
	setMinute()
	setHour()

and in $tdkroot/webapps/appname/WEB-INF/conf/turbine-schema.xml

  <table name="TURBINE_SCHEDULED_JOB" idMethod="idbroker">
    <column name="JOB_ID" required="true" primaryKey="true" type="INTEGER"/>
    <column name="SECOND" default="-1" required="true" type="INTEGER"/>
    <column name="MINUTE" default="-1" required="true" type="INTEGER"/>
    <column name="HOUR" default="-1" required="true" type="INTEGER"/>
    <column name="WEEK_DAY" default="-1" required="true" type="INTEGER"/>
    <column name="DAY_OF_MONTH" default="-1" required="true" type="INTEGER"/>
    <column name="TASK" required="true" size="99" type="VARCHAR"/>
    <column name="EMAIL" size="99" type="VARCHAR"/>
    <column name="PROPERTY" type="VARBINARY"/>
  </table>

if you need the scheduler I'm guessing you would have to remap the fields 

hth,
Jeff Painter



On Wed, 28 Jan 2004, Chris Joelly wrote:

> Hello!
> 
> i want to use Turbine via Torque against a sapdb database and have some
> troubles building the database schema out of the xml schema definitions:
> 
> insert-sql:
> [torque-sql-exec] Our new url -> jdbc:sapdb://uny-dev-mysql/aportal
> [torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/id-table-schema.sql
> [torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/turbine-schema.sql
> [torque-sql-exec] Failed to execute: drop table TURBINE_SCHEDULED_JOB cascade 
> [torque-sql-exec] com.sap.dbtech.jdbc.exceptions.DatabaseException: [-4004] (at 12): Unknown table name:TURBINE_SCHEDULED_JOB
> [torque-sql-exec] Failed to execute: CREATE TABLE TURBINE_SCHEDULED_JOB ( JOB_ID INTEGER NOT NULL, SECOND INTEGER default -1 NOT NULL, MINUTE INTEGER default -1 NOT NULL, HOUR INTEGER default -1 NOT NULL, WEEK_DAY INTEGER default -1 NOT NULL, DAY_OF_MONTH INTEGER default -1 NOT NULL, TASK VARCHAR (99) NOT NULL, EMAIL VARCHAR (99), PROPERTY LONG BYTE )
> [torque-sql-exec] com.sap.dbtech.jdbc.exceptions.DatabaseException: [-7006] (at 63): Reserved identifier not allowed
> [torque-sql-exec] Failed to execute: ALTER TABLE TURBINE_SCHEDULED_JOB ADD PRIMARY KEY (JOB_ID) 
> [torque-sql-exec] com.sap.dbtech.jdbc.exceptions.DatabaseException: [-4004] (at 13): Unknown table name:TURBINE_SCHEDULED_JOB
> [torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/turbine-schema-idtable-init.sql
> [torque-sql-exec] 33 of 36 SQL statements executed successfully
> [torque-sql-exec] Our new url -> jdbc:sapdb://uny-dev-mysql/aportal
> [torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/aportal-schema.sql
> [torque-sql-exec] Executing file: /home/chris/eclipse/aportal/WEB-INF/src/sql/aportal-schema-idtable-init.sql
> [torque-sql-exec] 68 of 71 SQL statements executed successfully
> 
> how can i handle the column names used in the table
> TURBINE_SCHEDULED_JOB?
> 
> thx, Chris
> 
> 

-- 
Regards,

Jeffery Painter

- --
painter@kiasoft.com                     http://kiasoft.com
PGP FP: 9CE8 83A2 33FA 32B1 0AB1  4E62 E4CB E4DA 5913 EFBC

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
 
iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U
YNXabx7DZOV2Hd9LwSTmGpY=
=dWiu
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org