Exception in component tMSSqlInput

One Star

Exception in component tMSSqlInput

Hi guys,
I've been using TOS with Perl and have recently started testing some jobs using Java instead.
With Perl I was using a ODBC to gain access to an MS SQL Server database and am now using the tMSSqlConnection with Java. When I test my job in TOS it works perfectly, but once deployed I receive:
Exception in component tMSSqlInput
java.lang.NullPointerException

I will raise a bug on the bug tracker, but I'm wondering if it's something I'm missing?
Cheers,
c0utta
Tags (1)
One Star

Re: Exception in component tMSSqlInput

Hi c0utta,
some more information especially the line of the error and some code around the line could be very helpful.
Bye
Volker
One Star

Re: Exception in component tMSSqlInput

Hi Volker,
Thanks for your interest.
I have been able to isolate the problem even further - the job in question has two tMSSqlConnections that refer to different databases on the same MS SQL 2000 database server.
The line(s) of code where the error occurs is
			java.sql.Statement stmt_tMSSqlInput_2 = conn_tMSSqlInput_2
.createStatement();

When I "Export Job Scripts" and then run the job within TOS I get the same issue, but if I refresh "Link with" to select the connection the problem goes away.
I have attached a couple of screenshots to show you my simple model.
Thanks,
c0utta
One Star

Re: Exception in component tMSSqlInput

Hi c0utta,
the error looks like a result of a missing connection. I'm not sure if this could help you but I always connect my tConnection components with the primary job with a onSubJobOk or onComponentOk.
Bye
Volker
One Star

Re: Exception in component tMSSqlInput

Hi Volker,
Thanks for your direction because it has highlighted the issue - the tConnection properties must be a part of the flow, not just sitting out by themselves. Once I attached them with a OnSubJobOk to the subsequent flows, it worked. Strange how the job (mostly) ran OK in Eclipse though.
Thanks again,
c0utta
One Star

Re: Exception in component tMSSqlInput

Hi c0utta,
I'm glad that I could help you. Why this work in TOS directly and not as exported script I do not know. I thought it would be the same generated code, but this seems to be wrong...
Bye
Volker