db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject TorqueSecurityService fails tests/NPE in BasePeer
Date Sat, 18 Aug 2007 13:59:58 GMT
Hi folks,

I'm in the process of making Turbine 2.3.3 "Torque 3.3" safe. (Torque
folks, please read on!) This involved changing DBSecurityService to
extend TorqueSecrityService and fixing the OM-classes in the Turbine
code base. I will comment on this separately.

Now after doing this, the TurbineSecurity tests failed on me. So I
thought I broke this. But further debugging showed that I get a
NullPointerException in BasePeer.doSelect() because the database adapter
of the "default" database is null (This has always been the case!).

This is a standard operation that happens with every doSelect() call and
would have been surfaced long ago, so I'm puzzled why this happens here.
Obviously some mapping from the "default" database reference to the real
database object is missing. The only difference of the call in
TorqueSecurityService is that the Peer class methods are being called by
introspection.

I managed to fix it by adding the DBAdapter in addition to the
DataSourceFactory of the default database to the "reference database". I
suspect, however, that this only cured a symptom, not the real cause.
Any help on this is appreciated.

Still puzzled,
Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message