You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-dev@incubator.apache.org by Ate Douma <at...@douma.nu> on 2005/04/06 14:10:05 UTC

Getting Graffito to work with Jetspeed-2-M2 and Oracle9i

Hello Team,

I thought I'd like to see how Graffito was progressing and started building it this morning
while trying to get it to work with Oracle9i (my primary db) and the new Jetspeed-2.0-M2.

Well, that took some time...
I'd like to help out with the project and can provide numerous fixes/patches but my time
for today is already running out (I've hacked my way through getting it to work, my changes
need cleanup before they can be committed).

But, I'd like to mention a few of the issues I encountered:

- Mapping java.sql.Date/java.util.Date to SQL TIMESTAMP fails on Oracle (ClassCastException)
   CmsObject.creationDate and CmsObject.lastModified are mapped as TIMESTAMP but in the java
   implementation they are defined as java.util.Date.
   And in several locations these are furthermore filled with java.sql.Date instances.
   As I expect you would like to store the full time part I modified the CmsObject interface
   to use java.sql.Timestamp for these fields instead (and adjusted all usages accordingly)
- Blob usage on Oracle
   OJB 1.0.1 doesn't handle Blob fields on Oracle. I've upgraded to OJB 1.0.2 (1.0.3 doesn't
   work with the version of Spring used for Graffito).
- Mapping of CmsObject.owner and CmsObject.language are defined required in the schema but
   not always filled in in the testcases. As I didn't think it should be required I made them
   optional (wondering how you can get past this on mysql though)
- project/build.properties are not complete. I was missing the following properties in the
   sample-build.properties (but they are included in site/build.properties.txt):
     org.apache.portals.graffito.database.ojb.plateform (note the typing error for platform)
     org.apache.portals.graffito.database.ojb.datasource


I'll can try to provide patches for these if you want but it will have to wait a bit because
my client just informed me I'll have to fix a problem for one of their developer teams.
Don't know yet if that'll be resolved today or in a week time ;-)

Anyway, I finally got Graffito up and running in Jetspeed-2.0-M2 and its looks great!
Congrats on that.

My client might be interested in having it integrated in their J2 portal so I might be working
with/on Graffito much more soon.

One thing I'm wondering about and I don't have the time anymore to look into for now so maybe
you can help me out here:
will it be easy to store the Content separately in the filesystem instead of the database?
I know that might introduce problems with locking etc. but that aside, will it be possible?

Regards, Ate


Re: Getting Graffito to work with Jetspeed-2-M2 and Oracle9i

Posted by David Sean Taylor <da...@bluesunrise.com>.
Christophe Lombart wrote:
> project has been updated  to use  OJB 1.0.2 et Spring 1.1.5.
> David, can you add OJB 1.0.2 in your maven repo. it is not present in 
> the ASF maven repo.
> 
done

Re: Getting Graffito to work with Jetspeed-2-M2 and Oracle9i

Posted by Ate Douma <at...@douma.nu>.

Christophe Lombart wrote:
> Ate Douma wrote:
> 
>> Hello Team,
>>
>> I thought I'd like to see how Graffito was progressing and started 
>> building it this morning
>> while trying to get it to work with Oracle9i (my primary db) and the 
>> new Jetspeed-2.0-M2.
>>
>> Well, that took some time...
>> I'd like to help out with the project and can provide numerous 
>> fixes/patches but my time
>> for today is already running out (I've hacked my way through getting 
>> it to work, my changes
>> need cleanup before they can be committed).
>>
>> But, I'd like to mention a few of the issues I encountered:
>>
>> - Mapping java.sql.Date/java.util.Date to SQL TIMESTAMP fails on 
>> Oracle (ClassCastException)
>>   CmsObject.creationDate and CmsObject.lastModified are mapped as 
>> TIMESTAMP but in the java
>>   implementation they are defined as java.util.Date.
>>   And in several locations these are furthermore filled with 
>> java.sql.Date instances.
>>   As I expect you would like to store the full time part I modified 
>> the CmsObject interface
>>   to use java.sql.Timestamp for these fields instead (and adjusted all 
>> usages accordingly)
> 
> 
> Code has been updated
I saw the commit messages come in already ;-)

