I have installed the Tridion content delivery web service on a 64 bit Windows Server 2008 R2 system, intending to configure UGC. (In fact I have two services, which both exhibit the same problem).
My service has the ambient framework HttpModule configured, and the cd_ambient_conf.xml is a copy of the default version shipped with the product, however the Security element is commented out. I am testing by visiting the odata.svc endpoint in the browser.
In the Cartridges element, I have the following:
<Cartridges>
<Cartridge File="cd_ambient_cartridge_conf.xml"/>
<Cartridge File="ugc_ambient_cartridge.xml"/>
</Cartridges>
When configured like this, or if I comment out the cd_ambient cartridge and leave the ugc_ambient cartridge in, I get a null reference exception:
[NullReferenceException: Object reference not set to an instance of an object.]
Tridion.ContentDelivery.AmbientData.HttpModule.OnRequestStart
(Object sender, EventArgs e) +292
System.Web.SyncEventExecutionStep.System.Web
.HttpApplication.IExecutionStep.Execute() +79
System.Web.HttpApplication.ExecuteStep(
IExecutionStep step, Boolean& completedSynchronously) +269
If I configure only the cd_ambient cartridge, then I get the following error:
[AmbientDataException: Error while configuring ambient data framework]
If I remove both cartridges, the service comes up without an error. I'm speculating that the null reference errors are caused by perhaps a missing configuration value, but at least cd_ambient_conf.xml passes schema validation, so perhaps not.
So... what is likely to be the cause of this problem, and are there any debugging or analysis techniques that may help me to find out more?
EDIT: I have now removed the cd_ambient_cartridge_conf.xml reference from within Cartridges. So with only the ugc_ambient_cartridge.xml reference, I get the following error in the cd_core log (and I'm back to getting the [AmbientDataException: Error while configuring ambient data framework] error):
2012-05-11 15:03:51,073 WARN AmbientDataContext - There is no current ambient
data context - the ambient data framework is not properly initialised
2012-05-11 15:03:51,171 ERROR EngineFactory - Unable to configure the
AmbientData Framework
com.tridion.configuration.ConfigurationException:
Can't find configuration file: [ ugc_ambient_cartridge.xml ]
at com.tridion.configuration.XMLConfigurationReader.readConfiguration(
XMLConfigurationReader.java:92) ~[cd_core.jar:na]
at com.tridion.ambientdata.AmbientDataConfig.getCartridgeConfigurations(
AmbientDataConfig.java:155) ~[cd_ambient.jar:na]
at com.tridion.ambientdata.EngineFactory.newEngine(
EngineFactory.java:45) ~[cd_ambient.jar:na]
It's probably the cd_ambient_cartridge_conf.xml that contains errors. The default cartridge is shipped as an example of what you could do with a custom cartridge.
Remove that cartridge from your cd_ambient_conf.xml and try again.
The null reference exception probably means you're missing jars and/or configuration for UGC. Check the Tridion logs for additional info on this.
UPDATE
This is what I have in my UGC-enabled website:
In Web.Config (only relevant parts shown):
In /bin:
(Plus the standard ones)
In /bin/config/cd_ambient_conf.xml:
In /bin/config/cd_ugc_conf.xml:
Everything else in this file is what was there by default.
In /bin/lib, UGC related: