"Path cannot be null" Error

May 5, 2016 at 12:19 AM
Anyone knows about this error?

Information: 0x3E8 at Data Flow Task, JSON Source Component: Temp json downloaded to . Parsing json now...
Error: 0xC0047062 at Data Flow Task, JSON Source Component [21]: System.ArgumentNullException: Path cannot be null

I've tried everything....

I tested with Direct Input mode, method GET and the fields were mapped correctly. After this step the data should be placed in a Excel file with Excel Destination componente.

thanks
Coordinator
May 5, 2016 at 7:19 AM
Hi,
Can you please provide your full component configurations with screenshots, alongside the full error output?
May 5, 2016 at 3:57 PM
Edited May 5, 2016 at 5:52 PM
for sure...


SSIS package "c:\users\adm.robertow\documents\visual studio 2013\Projects\ECOM1\ECOM1\Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Information: 0x40043006 at Data Flow Task, SSIS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Data Flow Task, SSIS.Pipeline: Pre-Execute phase is beginning.
Information: 0x4004300C at Data Flow Task, SSIS.Pipeline: Execute phase is beginning.
Information: 0x3E8 at Data Flow Task, JSON Source Component: No input lane attached, data processing takes place immediately.
Information: 0x3E8 at Data Flow Task, JSON Source Component: Executing request https://api.awsli.com.br/v1/cliente?chave_api=a1891426&chave_aplicacao=7a713
Information: 0x3E8 at Data Flow Task, JSON Source Component: Temp json downloaded to . Parsing json now...
Error: 0xC0047062 at Data Flow Task, JSON Source Component [21]: System.ArgumentNullException: Path cannot be null.
Parameter name: path
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.Open(String path, FileMode mode)
at com.webkingsoft.JSONSource_Common.JSONSourceComponent.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)
Error: 0xC0047038 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on JSON Source Component returned error code 0x80004003. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
Information: 0x40043008 at Data Flow Task, SSIS.Pipeline: Post Execute phase is beginning.
Information: 0x4004300B at Data Flow Task, SSIS.Pipeline: "Excel Destination" wrote 0 rows.
Information: 0x40043009 at Data Flow Task, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: Data Flow Task
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "c:\users\adm.robertow\documents\visual studio 2013\Projects\ECOM1\ECOM1\Package.dtsx" finished: Failure.
The program '[5016] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).


Image

Image

Image

Image

Image
May 5, 2016 at 5:06 PM
Edited May 5, 2016 at 5:10 PM
I am having this same issue, with a very similar configuration as robertow.

Stack trace:
Information: 0x3E8 at Data Flow Task, JSON Source Component: Temp json downloaded to . Parsing json now...
Error: 0xC0047062 at Data Flow Task, JSON Source Component [69]: System.ArgumentNullException: Path cannot be null.
Parameter name: path
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.Open(String path, FileMode mode)
   at com.webkingsoft.JSONSource_Common.JSONSourceComponent.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)
