Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Exception of Unknown Origin in Primitive {1AAE...
System
Hi All,
Thanks in advance for taking the time to help a fellow MBin user.
We have created an application that does many things with MediaBin and including bulk loads many images into the system. We've created a class and a method called Create (below) which we have been using for quite some time now and has always been fruitful. We recently upgraded to 4.5 and noticed that when we bulk images into the system (~300+ images) it usually stops working around 85 images. When I say it stops working, it just doesn't want to create images anymore and we get an error in the Enterprise Manager Job History. The error reads as this: Exception of Unknown Origin in Primitive {1AAEB080}!. From that point on, that connection is useless, the process hangs and never returns a message back to the class which we have to hard End Task. Then we figure out where it died and start the process again.
Any ideas?
Public Function Create(i_strPathAndFileName As String, i_strContainerGUID As String, Optional i_strDescription As String, Optional i_strNewFileName As String) As Boolean
'===============================================================================
' Name : [MediaBinLib].[File].[Create]
'
' Purpose : Create a new Image or Asset for MediaBin.
'
' Input : i_strPathAndFileName - The full path and file name to create
' i_strContainerGUID - GUID of the MBContainer to create in
' i_strDescription - Description of the new Image or Asset
' i_strNewFileName - A new file name (if want to be renamed)
'
' Return : True - Worked
' False - Error occurred
'
' Results : Create a new image or asset object in memory
'
' History :
'-------------------------------------------------------------------------------
' Date Developer Description
'-------------------------------------------------------------------------------
' 2003-12-08 Stacy Initial Creation
' Notes: 1) None
'===============================================================================
On Error GoTo Err_Create
Const MB_JOB_CANCELLED = 6
Const MB_JOB_COMPLETE = 0
Const MB_JOB_FAILED = 7
Dim objMBColContainers As MBObjectCollection
Dim objMBContainer As MBContainer
Dim objMBFile As Object
Dim objMBJob As MBJob
Dim objMBSavedTask As MBSavedTask
Dim objICTUtils As New LoupeUtil.CTextFile
Dim strJobID As String
Dim strPath As String
Dim strFile As String
''' Only do if the session is good '''
If m_objMBSession.IsLoggedOn = True Then
''' Ensure the file exists and then load it to MediaBin '''
If Len(i_strContainerGUID) = 0 Then
Set objMBContainer = m_objMBSession.RootContainer
Else
Set objMBContainer = m_objMBSession.GetContainer(i_strContainerGUID)
End If
If objICTUtils.File_Exists(i_strPathAndFileName) = True Then
''' Break out the file and path to search for the file name and set the File Properties '''
If objICTUtils.File_ParsePath(i_strPathAndFileName, strPath, strFile, False) = True Then
Set objMBSavedTask = m_objMBSession.GetNullInsertionTask
If Len(Trim(i_strNewFileName)) = 0 Then
strJobID = objMBContainer.InsertFile(i_strPathAndFileName, objMBSavedTask.CreateRunTask)
Else
strJobID = objMBContainer.InsertFile(i_strPathAndFileName, objMBSavedTask.CreateRunTask, i_strNewFileName)
End If
Set objMBJob = m_objMBSession.GetJob(strJobID)
''' Monitor the job of inserting the new Image '''
Do While objMBJob.State <> MB_JOB_CANCELLED And objMBJob.State <> MB_JOB_COMPLETE And objMBJob.State <> MB_JOB_COMPLETE
DoEvents
DoEvents
Loop
''' Return the new file that was created '''
Set objMBColContainers = objMBContainer.Children(AllRepositoryItemTypes)
For Each objMBFile In objMBColContainers
''' Get the GUID of the new file we created '''
If objMBFile.Name = strFile Then
''' Set the object '''
Create = True
Set Properties = objMBFile
Exit For
End If
Next
End If
End If
End If
GoTo Garbage_Collection
Err_Create:
If Err.Number = -2147220480 Then
''' Asset already in MediaBin '''
End If
Garbage_Collection:
Set objMBSavedTask = Nothing
Set objMBFile = Nothing
Set objMBJob = Nothing
Set objICTUtils = Nothing
End Function
Find more posts tagged with
Comments
There are no comments yet