Talend tCreateTable error: NullPointerException - nullpointerexception

Trying to create a table in a local instance of SQL Server Mgmt Studio using Talend with the ultimate goal of setting up a direct Salesforce-SSMS connection for ETL.
I've managed to load the data from SFDC into SSMS, but only by first manually creating the tables, manually mapping the schema in a tMap, and then running my job.
I'd like to now create the tables in SSMS with a tCreateTable component, and then use the AutoMap feature to map fields.
However, I'm getting a Null Pointer Exception error that makes no sense to me. Debugging line 370 shows that my dbSchema_tCreateTable_1 object is null, but I don't understand why. I've defined it from repository. Below are some pics of my setup:
Sample Schema
Error Message and Job Design
Line 370 and suspect in Red
I know my db connection is good because I've already pushed data to existing tables, but for the life of me (and 2 of my java engineers) I can't figure this out. I've got 5 days of experience with Talend so apologies if I'm making a dumb mistake. Any help would be appreciated!
edit: Component view of tCreateTable
edit 2: Component view of tFixedFlowInput
edit 3: Component view of tMSSqlOutput
edit 4: tMSSqlConnection

On first job (provided on Error Message and Job Design) NPE occur because of connection still not created (is null) when tCreateTable tried to call null.executeStatement()
You can modify your first job put tMsSQLConnection -> OnSubjobOK -> tCreateTable
OR remove connection element at all and set connection parameters to tCreateTable.
If it doesn't help, answer please on following questions:
Share please exception stacktrace and error message occurs when you use second job (connection -> tFixedFlowInput - tMSSQLOutput)
What version of studio (Open Studio or enterprise and version) have you used?
If it is not the latest (6.5.1) could you upgrade it?
If it is, could you export your job and share it? (i.e. on talend bug tracker)
P.S. You can try to debug job by yourself, select Run Job -> Debug Run -> Java Debug
Using eclipse debug view you can find out why the NPE occur.

Related

DQS failed to execute in the package SSIS 2012

I am new to used the SSIS! I'm trying to use the DQS within the package to apply the business role on a specific column in the source table i.e. Contact title. This column takes different job titles related to Sales people, matching the values on the domain to the existed data. I made a package to perform this, inserting data from the source into the staging, but an error is propagated on the DQS part whenever I run the package.
[SSIS.Pipeline] Error: DQS Cleansing through Insert failed validation
and returned error code 0x80131516.
I hope someone can help / guide me!
After researching and reading many sources, I have found the solution for this kind of problems. The solution is hidden behind the reason! I simply changed the driver from default and the package was good to go. Steps to solve the issue are the following for future reference:
Step 1: Navigate to Project -> [PROJECT_NAME] Properties.
Step 2: Navigate to “Debugging” option from left panel and from Right panel, change Run64BitRuntime value to false.

SSIS ERROR: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020

I have problems with SSIS process(acctually the same problem occurs for two different processes). So, we are doing some ETL work using SSIS. We have Business Intelligence project that executes without errors from Visual Studio. However when its deployed on the server and scheduled as a job it fails with errors like:
INTRASTAT_Towar:Error: SSIS Error Code
DTS_E_PROCESSINPUTFAILED. The ProcessInput
method on component "Union All 3" (876) failed with error
code 0xC0047020 while processing input "Union All Input
2" (916). The identified component returned an error from
the ProcessInput method. The error is specific to the
component, but the error is fatal and will cause the Data
Flow task to stop running. There may be error messages
posted before this with more information about the failure.
INTRASTAT_Towar:Error: SSIS Error Code
DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput
method on istat_dekl_wynik_poz SELECT returned error
code 0xC02020C4. 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.
INTRASTAT_Towar:Error: The attempt to add a row to the
Data Flow task buffer failed with error code 0xC0047020.**
The other returned errors are similar, sometimes instead of 0xC0047020, there is unspecified error. Errors occur only on this one table, that has a lot of different stuff inside data flow task(unions, multicasts, conditional split). Most other data flows have just source, dest and transformation, and they are not causing any problems. I've been suggested to try manipulating DefaultBufferMaxRows and DefaultBufferSize properties values for the data flow task, but after doing some research I dont belive that it will solve the issue, as they are currently put on default values. Any suggestions?
Well, I managed to work the issue with my packages. I was using 2012 SSIS version, but I executed packages in 32 bit environment in BIDS. The server acctually executed in 64 bit and for some projects that was the problem. One checkbox in step properties to make it execute in 32 bit env and I solved the problem we have been fighting for weeks.
I was also facing the same issue, I just did below step.
Open Data Flow tab>>Click anywhere except any task and then Right Click>>Properties>>Change **ForceExecutionValueType** to **Int64**
You can follow my screenshot:
Watch out for indexes on the destination tables - especially unique ones because this will throw an error that's doesn't pinpoint the problem.
For people who stumbled here for the same error. If you are trying to copy data from one Azure SQL database to another using SQL Server Import and Export Wizard. Use the 64-bit version.
From your windows search for SQL Server 2019 Import and Export Data (64-bit).

