Error: NameSpaceTool_tFileInputXML_1 cannot be resolved to a type
I am trying to run a very simple example job in TOS v2.3.2. I just have a tFileInputXML to parse an xml file and tLogRow component to print in the console the values of the xml file. When I run the job, I get the following error:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
NameSpaceTool_tFileInputXML_1 cannot be resolved to a type
NameSpaceTool_tFileInputXML_1 cannot be resolved to a type
Syntax error on tokens, delete these tokens
at mantis.mantis.Mantis.tFileInputXML_1Process(Mantis.java:267)
at mantis.mantis.Mantis.runJobInTOS(Mantis.java:917)
at mantis.mantis.Mantis.main(Mantis.java:836)
Is this a bug? Did I do something wrong? What can I try or where can I seek for more info on this problem?
Thanks in advance.
I'm having the same problem (Talend Open Studio 2.3.3). What did you corrected in the schema? I mean, what kind of errors may generate this problem? My schema seems ok, but probably is not (I'm very new to Talend Open Studio). Thanks in advance
Vieri, that was some time ago and I don't remember what was wrong. Just delete that component and try to create it again filling carefully every field needed.
Hi,
I used to have the same problem; I solved it with an XSLT transformation.
Create a file ".xsl", edit it then copy and paste the following code :
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl
utput method="xml" indent="yes" />
<xsl:template match="/|comment()|processing-instruction()">
<xsl:copy>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()" />
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name()}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
Use a tXSLT component to apply it on your iput XML file.
Once you have transform your file, you can reverse it.
--
R
I have exactly this problem. Everything is fine in the preview window, but not at run-time.
No matter how somple my XPATH items are I always get this error.
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
NameSpaceTool_tFileInputXML_2 cannot be resolved to a type
NameSpaceTool_tFileInputXML_2 cannot be resolved to a type
Syntax error on tokens, ArgumentList expected instead
Syntax error on tokens, ArgumentList expected instead
Syntax error on tokens, ArgumentList expected instead
Syntax error on tokens, ArgumentList expected instead
This was my first - quick - job in TOS (extract some data from an XML file) and I can't find any way around it. I did try the XSLT transform and it made no difference.
Version 2.4.1r6077
Would this problem go away if I tried Perl mode instead of Java, by chance?
Any hints on even what is going on would be appreciated.
cheers,
Mathew Frank
I am also seeing the same problem on a trivially simple XML input case, where the preview works fine but I get the following errors during execution:
NameSpaceTool_tFileInputXML_1 cannot be resolved to a type
NameSpaceTool_tFileInputXML_1 cannot be resolved to a type
Syntax error on tokens, ArgumentList expected instead
Syntax error on tokens, ArgumentList expected instead
I do not know what the NameSpaceTool is, but here is some of the relevant code:
NameSpaceTool_tFileInputXML_1 nsTool_tFileInputXML_1 = new NameSpaceTool_tFileInputXML_1();
nsTool_tFileInputXML_1.countNSMap(doc_tFileInputXML_1.getRootElement());
...
org.dom4j.XPath xTmp0_tFileInputXML_1 = temp_tFileInputXML_1.createXPath(nsTool_tFileInputXML_1.addDefaultNSPrefix(*** ERROR in Table ***,"/test/item/subitem"));
...
org.dom4j.XPath xTmp1_tFileInputXML_1 = temp_tFileInputXML_1.createXPath(nsTool_tFileInputXML_1.addDefaultNSPrefix(*** ERROR in Table ***,"/test/item/subitem"));
You can see the embedded *** ERROR in Table ***, which may be part of the probem. But I am not sure what table this is referring to.
I can work around the problem by manually setting the 'Basic settings' via Built-In for 'Property Type' and Built-In for 'Schema Type' on tFileInputXML_1 rather than using the Repository one that I created.
Greg
Hi,
I am also getting the same error but I do get this error if I am cascading the jobs and then start executing. But if I am executing the job individually, then there is no such error:
Following is the structure of my job:
tRunJob_1-->tRunJob_2-->tRunJob_3-->tRunJob_4-->tRunJob_5
And each job takes below parameters:
tFileList-->tFileInputXML-->tExtractDelimitedFields-->tFilterRow-->TMap--> tOracleOutout -->tFileOutputDelimited
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on tokens, delete these tokens
NameSpaceTool_tFileInputXML_1 cannot be resolved to a type
NameSpaceTool_tFileInputXML_1 cannot be resolved to a type
Hi
I ran into the same error, on a "tInputFileXML -> tMap -> tOracleOutput" job.
The missing class NamespaceToolxxx is defined in the same method (inner class 100 or so line above the error), so in looks like a compiler error. Well, it's not! (I copied the source to Eclipse to check the program stucture).
In fact, have a look at the code tab of your job. There are probably other syntax error in the code, originating from other component of the job.
I found out my problem was related to stale configuration of the tMap (a reference to a "row2" link that was no more present on the design tab). I deleted the output schema in the tMap configuration sheet, then recreate the link to tOracleOutput and remapped the field.
Next run was ok.
HTH.