You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jerome Verleyen <je...@ibt.unam.mx> on 2001/06/15 01:57:57 UTC

Posgresql Problem solved??

Helo,
I'm just try a patch it seem to correct a littel the problem with
Postgresql..
I'm found that the problem was at first to crete a new user, because
this Hashtable is null at this time...
So, i just put a test this in the BasePeer.java and it's going on..If
the Hastable is null, we do nothing..
I don't know who can use this patch, or if it's correct..
But i'm trying to modify later a new user, to add new role, and so one..
And it seem to work.

Thank to say me if it could be usable by anyone..

Jerome Verleyen



-- 
 Internet, �a rend con et �a abime les yeux.
 Feriez mieux de regarder la t�l�.
 -+- DM in: Guide du Cabaliste Usenet - Quelques �vidences -+-

Re: Posgresql Problem solved??

Posted by Gunnar Rønning <gu...@polygnosis.com>.
* Daniel Rall <dl...@finemaltcoding.com> wrote:
|
| Gunnar Rønning <gu...@polygnosis.com> writes:
| 
| > Why not remove the BLOB field in Turbine and instead remodel, so you get a 
| > better relational schema. That would also give Turbine a datamodel that is 
| > independent of Java...
| 
| Hashtable's functionality is easily duplicated in other languages
| (i.e. LISP's alist as an example).
| 

Of course hashtables exist in other languages, but other languages may have 
problems with understanding the serialized version of a Java hashtable ;-)


-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/

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


Re: Posgresql Problem solved??

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Gunnar Rønning <gu...@polygnosis.com> writes:

> Why not remove the BLOB field in Turbine and instead remodel, so you get a 
> better relational schema. That would also give Turbine a datamodel that is 
> independent of Java...

Hashtable's functionality is easily duplicated in other languages
(i.e. LISP's alist as an example).

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


Re: Posgresql Problem solved??

Posted by Jason van Zyl <jv...@apache.org>.
On 6/21/01 8:23 AM, "Gunnar Rønning" <gu...@polygnosis.com> wrote:


> Do anybody have postgresql working with Turbine at the moment ?

Everything works fine except for blobs.
 
> Why not remove the BLOB field in Turbine and instead remodel, so you get a
> better relational schema. That would also give Turbine a datamodel that is
> independent of Java...

We can do that for the user table, but there is still the general
problem of the peers/village not working with blobs. People may
want to use blobs for other things.

 
> regards, 
> 
>       Gunnar

-- 

jvz.

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: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: Posgresql Problem solved??

Posted by Gunnar Rønning <gu...@polygnosis.com>.
* Jerome Verleyen <je...@ibt.unam.mx> wrote:
|

| The first method executed on the class BasePeer, that is
| initTableSchema(String tableName,String dbName), that do this:
|  
| 	Connection connection = db.getConnection();
| 	schema = new Schema().schema(connection, tableName);
| 
| So, when i go to Schema class, the resultSet returned indicate that the
| record "OBJECTDATA" is of type "4", that's like an integer.
| 
| I've make the SAME command in a java program very simple, to do the same
| request of the same table TURBINE_USER. And in this case, the type of
| the record "OBJECTDATA" is in the good values, that is "-3" (Varbinary).
| 
| So, if someone can suggest me where to search??
| 

Sounds like a possible CLASSPATH problem. I noticed that it were a postgresql
jdbc driver included in the 2.1 tdk distro, so it may be this one causing your
problem ? 

Do anybody have postgresql working with Turbine at the moment ?

Why not remove the BLOB field in Turbine and instead remodel, so you get a 
better relational schema. That would also give Turbine a datamodel that is 
independent of Java...

regards, 

        Gunnar
-- 
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/

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


Re: Posgresql Problem solved??

Posted by Jerome Verleyen <je...@ibt.unam.mx>.
Daniel Rall wrote:
> 
> Let us know what you find out.
> 
> 
It's to be crazy!
The first method executed on the class BasePeer, that is
initTableSchema(String tableName,String dbName), that do this:
 
	Connection connection = db.getConnection();
	schema = new Schema().schema(connection, tableName);

So, when i go to Schema class, the resultSet returned indicate that the
record "OBJECTDATA" is of type "4", that's like an integer.

I've make the SAME command in a java program very simple, to do the same
request of the same table TURBINE_USER. And in this case, the type of
the record "OBJECTDATA" is in the good values, that is "-3" (Varbinary).

So, if someone can suggest me where to search??

Thank's .

I'm replying on this list, because it seem to be more adequate.


-- 
 «Big boss, est-ce que le firewall kille le Supersedes ? »
 En français pour MB: «Chef, est ce que le coupe-feu est étanche au 
 "change pas de main, je sens que ça vient" ? » 
 -+- JCR in: Guide du Cabaliste Usenet - Usenet est-il inflammable ? -+-

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


Re: Posgresql Problem solved??

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jerome Verleyen <je...@ibt.unam.mx> writes:

> But i'm trying to figure out why this problem.. And i'm just found that
> Village work fine in a standalone program whith village package.
> The problem is, the colMap referencing the Hashtable is at first in a
> good type (also Hashtable) ( in the turbineMapBuilder class ), but when
> is the time to save the data in the database, the type is now like
> Integer.. And so, the problem occur to save this.
> 
> I'm continuing to fond where this change occur.. 

Let us know what you find out.

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


Re: Posgresql Problem solved??

Posted by Jerome Verleyen <je...@ibt.unam.mx>.
Daniel Rall wrote:

> 
> As mentioned MANY TIMES previously, there is an bug in the version of
> Village we are using with regard to PostgreSQL.
> 
> Daniel
> 

Yes Daniel.
But i'm trying to figure out why this problem.. And i'm just found that
Village work fine in a standalone program whith village package.
The problem is, the colMap referencing the Hashtable is at first in a
good type (also Hashtable) ( in the turbineMapBuilder class ), but when
is the time to save the data in the database, the type is now like
Integer.. And so, the problem occur to save this.

I'm continuing to fond where this change occur.. 

Thank's.

Jerome Verleyen
 
-- 
 JYB: Y paraît que si on superpose une gigogne mâle et une gigogne 
 femelle, ça donne une petite gigogne.
 JC:  Tsssk, tout le monde sait bien qu'une gigogne, c'est homosexuel !
 -+- in: Guide du Cabaliste Usenet - FAQ fr.reseaux.telecoms.techniques
-+-

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


Re: Posgresql Problem solved??

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jerome Verleyen <je...@ibt.unam.mx> writes:

> John Menke wrote:
> > 
> > Jerome,  you suggest using this instead of commenting out the line:
> > 
> > "criteria.add( TurbineUserPeer.OBJECT_DATA, permData );"
> > 
> > from the method "buildCriteria(User user)" of the class
> > 
> > TurbineUserPeer.java ?
> > 
> It seem to be best, no?
> BEcause i can't really know now how use turbine the permstorage..
> But this change in the BasePeer permit to pass whith Postgresql. That is
> if the permstarage, a hashtable, is null.
> 
> But i can realize why it bug uniquely whith postgresql. If someone can
> respond to me..))

