Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 SSIS 2008 error System.NullReferenceException: Obj

Author  Topic 

Viron26
Starting Member

1 Post

Posted - 2013-02-21 : 08:31:11
Hello everyone,

I have set upt a package on SSIS 2008 with a vb script that runs an excel macro. It works on vs 2008 but still I get the following error:

Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at ST_e916156b0e6449b58e21905bd635ecf0.vbproj.ScriptMain.Main()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

Also when I run the package with SQL agent, the job is successful howver the macro is not executed and I get the following error:
Message
Executed as user: 'myusername'. Code: 0xFFFFFFFF Source: Run macro script excel macro Description: Microsoft Excel cannot access the file 'book1.XLS'. There are several possible reasons: ? The file name or path does not exist. ? The file is being used by another program. ? The workbook you are trying to save has the same name as a currently open workbook. End Error DTExec: The package execution returned DTSER_SUCCESS (0). Started: 11:18:15 Finished: 11:18:19 Elapsed: 3.775 seconds. The package executed successfully. The step succeeded.

However, I have full access to the local server and network and I have tried to run on both 32 bit and 64 bit but no success.

Can anyone help please?

Thanks a lot
   

- Advertisement -