portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Kimpton <kimptoc_m...@yahoo.com>
Subject RE: dbpsml 2
Date Wed, 14 Nov 2001 11:13:11 GMT
Hi,

--- David Sean Taylor <david@bluesunrise.com> wrote:
> Yup, missed that one last night, thanks.
> The db psml isn't quite working, but its almost there.
> Also note that the file 'DatabasePsmlManager.java' has been moved
> from the
> psmlmanager package to the psmlmanager.db package
> 
> I've checked in a version of Torque under the build directory.
> From there you can run 'ant', and it will generate the sql to
> create the
> dbpsml tables.
> Edit build/torque/build.properties to change the target database.
> The file is written to src/sql/dbpsml-schema.sql, and the om files
> are
> written to src/java/org/apache/jetspeed/om/dbpsml
> I'd like to get this process working from the main jetspeed build,
> and also
> try to access torque templates from a jar.
> So the process will change,  when I get it working then Ill
> document the
> entire process.
> 

OK - here is try 2 with oracle...

NOTE: It rambles on a bit - so that you know what I did - how I found
what I did... which isn't much


Torque is new to me - so I could be doing something silly here...


PRE-REQUISITE - jakarta ant must be installed, such that "ant" is on
your path.


In the build/torque directory, I changed the build.properties file to
default to oracle.

I then ran "ant" to re-build the sql script and java peers - I
presume this built them into the correct directories...

I then ran the generated sql script found in
src/sql/dbpsml-schema.sql.

I hit a few oracle specific gotchas - not sure if this is torque or
config related.

. oracle RAW columns need a size - so I added one of 2000 to the
schema.
. UNIQUE in oracle also creates an index - so I removed the _INDEX
sections of the schema.

So - I now have a DB.

I then started tomcat.

NOTE:  I reverse the PsmlManager/ImportManager entries - this sorts
out the startup dependancy problems.

I then got a problem that the profile.getDocuments method in the
ProfilePeer's returns null.  THIS SEEMS TO BE THE MAIN PROBLEM.

Which seems to be wrong...

I put a guard around it - which gets me further - but the code seems
to be doing updates, not inserts - and thus is not saving the
profiles in the DB.

This seems to be due to the importer calling the .store method -
which assumes an update.

I switched this to create - obviously only valid the first time
through... but then again - I presume the PsmlImporter is a once off
facility too...  Once we have the profiles in the DB, I presume the
file based profiles are redundant...

I then found we needed ID_TABLE entries for the new tables.

Now the problem is the I cannot insert null in the profile column -
which is my problem that I avoided above.

So - any thoughts on why the profile.getDocument is null ?

Thanks,
Chris

=====
Need somewhere to Live in London? - Then go to http://freeflats.com

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message