Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 52526 invoked from network); 29 Dec 2005 13:27:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Dec 2005 13:27:54 -0000 Received: (qmail 30091 invoked by uid 500); 29 Dec 2005 13:27:53 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 30079 invoked by uid 99); 29 Dec 2005 13:27:53 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2005 05:27:53 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of nicolas.jouanin@gmail.com designates 64.233.184.199 as permitted sender) Received: from [64.233.184.199] (HELO wproxy.gmail.com) (64.233.184.199) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2005 05:27:51 -0800 Received: by wproxy.gmail.com with SMTP id 50so1477881wri for ; Thu, 29 Dec 2005 05:27:31 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=T+uo16SrJDRCy+kIIzMQQtOpWwEJnCOoN50D71Z9bOMfHeaHlMzxZylO8f8bb3UGqRB0L8tBWaOt0+TXGj03xhbYZCkR6Tm2IL/hN4RTIhFGENL6uPRkRK6eoDDNwKDtr6wBNH4cscrVdys2PaJcheOPg7/Lk8ZPEAldMX1JaDU= Received: by 10.64.21.10 with SMTP id 10mr2736054qbu; Thu, 29 Dec 2005 05:27:30 -0800 (PST) Received: by 10.64.178.2 with HTTP; Thu, 29 Dec 2005 05:27:30 -0800 (PST) Message-ID: <2bb467fc0512290527q2502c24cx@mail.gmail.com> Date: Thu, 29 Dec 2005 14:27:30 +0100 From: Nicolas Jouanin To: jackrabbit-dev@incubator.apache.org Subject: Re: Oracle as Persistence manager In-Reply-To: <90a8d1c00512290457m765e5619x47eb70c6e70820b3@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_38537_5567436.1135862850737" References: <90a8d1c00512210430k792b561al71839dddaa726cdc@mail.gmail.com> <43b3ca29.64181371.69ba.5d7a@mx.gmail.com> <90a8d1c00512290457m765e5619x47eb70c6e70820b3@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_38537_5567436.1135862850737 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 2005/12/29, Stefan Guggisberg : > > On 12/29/05, nicolas.jouanin wrote: > > Hi, > > That's what happened actually, we were not talking of the same thing... > > > > If I understand correctly, we should use DbFileSystem AND > > SimpleDbPersistenceManager if we want a complete DB repository. > > correct. the downside is that that the repository state and workspace > configuration is not easily accessible/readable any more. Still accessible through SQL select statements or is everything put into blob ? > > > My comments: > > Errors occurs when trying to insert the root folder in FSENTRY because > it > > tries to insert a string of length zero in field FSENTRY_NAME : in the > case > > of the root folder, FSENTRY_NAME is '' and FSENTRY_PATH is '/'. > > So, one solution (for Oracle and may be others) could be to not split > PATH > > and NAME and store the complete path into a single field which would > never > > be '', even for the root which would be '/' in that case. The index > primary > > key could be then set to this column. Concerning DbFileSystem, it would > only > > need to be modified to stop splitting PATH and NAME , and manage this > > difference. > > May be there's something I don't see and splitted PATH is needed > somewhere > > else, but I can try to write a DbFileSystem modified to do what I > explained. > > the reason why path and name are splitted is that it e.g. allows to easil= y > and > efficiently list child entries of a folder. have a look at the sql stmts > used by > DbFileSystem. In that case , the LIKE operator can also be used to get the children of a folder. It's still efficient because Oracle can still use a range scan of the indexed column. Nevertheless ,the best way to get children given a folder is through a foreign key which could be null for the root folder. cheers > stefan > > > > > Regards, > > > > Nicolas. > > > > -----Message d'origine----- > > De: Stefan Guggisberg [mailto:stefan.guggisberg@gmail.com] > > Envoy=E9: mercredi 21 d=E9cembre 2005 13:31 > > =C0: jackrabbit-dev@incubator.apache.org > > Objet: Re: Oracle as Persistence manager > > > > i assume antonis is talking of DbFileSystem whereas nicolas > > is referring to SimpleDbPersistenceManager. > > > > to sum it up: > > - using SimpleDbPersistenceManager for oracle seems to > > be no problem (with the right .ddl) as no empty strings > > are stored. > > - DbFileSystem needs to be adapted/tweaked for oracle > > because of oracle's rather peculiar and non-standard > > emtpy value handling 'feature' ("" is treated as null :( > > > > please note that normally you don't need DbFileSystem. > > using SimpleDbPersistenceManager with LocalFileSystem > > is absolutely fine. > > > > cheers > > stefan > > > > > > > > On 12/20/05, nicolas.jouanin wrote: > > > Hi, > > > > > > May be we misunderstood one what we do each other ... > > > > > > I wrote oracle.ddl from mysql.dll which is the > > > org.apache.jackrabbit.core.state.db package. > > > > > > This files contains DDL commands for creating tables: > > > xxx_BINVAL > > > xxx_NODE > > > xxx_PROPS > > > xxx_REFS > > > (where xxx is ${schemaObjectPrefix}) > > > > > > The error message you report (ORA-01400:cannot insert NULL into > > > ("RABBIT"."REP_FSENTRY"."FSENTRY_NAME")) tells that you have an error > when > > > trying to insert a NULL in column FSENTRY_NAME of table REP_FSENTRY, > which > > > doesn't correspond to the tables I have on my side ... > > > > > > So we are not talking about the same, or may be I missed something. > Let me > > > know ! > > > > > > Regards, > > > > > > Nicolas. > > > > > > -----Message d'origine----- > > > De: Antonis Tsaltas [mailto:Antonis.Tsaltas@eurodyn.com] > > > Envoy=E9: mardi 20 d=E9cembre 2005 14:19 > > > =C0: jackrabbit-dev@incubator.apache.org > > > Objet: Re: Oracle as Persistence manager > > > > > > Nicolas Jouanin wrote: > > > > > > >Hi, > > > > > > > >As i said, may be it comes from the fact that the orginial ddl file = ( > > > >mysql.ddl) uses CHAR type for table columns. I replaced them by > VARCHAR2 > > > >columns. > > > >Have your tried the same, or have you let let the CHAR datatype ? > > > > > > > >I'll try to get back to CHAR datatype and try to run jLibrary with > > it.I'll > > > >tell you the result. > > > > > > > > > > > >2005/12/20, Antonis Tsaltas : > > > > > > > > > > > >>nicolas.jouanin wrote: > > > >> > > > >> > > > >> > > > >>>Hi, > > > >>> > > > >>> > > > >>> > > > >>>I read a previous thread concerning the use of Oracle with > JackRabbit > > > >>>(see below for copy). > > > >>> > > > >>>As written, it seems not so simple to make it work. > > > >>> > > > >>>Nevertheless, I wrote an oracle.ddl file (attached to this email) > > > >>>based on mysql.ddl where I simply replaced some data types: > > > >>> > > > >>>- longblob -> blob > > > >>> > > > >>>- char -> varchar2 (Oracle doesn't like char) > > > >>> > > > >>> > > > >>> > > > >>>Then I configured repository.xml correctly and used this > configuration > > > >>>to run this famous jLibrary software. To my surprise it worked, an= d > > > >>>managed to create a repository, and add some nodes : some jlibrar= y > > > >>>folders, and some PDF documents node. > > > >>> > > > >>> > > > >>> > > > >>>So , it may be need some more testing ; has someone achieved to > make > > > >>>jackrabbit run with Oracle, let me know. > > > >>> > > > >>> > > > >>> > > > >>>Regards, Nicolas. > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>>Original message: > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>>Antonis Tsaltas > > > >>> > > > >>>to jackrabbit-dev > > > >>> > > > >>> More options Dec 15 (3 days ago) > > > >>> > > > >>>Dear all, > > > >>> > > > >>> > > > >>> > > > >>>I am trying to use oracle with jackrabbit and the steps I have > followed > > > >>> > > > >>>are the following: > > > >>> > > > >>> > > > >>> > > > >>>1) I have created the ddl files needed for creating the schemas > with > > > >>> > > > >>>oracle database similar to the existing ones and add them to the > > > >>> > > > >>>appropriate package in the jackrabbit jar generated after the > build. > > > >>> > > > >>>However, when I tried to run a sample application I got nested > > > >>> > > > >>>exceptions during the configuration of the repository and more > specific > > > >>> > > > >>>during the insertion of the root node due to the case that Oracle > is > > > >>> > > > >>>treating an emptry string and null as the same and the fsname of > the > > > >>> > > > >>>root node is empty string. > > > >>> > > > >>> > > > >>> > > > >>>2) Next I tried to allow nullable values for the fsname as this > will > > > >>> > > > >>>only be the case for the root node and there will be no manual > updates > > > >>> > > > >>>to the repository. At this point it failed again when it tried to > add > > an > > > >>> > > > >>>entry '/meta' in fsentries table when it was checking if the paren= t > of > > > >>> > > > >>>this node exists (which is root node '/' ). There it performs the > > > >>> > > > >>>following query: > > > >>> > > > >>> > > > >>> > > > >>>select 1 from REP_FSENTRY where FSENTRY_PATH =3D '/' and > > > >>> > > > >>>FSENTRY_NAME is null > > > >>> > > > >>> > > > >>> > > > >>>which is in oracle equivalent with this: > > > >>> > > > >>> > > > >>> > > > >>>select 1 from REP_FSENTRY where FSENTRY_PATH =3D '/' and > > > >>> > > > >>>FSENTRY_NAME=3D'' > > > >>> > > > >>> > > > >>> > > > >>>and then it tries to insert the root node again but there is the > > logical > > > >>> > > > >>>constraint: > > > >>> > > > >>> > > > >>> > > > >>>create unique index ${schemaObjectPrefix}FSENTRY_IDX on > > > >>> > > > >>>${schemaObjectPrefix}FSENTRY > > > >>> > > > >>> (FSENTRY_PATH, FSENTRY_NAME). > > > >>> > > > >>> > > > >>> > > > >>>Are there any suggestion or does anyone know if jackrabbit can wor= k > > fine > > > >>> > > > >>>with oracle db server? > > > >>> > > > >>> > > > >>> > > > >>>Thanx > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> Stefan Guggisberg > > > >>> > > > >>>to jackrabbit-dev > > > >>> > > > >>> More options Dec 15 (3 days ago) > > > >>> > > > >>>hi antonis > > > >>> > > > >>>- Show quoted text - > > > >>> > > > >>> > > > >>> > > > >>>well there's no reason why that shouldn't be the case in general. > > > >>> > > > >>>but because of oracle's rather exotic and non-standard 'feature' o= f > > > >>>treating > > > >>> > > > >>>empty values as null you will probably have to write some oracle > > > >>> > > > >>> > > > >>specific > > > >> > > > >> > > > >>>code :( > > > >>> > > > >>> > > > >>> > > > >>>cheers > > > >>> > > > >>>stefan > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > >>>>Thanx > > > >>>> > > > >>>> > > > >>Hi Nicolas, > > > >> > > > >>I tried to do what you described in your mail from scratch, but the > > > >>exception that I received during configuration of the repository is > the > > > >>following, which is due to Oracle's aproach of treating NULL and > empty > > > >>string in the same way (for the root node tries to insert '/' as > path > > > >>and '' as name where it fails): > > > >> > > > >>org.apache.jackrabbit.core.config.ConfigurationException: File > system > > > >>initialization failure.: failed to initialize file system: failed t= o > > > >>create folder entry: /: ORA-01400: cannot insert NULL into > > > >>("RABBIT"."REP_FSENTRY"."FSENTRY_NAME") > > > >>: failed to initialize file system: failed to create folder entry: > /: > > > >>ORA-01400: cannot insert NULL into > > ("RABBIT"."REP_FSENTRY"."FSENTRY_NAME") > > > >> > > > >> at > > > >>org.apache.jackrabbit.core.config.FileSystemConfig.init( > > > >>FileSystemConfig.java:61) > > > >> at > > > >>org.apache.jackrabbit.core.config.RepositoryConfig.init( > > > >>RepositoryConfig.java:250) > > > >> at > > > >>org.apache.jackrabbit.core.config.RepositoryConfig.create( > > > >>RepositoryConfig.java:136) > > > >> at > > > >>org.apache.jackrabbit.core.config.RepositoryConfig.create( > > > >>RepositoryConfig.java:78) > > > >> at > > > >>org.apache.jackrabbit.core.jndi.BindableRepository.init( > > > >>BindableRepository.java:122) > > > >> at > > > >>org.apache.jackrabbit.core.jndi.BindableRepository.create( > > > >>BindableRepository.java:110) > > > >> at > > > >>org.apache.jackrabbit.core.jndi.RegistryHelper.registerRepository( > > > >>RegistryHelper.java:57) > > > >> at > > ed.doc.mgt.test.RepositoryManager.(RepositoryManager.java:82) > > > >> at > > > >>ed.doc.mgt.test.RepositoryManager.configRep(RepositoryManager.java > :465) > > > >> at > > ed.doc.mgt.test.RepositoryManager.main(RepositoryManager.java:443) > > > >>Caused by: org.apache.jackrabbit.core.fs.FileSystemException: faile= d > to > > > >>initialize file system: failed to create folder entry: /: ORA-01400= : > > > >>cannot insert NULL into ("RABBIT"."REP_FSENTRY"."FSENTRY_NAME") > > > >> > > > >> at > > > > > >>org.apache.jackrabbit.core.fs.db.DbFileSystem.init(DbFileSystem.java > :344) > > > >> at > > > >>org.apache.jackrabbit.core.config.FileSystemConfig.init( > > > >>FileSystemConfig.java:55) > > > >> ... 9 more > > > >>Caused by: org.apache.jackrabbit.core.fs.FileSystemException: faile= d > to > > > >>create folder entry: /: ORA-01400: cannot insert NULL into > > > >>("RABBIT"."REP_FSENTRY"."FSENTRY_NAME") > > > >> > > > >> at > > > >>org.apache.jackrabbit.core.fs.db.DbFileSystem.createDeepFolder( > > > >>DbFileSystem.java:1256) > > > >> at > > > >>org.apache.jackrabbit.core.fs.db.DbFileSystem.verifyRoodExists( > > > >>DbFileSystem.java:1225) > > > >> at > > > > > >>org.apache.jackrabbit.core.fs.db.DbFileSystem.init(DbFileSystem.java > :338) > > > >> ... 10 more > > > >>Caused by: java.sql.SQLException: ORA-01400: cannot insert NULL int= o > > > >>("RABBIT"."REP_FSENTRY"."FSENTRY_NAME") > > > >> > > > >> > > > >> > > > >> > > > >> > > > > > > > > > > > > > > > Hi, > > > > > > Yes I have done that. However, the error does not seem to be relevant > to > > > that. > > > > > > > > > > > ------=_Part_38537_5567436.1135862850737--