Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
4.6.1 SP1 MBPScriptModel2.dll issue...
DavidP
Does anyone have any custom vb code that references MBPScriptModel2.dll? We have a vb script/app that references the MBPScriptModel2.dll to synch data between MediaBin and Embark (data copied into SQL tables). It works in 4.5.3, and 4.6.1, but SP1 updated the .dll and now the script errors. The log files show the following:
07/03/08 14:53:13 [1DE8] executeQuery() - SELECT DISTINCT r.id, r.parentid, r.name AS o1 FROM assetrefs AS r WHERE r.isContainer = 1 AND r.parentid IN ( SELECT id FROM ContainerTree WHERE parentid = ? AND depth = 1 AND id <> ? ) WHERE ( r.searchname = upper(?) AND datalength(r.searchname) = datalength(upper(?)) ) ORDER BY o1, {DC12FDB8-4734-4DE0-A5E5-DDF1580470DB}, {BA43D624-DE61-4EF3-9058-8EC0782ECB06}, 'Exhibitions', 'Exhibitions'
07/03/08 14:53:13 Error with SQL: SELECT DISTINCT r.id, r.parentid, r.name AS o1 FROM assetrefs AS r WHERE r.isContainer = 1 AND r.parentid IN ( SELECT id FROM ContainerTree WHERE parentid = ? AND depth = 1 AND id <> ? ) WHERE ( r.searchname = upper(?) AND datalength(r.searchname) = datalength(upper(?)) ) ORDER BY o1, {DC12FDB8-4734-4DE0-A5E5-DDF1580470DB}, {BA43D624-DE61-4EF3-9058-8EC0782ECB06}, 'Exhibitions', 'Exhibitions'
07/03/08 14:53:13 Incorrect syntax near the keyword 'WHERE'.
It looks like the .dll is now adding another WHERE to the select clause instead of an AND
Any suggestions?
Find more posts tagged with
Comments
Migrateduser
We have a custom program which syncs metadata between our own homegrown content mgmt system and MediaBin 4.6.1 without any problems.
The real question is, what does the code for formulating that call to MBPScriptModel2.dll look like? Your vbscript?
DavidP
Are you using SP1? (4.6.1 Build 10)?
In further testing I un-registered and re-registed the dll and now get a different error with nothing in the log:
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="SF_DAM_DATA_SYNC"
StackTrace:
at ConsoleApplication1.dam_data_sync.populateDefinitionCaches(MBSession session) in C:\Documents and Settings\interflow.SFMOMA\My Documents\Visual Studio 2005\Projects\SF_DAM_DATA_SYNC\SF_DAM_DATA_SYNC\dam_data_sync.vb:line 1468
at ConsoleApplication1.dam_data_sync.Main() in C:\Documents and Settings\interflow.SFMOMA\My Documents\Visual Studio 2005\Projects\SF_DAM_DATA_SYNC\SF_DAM_DATA_SYNC\dam_data_sync.vb:line 124
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Here are the lines:
1468 Dim groupCollection As MBPSCRIPTMODEL2Lib.MBObjectCollection = session.MetaDataGroups()
124 populateDefinitionCaches(session)
msnider
Visual Studio may be caching the wrong COM Interop wrapper. The file datetime of Interop.MBPSCRIPTMODEL2Lib.dll in your bin directory should match the file datetime of the registered MBPScriptModel2.dll.
I would try the following:
1.) Close Visual Studio.
2.) Delete your application's bin and obj directories.
3.) Ensure that your version of MBPScriptModel2.dll is indeed the 4.6.1 version by double checking the registry.
4.) Start Visual Studio
5.) Re-reference MBPScriptModel2.dll in your project
6.) Verify that the datetime of the newly created Interop.MBPSCRIPTMODEL2Lib.dll matches MBPScriptModel2.dll
The other thing that I noticed, is that at least in C# the MetadataGroups call is presented as a property, not a method.
Mark
Spiff
David,
It's a bug in our code and I have identified and fixed it. Thanks for your info!
Please open a support case with Interwoven Support and indicate that MediaBin Engineering has acknowledge the bug. Upon receiving the case, we will send you a patch ASAP.
Spiff
David,
It's a bug in MediaBin server code. Thanks for your info!
Please open a support case with Interwoven Support and indicate that MediaBin Engineering has acknowledge the bug. Upon receiving the case, we will send you a patch ASAP.
msnider
One of the server team members has found that this is a bug within the MediaBin server itself. Go ahead and open a support case so that we can get a patch to you.
Mark
Spiff
Is devnet working now?
Spiff
It is a bug on the MediaBin server side and has been confirmed. It happens when you perform a search on asset names with the "IS EXACTLY" and "IS NOT" predicates.
David, thank you for your report! Please open a support case with Interwoven Support and indicate that MediaBin Engineering has acknowledged the issue. Upon receiving the case, we will send you a patch ASAP.
As a temp get-around, you may try the "CONTAINS" or "CONTAINS WORD" predicate.
DavidP
We created and tested a new project:
Module Module1
Const c_MBServer = "172.16.16.72"
Const c_MBDomain = "SFMOMA"
Const c_MBUser = "interflow"
Const c_MBPassword = "1nt3rfl0w"
Sub Main()
Dim session As MBSession = New MBSession()
session.Logon(c_MBServer, c_MBDomain, c_MBUser, c_MBPassword, 32456)
Dim searchConstraint As MBSearchConstraint = session.CreateMetaDataCompareSearchConstraint("{B297C571-F083-11D4-8200-0060080D8AC2}", MBComparisonOperator.Equality, "Exhibitions")
Dim searchCriteria As MBSearchCriteria = session.CreateConstraintSearchCriteria(searchConstraint)
Dim results As MBObjectCollection = session.RootContainer.FindContainers(searchCriteria)
For Each hit As MBContainer In results
Console.WriteLine("Found: {0} {1}", hit.Name, hit.Identifier)
Next
End Sub
End Module
I verified the dll referenced is MediaBin 4.6.1 SP1 Build 10
We get the same error from this simple script.
Spiff
Hi David,
Sorry. Interwoven Devnet was not working properly yesterday afternoon and this morning - and, suddenly, you can see my 4 trying replies now.
Anyway, like I said, please open a case with Interwoven Support and we'll come up with a patch for you ASAP.
DavidP
Thanks a case has been opened: Case-00754856