As an indication for your servicecontract do:
set servicecontract "portal_datasource" (for portlet)
or
set servicecontract "dotlrn_applet" (for applet)
select acs_sc_impls.impl_name
from acs_sc_impls,
acs_sc_bindings,
acs_sc_contracts
where acs_sc_contracts.contract_name = $servicecontract
and acs_sc_contracts.contract_id = acs_sc_bindings.contract_id
and acs_sc_impls.impl_id = acs_sc_bindings.impl_id;
Your portlet/applet should appear.