Four Stars

AMC (tstatCatcher) / Studio configuration throwing an error but still logging in database?

Hello

 

I have an AMC database with the 3 tables (stat,log,flowmeter)

 

In Studio, I have the Project Settings enabled (Project Settings > Job Settings > Stats & Logs) and configured to log into MS SQL datagbase.

 

Both the Logs & Meter table are capturing data correctly. However, when I enable the "use statistics (tStatCatcher)"; I get an error thrown (even as stat activity

records are logged in the stat data table) when job runs but still throws a generic error and not sure what to correct.

 

The connection is working as component is capturing tStatCatcher activity ;

the last transaction in stat table contains no origin name and message_type = end, message = failure.

 

I am just running the job locally and not on TAC at the moment.


Exception in component talendStats_DB (POC_demo)
java.sql.SQLException: An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
    at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
    at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
    at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
    at uhg_poc.POC_demo_0_1.POC_demo.talendStats_STATSProcess(POC_demo.java:8647)
[FATAL]: uhg_poc.POC_demo_0_1.POC_demo - talendStats_DB An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
java.sql.SQLException: An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
    at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
    at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
    at uhg_poc.POC_demo_0_1.POC_demo.runJobInTOS(POC_demo.java:11042)
    at uhg_poc.POC_demo_0_1.POC_demo.main(POC_demo.java:10421)
    at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
    at uhg_poc.POC_demo_0_1.POC_demo.talendStats_STATSProcess(POC_demo.java:8647)
    at uhg_poc.POC_demo_0_1.POC_demo.runJobInTOS(POC_demo.java:11042)
    at uhg_poc.POC_demo_0_1.POC_demo.main(POC_demo.java:10421)
[FATAL]: uhg_poc.POC_demo_0_1.POC_demo - talendStats_DB An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
java.sql.SQLException: An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
    at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671)
    at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
    at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
    at uhg_poc.POC_demo_0_1.POC_demo.talendStats_STATSProcess(POC_demo.java:8647)
    at uhg_poc.POC_demo_0_1.POC_demo.tLogCatcher_1Process(POC_demo.java:5673)
    at uhg_poc.POC_demo_0_1.POC_demo$TalendException.printStackTrace(POC_demo.java:756)
    at uhg_poc.POC_demo_0_1.POC_demo.runJobInTOS(POC_demo.java:11044)
    at uhg_poc.POC_demo_0_1.POC_demo.main(POC_demo.java:10421)
[FATAL]: uhg_poc.POC_demo_0_1.POC_demo - talendLogs_DB An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
java.sql.SQLException: An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.

 

Appreciate the help.

 

3 REPLIES
Moderator

Re: AMC (tstatCatcher) / Studio configuration throwing an error but still logging in database?

Hello,

This error message appears when in a SELECT INTO statement not every column has a unique name.

Did you put a schema name in your MS SQL database connection metadata?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: AMC (tstatCatcher) / Studio configuration throwing an error but still logging in database?

Hi problem went away without any known reason.   :-?

 

db schema was never changed and it is;

 

tstatlog

Column_name Type Computed Length
moment datetime no 8
pid varchar no 20
father_pid varchar no 20
root_pid varchar no 20
system_pid bigint no 8
project varchar no 50
job varchar no 255
job_repository_id varchar no 255
job_version varchar no 255
context varchar no 50
origin varchar no 255
message_type varchar no 255
message varchar no 255

 

The oddest thing was that records were being still inserted into the stats table but some unknown error was thrown at the end of the job....that threw the sql error

 

I'll provide an update if I can determine root cause /solution

 

Thanks

Moderator

Re: AMC (tstatCatcher) / Studio configuration throwing an error but still logging in database?

Hi,

Feel free to post your issue on forum.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.