You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Age Mooy <am...@home.nl> on 2002/03/01 13:35:25 UTC

RE: TDK snapshot incl. decoupled torque (buglist)

Hi,

I've generated an application with the latest tdk snapshot (16-02-2002) but I ran into some problems with the
"ant init" process. Here is a list:

- The "setDatabaseUrl" target in build.xml (line 285) still checks for the old "build.databaseUrl" property
while someone has renamed that property to "createDatabaseUrl" in build.properties. This causes problems when
using Hypersonic as the database because Torque doesn't recognize the ${applicationRoot var and needs a
hardcoded path in the url}. It might be a good idea to build variable substitution of ${applicationRoot} and
${webappRoot} into Torque, like in Turbine.java...

- In the "insert-sql-files" target, the discovered "createDatabaseUrl" property is not handed through when
calling "project-insert-sql" in the torque build file. This means the "createDatabaseUrl" is never used by
Torque, which leads to the same Hypersonic problems as described above

- As reported earlier by Thomas Noetzold, the turbine tables did not have entries in the ID_TABLE. I still
don't know what goes wrong during the "insert-sql-files" target but I only got it to work by deleting all
other generated sql files and editing the sqldb.map to only rederence the turbine-schema-idtable-init.sql
file.

- The WEB-INF directory of the new app contains a "db" directory that is obviously meant to hold a hypersonic
database. After replacing "${applicationRoot}" with "../" in the build.properties, the hypersonic database was
generated into that directory. But the default url for hypersonic is "hsqldb:${applicationRoot}/db/newapp".
This causes exceptions at runtime because the applicationRoot is interpreted as the directory that contains
the WEB-INF directory. Replacing "${applicationRoot}" with "${webappRoot}" had no effect ("${webappRoot}"
points to the same directory I guess). Only hardcoding "hsqldb:${applicationRoot}/WEB-INF/db/newapp" helped.

- whenever I startup the included tomcat 4.0.2, I get this error:
    log4j:ERROR No appenders could be found for category (org.apache.torque.adapter.DBFactory).
    log4j:ERROR Please initialize the log4j system properly.
I don't know enough about log4j

- when I stop the included tomcat 4.0.2 after adding a user with flux, I get this error
java.lang.NullPointerException
        at org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1655)
        at org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1594)
        at org.apache.turbine.om.security.peer.TurbineUserPeer.doUpdate(TurbineUserPeer.java:469)
        at org.apache.turbine.services.security.db.DBUserManager.store(DBUserManager.java:272)
rethrown as org.apache.turbine.util.security.DataBackendException: Failed to save user object
        at org.apache.turbine.services.security.db.DBUserManager.store(DBUserManager.java:276)
        at org.apache.turbine.services.security.BaseSecurityService.saveUser(BaseSecurityService.java:379)
        at org.apache.turbine.services.security.TurbineSecurity.saveUser(TurbineSecurity.java:261)
        at org.apache.turbine.om.security.TurbineUser.valueUnbound(TurbineUser.java:652)
        ...
maybe because Hypersonic doesn't have blobs ?

I hope this information is useful.
Regards,
Age



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


RE: TDK snapshot incl. decoupled torque (buglist)

Posted by Age Mooy <am...@home.nl>.
Martin,

I've found the reason why the turbine tables don't get an id_table entry during "ant init".

The different idtable-init.sql files delete eachother's entries because they are executed in the wrong order.

The "id-table-init-sql" task in build-torque.xml generates id_table entries for all schemas, including the
turbine schema. The task uses the project.props file to set the $initialID var to 101 and then generates an
idtable-init.sql file for each schema. Those generated idtable-init.sql files all start by deleting all ids >=
initialID.

The problem is that the "project-insert-sql" inserts these files in semi-random order, making the actual
number of idtable entries unpredictable.

The two solutions I can think of are:
- execute the idtable-init.sql files in the correct order (the same order as the id-table-init-sql task,
starting with the lowest initialID)
or
- stop deleting all ids >= initialID

A temporary workaround is to generate idtable-init.sql files that only delete their own range of ids like the
below example. But this is not foolproof because you run into problems when you start adding tables to your
schemas later on.

idtable.hypersonic
----------------------------
#set ($maxID = $initialID)
#foreach ($tbl in $tables)
#set ($maxID = $mxID + 1)
#end
delete from ID_TABLE where id_table_id >= $initialID and id_table_id < $maxID;

#foreach ($tbl in $tables)
insert into ID_TABLE (id_table_id, table_name, next_id, quantity) VALUES ($initialID, '$tbl.Name', 100, 10);
#set ( $initialID = $initialID + 1 )
#end
-----------------------
(The first #foreach is a bit awkward but $tables is an array and I don't know any way to get the size of an
array in Velocity)

I'm going to look into the two tasks to see if I can make them use the same order... or maybe someone knows a
better solution ?

Age




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


Re: TDK snapshot incl. decoupled torque (buglist)

Posted by Martin Poeschl <mp...@marmot.at>.
Age Mooy wrote:
> Hi,
> 
> I've generated an application with the latest tdk snapshot (16-02-2002) but I ran into some problems with the
> "ant init" process. Here is a list:

..

> I hope this information is useful.
> Regards,
> Age

thanx for the report!!

i'm working on the tdk again .. a new snapshot will be available soon

martin


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