Exception While getting Assets References
I am using the below code to get asset references, this code sometimes work and sometimes not. When I checked the logs I found the below exception.
Code:
Session sess = com.fatwire.system.SessionFactory.getSession();
ServicesManager sm = (ServicesManager) sess.getManager(ServicesManager.class.getName());
AssetService as = sm.getAssetService();
AssetId aid = new AssetIdImpl("Content", 1394105692265);
List<AssetId> refs = as.getReferences(aid);
Exception:
[2014-03-07 15:25:50,076 UTC] [ERROR] [.kernel.Default (self-tuning)'] [fatwire.logging.cs.db] Failed to execute query SELECT cs_assettype as otype, cs_assetid as oid FROM EmbeddedReference WHERE cs_referstoid=1391419972551 AND cs_referstotype='Content' for query 1394105692265
[2014-03-07 15:25:50,076 UTC] [ERROR] [.kernel.Default (self-tuning)'] [logging.cs.xcelerate.asset] Asset.ReferencedBy exception getting embedded asset referencescom.openmarket.basic.interfaces.AssetException: SQL statement failed -105: