Hi David,
can I see how you use database authentication in your site structure?
I think you have a fixed datasource name there that doesn't exist in
your setup.
Best regards,
Geert
On 16-mrt-06, at 10:12, David Herbert wrote:
Hello,
I am trying to ensure that the configuration for my application on
local and live servers is as quick and painless as possible to
switch over. To this end I've created different rep/config files
for the two situations with a common core set of config included by
both. So far so good. I also have two different sets of
postgresql details for the two servers, so I create the XML for my
rep/datasources.xml thus:
<datasources>
<datasource name="postgresql_local">
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql://localhost:5432/test</url>
<user>postgres</user>
<password>thepassword</password>
<poolsize>5</poolsize>
</datasource>
<datasource name="postgresql_live">
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgresql://ct_tomcat:5432/ito</url>
<user>tomcat</user>
<password>thepassword</password>
<poolsize>5</poolsize>
</datasource>
</datasources>
Then in config_local.xml (for my local server) I do:
<config>
<param name="DATASOURCE">postgresql_local</param>
<include file="rep/config_common.xml"/>
</config>
and similarly for config_live.xml. The participants file looks like:
<rep>
<participant param="rep/config_local.xml">ParticipantConfig</
participant>
<participant param="rep/
datasources.xml">ParticipantDatasources</participant>
<participant param="sites/locreport.xml">ParticipantSite</
participant>
</rep>
However, on running the app, I get a "datasource can't be null"
message during RIFE's setup phase thus:
java.lang.IllegalArgumentException
datasource can't be null.
at com.uwyn.rife.database.DbQueryManagerFactory getInstance
( DbQueryManagerFactory.java : 76 )
at com.uwyn.rife.database.DbQueryManagerFactory getInstance
( DbQueryManagerFactory.java : 53 )
at
com.uwyn.rife.authentication.sessionmanagers.DatabaseSessionsFactory
getInstance ( DatabaseSessionsFactory.java : 22 )
at
com.uwyn.rife.authentication.elements.PurgingDatabaseAuthenticatedDepl
oyer deploy ( PurgingDatabaseAuthenticatedDeployer.java : 61 )
at com.uwyn.rife.engine.ElementInfo deploy
( ElementInfo.java : 253 )
at com.uwyn.rife.engine.SiteBuilder setupElements
( SiteBuilder.java : 974 )
at com.uwyn.rife.engine.SiteBuilder setupData
( SiteBuilder.java : 1590 )
at com.uwyn.rife.engine.SiteBuilder finish
( SiteBuilder.java : 253 )
at com.uwyn.rife.engine.SiteBuilder process
( SiteBuilder.java : 244 )
at com.uwyn.rife.engine.SiteBuilder getSite
( SiteBuilder.java : 176 )
at com.uwyn.rife.rep.participants.ParticipantSite initialize
( ParticipantSite.java : 36 )
at com.uwyn.rife.rep.participants.ParticipantSite _getObject
( ParticipantSite.java : 49 )
at com.uwyn.rife.rep.BlockingParticipant getObject
( BlockingParticipant.java : 471 )
at com.uwyn.rife.rep.BlockingParticipant _getObject
( BlockingParticipant.java : 447 )
at com.uwyn.rife.rep.BlockingParticipant getObject
( BlockingParticipant.java : 415 )
at com.uwyn.rife.engine.Site getRepInstance ( Site.java :
158 )
at com.uwyn.rife.engine.Gate obtainSite ( Gate.java : 185 )
My question is - should I be able to specify multiple postgresql
datasources as I've done here? I think so, and I even have another
app which appears to work doing this! However, I can't get this
one to run at all, and I'm at a loss. Can anyone help? I note
that if I simply return to a datasource called "postgresql" it
works ok. If multiple datasources isn't possible like this, what's
the best way of handling multiple sets of details for different
servers?
Thanks,
David Herbert.
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED]
"Use what you need" Avenue de Scailmont 34 Skype: gbevin
http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin
gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599
PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9
Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users