Video Screencast Help

Error "An unknown exception was thrown"

Created: 14 Feb 2014 | 6 comments

When I run a script to update the custom data class. An error (attached captured) "An unknown exception was thrown" showed.

It is strange that all clients have this error except the first PC for testing this script.

Comments 6 CommentsJump to latest comment

AJ_01's picture

See if it help

KNOWN ISSUE: Discovery tasks fail immediately with error ''An unknown exception was thrown''

Article:TECH44241  |  Created: 2009-08-25  |  Updated: 2009-08-25  |  Article URL http://www.symantec.com/docs/TECH44241

 

Regard

AJ

Daniel Chan 852's picture

Hi AJ,

Thanks for your reply. But the solution is failed unfortunately. I doubt that why the 1st day created the custom data class is okay, then error shows from 2nd day of custom data class creation.

Daniel Chan 852's picture

I found a link report that it is a bug.

Do anyone know that it is solved or not? Thanks,

http://www.symantec.com/business/support/index?pag...

 

Alex Isakov's picture

Bug was resolved by using custom token.

 

 custom token that uses the following SQL:

select top 1
igugd.Email
from TaskInstances ti
join TaskInstanceParents tip on ti.TaskInstanceGuid = tip.TaskInstanceGuid
join TaskInstanceSummaries tisum on tip.ParentTaskInstanceGuid =
tisum.TaskInstanceGuid
right outer join Inv_Global_Windows_Users igwu on userid = right
(tisum.ExecutedBy,((CHARINDEX('\',reverse(ExecutedBy))-1)))
join Inv_Global_User_General_Details igugd on igwu._ResourceGuid =
igugd._ResourceGuid
where ti.ResourceGuid = '%COMPUTERID%'
order by tisum.StartTime DESC

Daniel Chan 852's picture

Thanks Alex.

I want to get the last value from a custom data class by "token" method.

But in 1st run, since it is no value in the class and make this error.

My custom token is :

SELECT  [LastRun_Date] FROM  [dbo].[Inv_run_record]
WHERE  [_ResourceGuid] = '%COMPUTERID%'

Since your suggested custom token is too complicated for me. I don't know how to translate it to my situation.

Would you give some hints to do that?

Thank you very much.