Read NACHA Formatted File using ChoETL DLL Not Working in SSIS package - choetl

I have Used ChoETL.dll and ChoETL.NACHA.dll to read NACHA Formatted file VS2015 C# console and it is working fine.
Created an exe for this console application.
Called the EXE in SSIS package using "Execute Process Task". But it is throwing the below Error.
Message :Failed to parse line to 'ChoETL.NACHA.ChoNACHABatchHeaderRecord' object.
Filename :Sample.txt
StackTrace : at ChoETL.ChoManifoldRecordReader.LoadLine(Tuple`2 pair, Object& rec)
at ChoETL.ChoManifoldRecordReader.<AsEnumerable>d__10.MoveNext()
at ChoETL.ChoManifoldReader.Read()
at ChoETL.NACHA.ChoNACHAReader.<>c__DisplayClass14_0.<GetEnumerator>b__0()
at ChoETL.NACHA.ChoNACHAReader.ChoNACHAEnumeratorWrapper.ChoEnumeratorWrapperInternal`1.MoveNext()
at ChoETL.NACHA.ChoNACHAReader.ChoNACHAEnumeratorWrapper.<BuildEnumerable>d__0`1.MoveNext()
at NachaReader.Program.Main(String[] args
Can any one provide solution to resolve this issue. or suggest any other way to Read NACHA formatted file in SSIS package.

Related

OpenEdge 10.2A - Unable to Run the Added Procedure in Custom .pl File

I have added a new .p procedure (prodict/myProc.p) in prodict.pl file and saved the prodict.pl file under my program's root folder.
Also, I have added the path of the folder to the PROPATH and it is the first item in the PROPATH.
In order to run the procedure, in the Procedure Editor, I try to run using the code below
RUN prodict/myProc.p
The error message I receive is:
How can I make my procedure run?
Note: I'm trying this in order to create a custom prodict/load_df.p, so it can be run without the need of any user interaction. My older question can be found here.
Instead of RUN "prodict/myProc.p", I have used
RUN value(search("prodict/myProc.p")).
The error message is changed to
Cannot run procedure file prodict/myProc.p from library. (1976)
When we look at the error description:
Can't run procedure file from library. (1976)
The named file in the library reference (e.g, progname.p in libname.pl<>) in the RUN statement is a source file, and cannot be run. Only PROGRESS r-code files can be run from a library.
Solution: I have added the compiled .r file to the library through proenv:
prolib prodict.pl -add prodict/myProc.r
and changed the calling code as:
RUN "prodict/myProc.r".
Now the code runs. Thanks to Stefan Drissen for showing me a way to get the real error message.

Downloading NetCDF files with R: Manually works, download.file produces error

I am trying to download a set of NetCDF files from: ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/nwm.20180425/medium_range/
When I manually download the files I have no issues connecting, but when I use download.file and attempt to connect I get the following error:
Assertion failed!
Program: C:\Program Files\Rstudio\bin\rsession.exe
File: nc4file.c, Line 2771
Expression: 0
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I have attempted to run the code in R without R studio and got the same result.
My abbreviated code is as followed:
library("ncdf4")
library("ncdf4.helpers")
download.file("ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/nwm.20180425/medium_range/nwm.t00z.medium_range.channel_rt.f006.conus.nc","c:/users/nt/desktop/nwm.t00z.medium_range.channel_rt.f006.conus.nc")
temp = nc_open("c:/users/nt/desktop/nwm.t00z.medium_range.channel_rt.f006.conus.nc")
Adding mode = 'wb' to the download.file arguments solves the issue for me. I've had the same problem when downloading PDFs
download.file("ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/nwm/prod/nwm.20180425/medium_range/nwm.t00z.medium_range.channel_rt.f006.conus.nc","C:/teste/teste.nc", mode = 'wb')

Documentum NPE when running as jar

I'm writing a simple application to create a Documentum folder structure from a directory structure on disk. When I run the application through SpringSource Tool Suite, it works fine. When I package it as a jar, with all dependencies, and run it, I receive the following error:
java.lang.NullPointerException
at com.documentum.fc.common.impl.preferences.PreferencesManager.locateMainPersistentStore(PreferencesManager.java:372)
at com.documentum.fc.common.impl.preferences.PreferencesManager.readPersistentProperties(PreferencesManager.java:333)
at com.documentum.fc.common.impl.preferences.PreferencesManager.<init>(PreferencesManager.java:41)
at com.documentum.fc.common.DfPreferences.initialize(DfPreferences.java:64)
at com.documentum.fc.common.DfPreferences.getInstance(DfPreferences.java:43)
at com.documentum.fc.client.DfSimpleDbor.getDefaultDbor(DfSimpleDbor.java:78)
at com.documentum.fc.client.DfSimpleDbor.<init>(DfSimpleDbor.java:66)
at com.documentum.fc.client.DfClient$ClientImpl.<init>(DfClient.java:344)
at com.documentum.fc.client.DfClient.<clinit>(DfClient.java:754)
Here is the line in my code where this error occurs:
IDfClient client = DfClient.getLocalClient();
The jar includes the dfc.properties file, which I specify on the command line using
-Ddfc.properties.file=dfc.properties.dev
For the record, the full command line looks like this (slightly anonymized):
java -Ddfc.properties.file=dfc.properties.dev -jar MyTest-jar-with-dependencies.jar baseDirectory baseDocumentumFolder
Thanks much for your time!

Closure Templates through IKVM?

Google Closure works GREAT without the Java Runtime Environment by using IKVM
In case that ever goes away, the simplified steps to convert it to an exe are:
Download and extract (but nothing to install) Closure Compiler and IKVM
Move compiler.jar to the IKVM bin folder
ikvmc -target:exe -fileversion:2012.09.17 .\compiler.jar (with the jar's release date). Note: I get a few warnings about ANT libraries.
Copy these dependencies from the ikvm bin directory to the closure directory:
IKVM.OpenJDK.Core.dll
IKVM.OpenJDK.Jdbc.dll
IKVM.OpenJDK.Misc.dll
IKVM.OpenJDK.SwingAWT.dll
IKVM.OpenJDK.Text.dll
IKVM.OpenJDK.Util.dll
XML.API.dll
IKVM.Runtime.dll
Then you can move the compiler.jar and new compiler.exe back to your closure directory. Fredrik recommends this powershell version of execution because of the ability to specify ascii encoding overriding unicode (half the bytes):
.\compiler.exe --js .\jquery-1.4.2.js --warning_level QUIET | out-file -encoding ascii .\jquery.min.js
==============================
However, I do not have the same luck with the Closure Templates's SoyToJsSrcCompiler.jar. I get warnings from ikvmc -target:exe -fileversion:2011.12.22 .\SoyToJsSrcCompiler.jar as with compiler.jar.
warning IKVMC0105: Unable to compile class "com.google.template.soy.jssrc.internal.GenerateSoyUtilsEscapingDirectiveCode"
(missing class "org.apache.tools.ant.Task")
warning IKVMC0100: Class "com.google.inject.internal.asm.util.$TraceClassVisitor" not found
warning IKVMC0111: Emitted java.lang.NoClassDefFoundError in "com.google.inject.internal.cglib.core.$DebuggingClassWriter$1.run()Ljava.lang.Object;"
("com.google.inject.internal.asm.util.$TraceClassVisitor")
warning IKVMC0100: Class "com.google.template.soy.jssrc.internal.GenerateSoyUtilsEscapingDirectiveCode" not found
The resulting SoyToJsSrcCompiler.exe with no command-line arguments works to show the help page, but supplying a .soy file gives:
Exception in thread "main" cli.System.MethodAccessException:
com.google.inject.assistedinject.FactoryProvider2.getBindingFromNewInjector(java.lang.reflect.Method, System.Object[], AssistData) at
com.google.inject.assistedinject.FactoryProvider2$$FastClassByGuice$$9dcdf6d7.invoke() at
com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53) at
com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:56) at
com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:90) at
com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:107) at
com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:76) at
com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:73) at
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031) at
com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:88) at
com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:150) at
com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) at
com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53) at
com.google.inject.internal.InjectionRequestProcessor$StaticInjection$1.call(InjectionRequestProcessor.java:11 6) at
com.google.inject.internal.InjectionRequestProcessor$StaticInjection$1.call(InjectionRequestProcessor.java:11 0) at
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024) at
com.google.inject.internal.InjectionRequestProcessor$StaticInjection.injectMembers(InjectionRequestProcessor. java:110) at
com.google.inject.internal.InjectionRequestProcessor.injectMembers(InjectionRequestProcessor.java:78) at
com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:171) at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:111) at
com.google.inject.Guice.createInjector(Guice.java:95) at
com.google.inject.Guice.createInjector(Guice.java:72) at
com.google.template.soy.MainClassUtils.createInjector(MainClassUtils.java:212) at
com.google.template.soy.SoyToJsSrcCompiler.execMain(SoyToJsSrcCompiler.java:223) at
com.google.template.soy.SoyToJsSrcCompiler.main(SoyToJsSrcCompiler.java:205)
Anyone know how to get this to work?
The exception can be an bug in IKVM. Which version do you use? Test the latest version.
warning IKVMC0100: Class "com.google.template.soy.jssrc.internal.GenerateSoyUtilsEscapingDirectiveCode" not found
Another problem can be that you have not compile all needed jar files for SoyToJsSrcCompiler.jar. In which jar file is this missing class file? Take a look in the wiki to see how you compile multiple jar files.
The next problem can be that there is the same package in different jar files. It there are only package visible for some mthods this will not work for .NET. You can test a sharedclassloader. See the wiki for details.

SSIS String or binary data would be truncated. The statement has been terminated

When I run SSIS package from BIDS it runs fine without any error / problem.
When I try to call it through a ASP.NET website I get the following error -
"String or binary data would be truncated. The statement has been terminated."
I checked all the columns / data to see if anything is exceeding the limit, everything is fine.
I can run the package through command line using dtexec C:>dtexec /f "C:\temp\MyTempPackage.dtsx", it executes without any problem .
The problem is when I try to run it through ASP.NET. The following is the code that I am trying to use -
//DTS Runtime Application
Application app = new Application();
//DTS Package
Package package = app.LoadPackage(packagePath, null);
//Execute and Get the result
DTSExecResult result = package.Execute();
I am making a call to a webservice from asp.net which has the above code. Both the webservice and website have identity impersonation enabled. I have identity enabled in my web.config for this
<identity impersonate="true" userName="MyUserName" password="MyPassword"/>
This problem is only when I am trying to import a Excel file (.xlsx) when I import a .txt file everything is fine. Excel Import blew up in both 32bit and 64bit enviornments.
Help on how to make this to work is greatly appreciated.
You must add this string in you SSiS:
SET ANSI_WARNINGS OFF;

Resources