You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Marcus Flehmig <fl...@informatik.uni-kl.de> on 2002/03/06 09:37:22 UTC

Re: ObjectValidationFailedException

Marcus Flehmig wrote:
> 
> Hi,
> 
> we currently are developing a slide store implementation for
> the IBM/Informix database server and encountered the following
> problem: Slide throws a ObjectValidationFailedException.
> We are using Slide 1.0.16 and the bundled JDBCDescriptorsStore.
> 
> I'm getting crazy, because I can't find any reason why.
> The namespace initialization fails while loading namespace
> metabase base data (please see logs). The database schema
> is correctly built and empty. The first insert (into objects)
> seems ok, but after invoking JDBCDescriptorsStore.grantPermission,
> (which itself is done correctly, too) the above mentioned
> exception is thrown. I've added some logging information to
> the JDBCDescriptorsStore.grantPermission code. Therefore,
> the last line of that method was a getLogger Call and the
> text is written to the logfile, but the logcall in the context
> of the calling function (Namespace.loadBaseData), which would
> be the next statement after finishing the grantPermission call
> isn't reach. Instead a execption is thrown from the
> StandardStore.grantPermission method. But why is
> StandardStore.grantPermission also called?
> 
> Hope I got pointed out where the problems seems to be,
> but I hope it wasn't too confused? :)
> 
> I'm a little bit stumped. Any hints?
> 
> --
> Marcus Flehmig
> University of Kaiserslautern
> 

OK, if nobody else would has an answer i have to help me by myself.
While reviewing the code i recognized the cache mechanism and turned
it off. So, i found out that after writing a object/node to the 
Informix DBS it is immediately read from the database again, but it 
isn't read correctly. Because of using SQL CHAR type the text field 
is fixed length (about 4000 chars) and a fixed length 4000 char length
string object is returned back. In many cases it isn't really a problem, 
but the classnames wouldn't fit. Slide tries to call getClassbyName but 
can't find any. A ClassNotFoundException is thrown, but immediately catched
and wrap into a generic SlideException, some nulls are returned and after 
calling some default constructor a validition of an empty PermissionNode 
fails. Cool, a simple String.trim fixed it. OK, what have i learned from 
this lesson? SQL Char is per def. fixed length and if used calling trim is 
a good idea. Further, it would be better to stop the initialization process 
immediately after a problem occured. Otherwise, the system behavior isn't 
really deterministic anymore. Another big problem of real database server 
is to check if a very long text field is unique, i.e. it isn't possible 
in Informix to declare a long text field as primary key. Also, long fields 
are a problem for efficient indexing. Therefore, i'm going to redesign the 
db schema before making the InformixDescrStore public. 

Thanks,  
-- 
Marcus Flehmig
University of Kaiserslautern

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