我正在尝试从发布到 Tridion Broker 的组件中加载一些自定义元。
这是 2009 SP1
我可以通过如下查询在 Custom_Meta 表中看到该组件:
SELECT * FROM [Tridion_Broker].[dbo].[CUSTOM_META] WHERE ITEM_ID = 204221
但是,使用下面的代码,我在执行 GetMeta 的行上得到一个 Java 运行时异常。我注意到,如果我的 queryStringId 是正确的 TCM ID,那么它会抛出异常,但如果我只是输入项目 ID,它将返回 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;
}
}
堆栈跟踪:
[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
更新 我查看了在“信息”级别启用日志的代理日志,但在“启用 Tridion 代理”后什么也没看到。这是配置问题还是 DLL 问题?看起来 CD 根本没有调用该服务?
更新 2 我已经尝试了很多东西,但仍然没有帮助。就像代码无法与 JVM 通信,但是我可以在事件日志中看到 JVM 正在启动。