> 
>> - Blob usage on Oracle
>>   OJB 1.0.1 doesn't handle Blob fields on Oracle. I've upgraded to OJB 
>> 1.0.2 (1.0.3 doesn't
>>   work with the version of Spring used for Graffito).
> 
> 
> 
> project has been updated  to use  OJB 1.0.2 et Spring 1.1.5.
> David, can you add OJB 1.0.2 in your maven repo. it is not present in 
> the ASF maven repo.
> 
>> - Mapping of CmsObject.owner and CmsObject.language are defined 
>> required in the schema but
>>   not always filled in in the testcases. As I didn't think it should 
>> be required I made them
>>   optional (wondering how you can get past this on mysql though)
> 
> 
> Can you give more info ? which unit test ?
> I tested with  TestContentModelService. If I drop setter methods for 
> owner & language, this unit test failed.
I don't remember anymore exactly, I'll have to rerun them with these field
required again (Sorry: don't have time right now to do so, but will try to
think of it. Probably from mid next week I'll have time again to look at it).

> 
> FYI, I want to make a proposal to change a little bit the Graffito 
> object model to gives more flexibility and build custom model depending 
> on the application needs.
> 
>> - project/build.properties are not complete. I was missing the 
>> following properties in the
>>   sample-build.properties (but they are included in 
>> site/build.properties.txt):
>>     org.apache.portals.graffito.database.ojb.plateform (note the 
>> typing error for platform)
>>     org.apache.portals.graffito.database.ojb.datasource
>>
> Typing error fixed.
> Drop duplicated file : sample-build.properties. 
> trunk/site/xdoc/build.properties.txt is the correct one (used to build 
> the Graffito site) .
> Graffito site will be updated.
> 
> Let me know if you still have some issues.
As I said, I'll test it out for sure sometime next week.
I'll try to provide patches then too for configuring Oracle database usage.

Regards, Ate

> 
> Thanks,
> Christophe
> 
> 
> 
> 
> 


Re: Getting Graffito to work with Jetspeed-2-M2 and Oracle9i

Posted by Christophe Lombart <ch...@sword-technologies.com>.
Ate Douma wrote:

> Hello Team,
>
> I thought I'd like to see how Graffito was progressing and started 
> building it this morning
> while trying to get it to work with Oracle9i (my primary db) and the 
> new Jetspeed-2.0-M2.
>
> Well, that took some time...
> I'd like to help out with the project and can provide numerous 
> fixes/patches but my time
> for today is already running out (I've hacked my way through getting 
> it to work, my changes
> need cleanup before they can be committed).
>
> But, I'd like to mention a few of the issues I encountered:
>
> - Mapping java.sql.Date/java.util.Date to SQL TIMESTAMP fails on 
> Oracle (ClassCastException)
>   CmsObject.creationDate and CmsObject.lastModified are mapped as 
> TIMESTAMP but in the java
>   implementation they are defined as java.util.Date.
>   And in several locations these are furthermore filled with 
> java.sql.Date instances.
>   As I expect you would like to store the full time part I modified 
> the CmsObject interface
>   to use java.sql.Timestamp for these fields instead (and adjusted all 
> usages accordingly)

Code has been updated

> - Blob usage on Oracle
>   OJB 1.0.1 doesn't handle Blob fields on Oracle. I've upgraded to OJB 
> 1.0.2 (1.0.3 doesn't
>   work with the version of Spring used for Graffito).


 project has been updated  to use  OJB 1.0.2 et Spring 1.1.5.
 David, can you add OJB 1.0.2 in your maven repo. it is not present in 
the ASF maven repo.

> - Mapping of CmsObject.owner and CmsObject.language are defined 
> required in the schema but
>   not always filled in in the testcases. As I didn't think it should 
> be required I made them
>   optional (wondering how you can get past this on mysql though)

Can you give more info ? which unit test ?
I tested with  TestContentModelService. If I drop setter methods for 
owner & language, this unit test failed.

FYI, I want to make a proposal to change a little bit the Graffito 
object model to gives more flexibility and build custom model depending 
on the application needs.

> - project/build.properties are not complete. I was missing the 
> following properties in the
>   sample-build.properties (but they are included in 
> site/build.properties.txt):
>     org.apache.portals.graffito.database.ojb.plateform (note the 
> typing error for platform)
>     org.apache.portals.graffito.database.ojb.datasource
>
Typing error fixed.
Drop duplicated file : sample-build.properties. 
trunk/site/xdoc/build.properties.txt is the correct one (used to build 
the Graffito site) .
Graffito site will be updated.

Let me know if you still have some issues.

Thanks,
Christophe