I am trying to load some Custom Meta from a component which is published into the Tridion Broker.
This is 2009 SP1
I can see the component in the Custom_Meta table with a query like:
SELECT * FROM [Tridion_Broker].[dbo].[CUSTOM_META] WHERE ITEM_ID = 204221
However using the below code, I get a Java Runtime exception on the line where I do GetMeta. I have noticed that if my queryStringId is a proper TCM ID then it will throw the excpetion but if I just put the item Id it will return null.
string queryStringId = HttpUtility.UrlDecode(Request.QueryString["component_uri"]);
string pageId = ((BasePage) Page).PageTcmId;
int publicationId = int.Parse(pageId.Split(':')[1].Split('-')[0]);
using (var cmf = new ComponentMetaFactory(publicationId))
{
IComponentMeta cm = cmf.GetMeta(queryStringId);
if(cm != null)
{
VideoId = cm.CustomMeta.GetValue("video_url").ToString();
}
else
{
litMessage.Visible = true;
}
}
Stack trace:
[RuntimeException]
Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst) +351
Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst) +1278
Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo, JavaMethodArguments args) +551
Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo, Type declaredType, Boolean bLeaf, JavaMethodArguments jargs) +50
Com.Tridion.Meta.ComponentMetaFactory.GetMeta(Int32 componentId) +118
Tridion.ContentDelivery.Meta.ComponentMetaFactory.GetMeta(Int32 componentId) +16
ASP._controls_video_ascx.Page_Load(Object sender, EventArgs args) in c:\Inetpub\wwwroot\borland\us\_controls\Video.ascx:18
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Update I have looked in the Broker log with the log enabled on "info" level and am seeing nothing after "Tridion Broker is enabled". Is this a configuration or DLL problem? It looks like the CD is not calling the service at all?
Update 2 I have tried a lot of things and still no help. It's like the code is not able to communicate with the JVM, however I can see the JVM being started in the event log.