After I got an working schema in Oracle I could start the allBuild.
But, alas, no luck.
After a lengthy period of debugging and even wrapping the Oracle jdbc driver in a patched version of P6Spy (great tool that is, it just didn't even log enough) I found two problems in the schema definitions which using HSQLDB won't be noticed.


First of all the size of VARCHAR fields. It turned out that PARAMETER.CLASS_NAME and PORTLET_PREFERENCE.CLASS_NAME are scaled way to small (30 and 50 characters). I don't know the formal maximum length of a class name but I would suggest defining 256 to be on the save side. For HSQLDB this isn't an issue at all because although you may define size restrictions on VARCHAR columns in practice these are simply ignored and any size is allowed.

Secondly, lots of the registry tables have an ID reference to JetspeedObjectID (which is internally just an int). In the schema definition these are just referenced as an INTEGER and OJB therefore will use (Prepared)Statement.setObject(index, anJetspeedObjectID, sql.Types.INTEGER). The Oracle jdbc driver chokes on that of course and throws correctly an ClassCastException. Not so with HSQLDB though. That seems handle this by new Integer(anJetspeedObjectID.toString()) or something like it.

The problem with using HSQLDB is thus that it isn't really a reliably database for testing if the schema definition is correct. Only a *real* rdbms will enforce the specifications.
Of course, HSQLDB is just fine as lightweight database for development
but for schema validation you can't depend on it.
Switching J2 development to use another, more reliable database isn't really practical because almost any other database requires much more setup and maintenance but still this the schema validation should be checked one way or the other (maybe McKoi db is more strict and as another lightweight db could be an option but it has a GPL license so that probably prohibits it for Apache usage).


Regards,

Ate

Ate Douma wrote:

I've created Blocking issue JS2-18 last night after a long frustrated day trying to get J2 ready to use Oracle as db.

In that issue I identified (at least) 5 major problems I like to ask attention to.

Although JIRA is fine for issue tracking I think the mailing list is more interactive to discuss these issues.
Therefore I created this mail as a wrapper for the several problems which I will describe separately as reply to this mail.


I am very dependent on Oracle for running J2 as it is required for my client. Furthermore, in our project we will start developing portlets based on J2 any time now (I know its kind of early for that but we need some result before the summer and hopefully our development will provide lots of feedback to J2 to help it get out of the door sooner).

Regards, Ate

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to