Error: 0xC0047038 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on JSON Source Component returned error code 0x80004003.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
Config:
{"DataSource":{"SourceUri":"http://api.aerisapi.com/forecasts/IAD?client_id=&client_secret=","FromVariable":false,"VariableName":null,"HttpParameters":[],"CookieVariable":null,"WebMethod":"GET"},"DataMapping":{"_ioMap":{"dateTimeISO":{"InputFieldPath":"dateTimeISO","InputFieldLen":25,"OutputColName":"dateTimeISO","OutputJsonColumnType":1},"minTempF":{"InputFieldPath":"minTempF","InputFieldLen":0,"OutputColName":"minTempF-d","OutputJsonColumnType":0},"minTempC":{"InputFieldPath":"minTempC","InputFieldLen":0,"OutputColName":"minTempC-d","OutputJsonColumnType":0},"humidity":{"InputFieldPath":"humidity","InputFieldLen":0,"OutputColName":"humidity-d","OutputJsonColumnType":0},"windSpeedMPH":{"InputFieldPath":"windSpeedMPH","InputFieldLen":0,"OutputColName":"windSpeedMPH-d","OutputJsonColumnType":0},"windDir":{"InputFieldPath":"windDir","InputFieldLen":4,"OutputColName":"windDir","OutputJsonColumnType":1},"weatherPrimary":{"InputFieldPath":"weatherPrimary","InputFieldLen":50,"OutputColName":"weatherPrimary","OutputJsonColumnType":1},"weatherPrimaryCoded":{"InputFieldPath":"weatherPrimaryCoded","InputFieldLen":10,"OutputColName":"weatherPrimaryCoded","OutputJsonColumnType":1},"icon":{"InputFieldPath":"icon","InputFieldLen":50,"OutputColName":"icon","OutputJsonColumnType":1},"feelslikeF":{"InputFieldPath":"feelslikeF","InputFieldLen":0,"OutputColName":"feelslikeF-d","OutputJsonColumnType":0},"feelslikeC":{"InputFieldPath":"feelslikeC","InputFieldLen":0,"OutputColName":"feelslikeC-d","OutputJsonColumnType":0},"isDay":{"InputFieldPath":"isDay","InputFieldLen":0,"OutputColName":"isDay","OutputJsonColumnType":2},"sunriseISO":{"InputFieldPath":"sunriseISO","InputFieldLen":25,"OutputColName":"sunriseISO","OutputJsonColumnType":1},"sunsetISO":{"InputFieldPath":"sunsetISO","InputFieldLen":25,"OutputColName":"sunsetISO","OutputJsonColumnType":1},"pop":{"InputFieldPath":"pop","InputFieldLen":0,"OutputColName":"pop-d","OutputJsonColumnType":0},"maxTempF":{"InputFieldPath":"maxTempF","InputFieldLen":0,"OutputColName":"maxTempF-d","OutputJsonColumnType":0},"maxTempC":{"InputFieldPath":"maxTempC","InputFieldLen":0,"OutputColName":"maxTempC-d","OutputJsonColumnType":0}},"RootType":0,"JsonRootPath":"response[0].periods","InputColumnsToCopy":[]},"AdvancedSettings":{"CustomLocalTempDir":null}}
@Robertow: You should probably remove the link to your API (which contains your API key) from the error output you posted.
May 5, 2016 at 5:46 PM
tanks, I removed. However, it was a test environment.
May 5, 2016 at 9:00 PM
I was able to fix this issue by changing line 349 in JSONSourceComponent.cs:

from:
Utils.DownloadJson(this.VariableDispenser, _model.DataSource.SourceUri, _model.DataSource.WebMethod, null, _model.DataSource.CookieVariable);
to:
fname = Utils.DownloadJson(this.VariableDispenser, _model.DataSource.SourceUri, _model.DataSource.WebMethod, null, _model.DataSource.CookieVariable);
Coordinator
May 6, 2016 at 7:07 AM
Hi,

thanks J0ksta, that was exactly the source of the problem. That part of the code clearly needs a refactoring. I should prepare a library and then bind both the Component and the the UI to the same library functions, so this doesn't happen.

I feel like I'll build it again by the end of this week, applying your fixes.

Alberto.
Coordinator
May 8, 2016 at 9:13 PM
Hi,

I've fixed the errors and updated both the DLL Pack and the automatic installer. Please reinstall the software and tell me if there still is something wrong.


Alberto.
Marked as answer by webking on 5/8/2016 at 2:14 PM
May 9, 2016 at 5:56 AM
I've installed the new release of the component, but now get:
Image
Coordinator
May 9, 2016 at 6:03 AM

Hi,

That is normal. What happena if you press 'yes'?

May 9, 2016 at 6:07 AM
I get the following:


Image
Coordinator
May 9, 2016 at 6:22 AM
Hi,

that is not an error. When you update the component and open an project with a previous version of the component, Visual Studio does not recognize it and opens the advanced editor.
I've already added a working item for the future, so that the component will try to "update itself". At the moment, what you have to do is the following:

FOR EACH JSONSOURCE component in your project
  1. From that window, copy the string of CONFIGURATION_MODEL somewhere
  2. Delete the component from the project
  3. Save and close Visual Studio
  4. Open VS and the project again
  5. Add the component again
  6. Right click on the component, select advanced editor
  7. Paste the configuration_model_object you have coped before
  8. Now it will work normally.
However, if you wish, you might simply delete all the JSONSource components from the project, save it, close Visual Studio, open it again and adding the components from scratch, reconfiguring each one with the UI instead of the configuration_string.

I'm sorry for that, that is really a feature that seems to be urgent for the future. I'll find some time to work on it next days, hopefully.

Let me know if you figure this thing out.

Alberto.
May 9, 2016 at 6:43 AM
Great work, thanks Alberto.
May 12, 2016 at 12:28 PM
Thanks Alberto. It Works fine.