You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Weaver, Scott" <Sw...@rippe.com> on 2001/12/19 16:53:17 UTC

RunData.getScreenTemplate() seems inconsistent

Turbine 2.2b1-HEAD-20011219

Question:  

Why does RunData.getScreenTemplate() return the template in the format of
"foo/bar", when the actual request was made as "foo,bar".  This is somewhat
confusing since the standard way to request templates is with a comma (,)
delimiter instead of a slash(/) delimiter.  

Is there a good reason this works this way?

p.s.
Also, there a Turbine class that will convert this for me, or should I just
use String.replace('/',',')?

Scott

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: "init" target error in TDK, using type "TEXT"

Posted by Scott Eade <se...@backstagetech.com.au>.
From: "Kevin Clark" <kc...@virtumundo.com>
> I've got the following line in my turbine-schema.xml:
>
> <column name="BODY" type="TEXT"/>

Try validating your schema against the dtd, I think you will find that TEXT
is not
a supported value.

> Also, I've put a couple of my own tables in turbine-schema.xml because
> one of the fields is a foreign key which references TURBINE_USER. When I
> put my tables in [appname]-schema.xml, the build failed because it
> couldn't find the TURBINE_USER table. Am I handling this correctly, or
> am I missing something?

Refer to the Extend-User-Howto.  As just mentioned in another post I have
a hack to fix the problem highlighted at the bottom of the howto that I can
post if you are interested.

> Thanks,
>
> -Kevin

HTH,

Scott


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: "init" target error in TDK, using type "TEXT"

Posted by Jason van Zyl <jv...@zenplex.com>.
On 12/19/01 2:28 PM, "Kevin Clark" <kc...@virtumundo.com> wrote:

> I've got the following line in my turbine-schema.xml:
> 
> <column name="BODY" type="TEXT"/>
> 
> When I build with the "init" target, I get:

Here is the dtd for the torque datamodel descriptor:

http://cvs.apache.org/viewcvs/jakarta-turbine-torque/src/dtd/database.dtd?re
v=1.8&content-type=text/vnd.viewcvs-markup

The supported types, the types used in the datamodel descriptor are JDBC
types, not the types support natively by your database.

Here is the the db.props file for MySQL:

http://cvs.apache.org/viewcvs/jakarta-turbine-torque/src/templates/sql/base/
mysql/db.props?rev=1.3&content-type=text/vnd.viewcvs-markup

You have to use one of the types specified in this file. We only support
JDBC types so we can handle the variety of databases and drivers. The native
"TEXT" type in MySQL isn't directly supported.
 
> BUILD FAILED
> /tdk/webapps/[appname]/WEB-INF/build/build.xml:207: Exception thrown by
> 'generator.parse'. For more information consult the velocity log.
> 
> And in velocity.log, I see:
> 
> Wed Dec 19 19:00:15 CST 2001  [error] Method get threw exception for
> reference $dbprops in template sql/base/mysql/col
> umns.vm at  [2,20]
> Wed Dec 19 19:00:15 CST 2001  [error] Method parse threw exception for
> reference $generator in template sql/base/mysql
> /table.vm at  [8,16]
> Wed Dec 19 19:00:15 CST 2001  [error] Method parse threw exception for
> reference $generator in template sql/base/Contr
> ol.vm at  [28,17]
> 
> I'm using MySQL. Everything builds fine if I use type "BLOB" or
> "VARCHAR"; however, when I use "TEXT" I get this error. Can somebody
> please help?
> 
> Also, I've put a couple of my own tables in turbine-schema.xml because
> one of the fields is a foreign key which references TURBINE_USER. When I
> put my tables in [appname]-schema.xml, the build failed because it
> couldn't find the TURBINE_USER table. Am I handling this correctly, or
> am I missing something?
> 
> Thanks,
> 
> -Kevin
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


"init" target error in TDK, using type "TEXT"

Posted by Kevin Clark <kc...@virtumundo.com>.
I've got the following line in my turbine-schema.xml:

	<column name="BODY" type="TEXT"/>

When I build with the "init" target, I get:

BUILD FAILED
/tdk/webapps/[appname]/WEB-INF/build/build.xml:207: Exception thrown by
'generator.parse'. For more information consult the velocity log.

And in velocity.log, I see:

Wed Dec 19 19:00:15 CST 2001  [error] Method get threw exception for
reference $dbprops in template sql/base/mysql/col
umns.vm at  [2,20]
Wed Dec 19 19:00:15 CST 2001  [error] Method parse threw exception for
reference $generator in template sql/base/mysql
/table.vm at  [8,16]
Wed Dec 19 19:00:15 CST 2001  [error] Method parse threw exception for
reference $generator in template sql/base/Contr
ol.vm at  [28,17]

I'm using MySQL. Everything builds fine if I use type "BLOB" or
"VARCHAR"; however, when I use "TEXT" I get this error. Can somebody
please help?

Also, I've put a couple of my own tables in turbine-schema.xml because
one of the fields is a foreign key which references TURBINE_USER. When I
put my tables in [appname]-schema.xml, the build failed because it
couldn't find the TURBINE_USER table. Am I handling this correctly, or
am I missing something?

Thanks,

-Kevin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: RunData.getScreenTemplate() seems inconsistent

Posted by Brian Lawler <bl...@branuity.com>.
Scott-

data.getParameters().get("template") will give you the actual template argument
(the one with foo,bar.vm).  My guess is that getScreenTemplate() is a useful
function for code that is trying to find the actual template file, which would
need foo/bar.vm.  In fact, the code of getScreenTemplate() actually does the
string replacement you suggest, but in the other direction!

-Brian

On Wed, 19 Dec 2001 10:53:17 -0500
"Weaver, Scott" <Sw...@rippe.com> wrote:

> Turbine 2.2b1-HEAD-20011219
> 
> Question:  
> 
> Why does RunData.getScreenTemplate() return the template in the format of
> "foo/bar", when the actual request was made as "foo,bar".  This is somewhat
> confusing since the standard way to request templates is with a comma (,)
> delimiter instead of a slash(/) delimiter.  
> 
> Is there a good reason this works this way?
> 
> p.s.
> Also, there a Turbine class that will convert this for me, or should I just
> use String.replace('/',',')?
> 
> Scott
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


-- 
Brian Lawler


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>