Squirrel SQL Exception Logging

I am developing a JDBC driver which is a wrapper for a web service. My unit tests work fine and I can write my own Java code that uses the driver to do useful things.
When I plug it into Squirrel SQL it is able to connect and get its initial batch of metadata (properties, schemas/catalogs, etc), but a simple SELECT query does not work. I receive an InvocationTargetException. This means a reflective call failed inside the method or constructor being invoked: this exception always wraps another exception which shows what really failed.
However, the error window in Squirrel SQL simply shows the exception name: no wrapped exception/cause, no stack trace. The log in my user directory contains no information regarding what happened.
Looking through the global properties and connection properties, I have not found any settings that would increase logging. I am using Squirrel SQL version 3.5.3 on Java 7 64-bit, Windows 7 64-bit.
How can I get Squirrel SQL to provide more information to help me find the cause of this error? I do not care if it outputs to the log file or the error window, just so I have something to go by.
The easiest way to change the log level is to edit the log4j.properties file. This file is in the same folder as the batch file that starts SquirrelSQL.
Simply change the line
log4j.rootLogger=info, SquirrelAppender
to
log4j.rootLogger = debug, SquirrelAppender

Rethrow an error from within SSIS package

Ive got a 2010 SSIS package which in turn runs other packages. Each package is independent so if one fails the others can still progress. My logic states the next one run on completion of the previous one wether it failed or not
My proble is that when one does error i get a very standard error message which doesn't tell me which one crashed or give me any other clues.
The Integrated Services Dashboard does assist but still lacking basic information. But what i would like is that the package rethrow the error so i can add some more ifnormation to it.
How is this done?
Do i create a script task in the Onerror event for the individual package and add some information of my own before rethrowing the error ?
Any examples that show you what needs to be done ? I still want the other packets to continue to execute.
First thing is that there is no 2010 version of SSIS. You are using Visual Studio 2010 against either 2008 R2 or 2012 but this does not affect the question in any way.
The best way to capture this error information is to log the error information in the child packages. This can be implemented using an SSIS frameworks such as
Free - http://ssisetlframework.codeplex.com/
Commercial product - http://pragmaticworks.com/Products/BI-xPress
Using these frameworks you could easily get the detailed error information that you need without having to modify the control package.

Timed out when access SQL Server 2008 r2

I'm developing a web project and for a start I need to create tables, procedures, views, etc.
At the first (and in debug mode) the code is running fine and the first tables are created but suddenly the transaction throws me an error Timed out
If I start again to run the code (in debug mode) it doesn't make any change
In order to run and continue to create the rest's I have to build the code again (without have made any change on it). I Published again and then continues to create more until will stops again and make the same actions as before.
I haven't test it yet in my web to see what will happen, and the reason is simple... my ISP didn't giving me the choice to create one more data base (because that is my contract I use).
Any way I need to know why that happens?
I have to say that I use some delays in my code especially when it reads from an xml file this file contains structure's of tables, procedures etc. And from where I read and execute thru my code behind in vb.net.
After many attempts finding solution, I noticed that the problem starts from the reading of the XML File, I set in this file some sleeps of totally 300 milliseconds and the code now runs ok but slowly...
Thanks to all for there assistance