As mentioned MANY TIMES previously, there is an bug in the version of
Village we are using with regard to PostgreSQL.

Daniel

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


Re: Posgresql Problem solved??

Posted by Jerome Verleyen <je...@ibt.unam.mx>.
John Menke wrote:
> 
> Jerome,  you suggest using this instead of commenting out the line:
> 
> "criteria.add( TurbineUserPeer.OBJECT_DATA, permData );"
> 
> from the method "buildCriteria(User user)" of the class
> 
> TurbineUserPeer.java ?
> 
It seem to be best, no?
BEcause i can't really know now how use turbine the permstorage..
But this change in the BasePeer permit to pass whith Postgresql. That is
if the permstarage, a hashtable, is null.

But i can realize why it bug uniquely whith postgresql. If someone can
respond to me..))

Jerome Verleyen

-- 
 RÈGLES POUR LA CRÉATION DE NOUVEAUX GROUPES DANS LA HIÉRARCHIE "FR"
 Chacun fera comme bon lui semble. C'est tellement plus facile comme
cela. 
 -+- CW in: Guide du Cabaliste Usenet - Du bon usage de n'importe quoi
-+-

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


RE: Posgresql Problem solved??

Posted by John Menke <jo...@murphyfutures.com>.
Jerome,  you suggest using this instead of commenting out the line:

"criteria.add( TurbineUserPeer.OBJECT_DATA, permData );"

from the method "buildCriteria(User user)" of the class

TurbineUserPeer.java ?



> -----Original Message-----
> From: jerome@ibt.unam.mx [mailto:jerome@ibt.unam.mx]
> Sent: Thursday, June 14, 2001 7:58 PM
> To: turbine-user@jakarta.apache.org
> Subject: Posgresql Problem solved??
>
>
> Helo,
> I'm just try a patch it seem to correct a littel the problem with
> Postgresql..
> I'm found that the problem was at first to crete a new user, because
> this Hashtable is null at this time...
> So, i just put a test this in the BasePeer.java and it's going on..If
> the Hastable is null, we do nothing..
> I don't know who can use this patch, or if it's correct..
> But i'm trying to modify later a new user, to add new role, and so one..
> And it seem to work.
>
> Thank to say me if it could be usable by anyone..
>
> Jerome Verleyen
>
>
>
> --
>  Internet, ça rend con et ça abime les yeux.
>  Feriez mieux de regarder la télé.
>  -+- DM in: Guide du Cabaliste Usenet - Quelques évidences -+-


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