Compare commits

..

6 Commits

Author SHA1 Message Date
vyu-talend
7353bc7c0c Vyu/tdi 43446 fix compilation error for tmap (#4291)
* Fix(TDI-43446):fix compilation error.

* Fix(TDI-43446):fix issues.

* Fix(TDI-43446):fix a bug written by myself.

* Fix(TDI-43446):fix an issue.

* Fix(TDI-43446):fix the exception problem.

* Fix(TDI-43446):fix issue.
2020-01-07 17:07:24 +08:00
slushatel
49ff4620ed Sbovsunovskyi/tdi 43065 t dtd validator and utf8 (#4034)
* fix(TDI-43065): tDTDValidator fails with tDTDValidator_1 Invalid byte 2 of 3-byte UTF-8 sequence when XML file encoded in UTF-8 contains multi-bytes characters

* fix(TDI-43065): tDTDValidator fails with tDTDValidator_1 Invalid byte 2 of 3-byte UTF-8 sequence when XML file encoded in UTF-8 contains multi-bytes characters

* fix(TDI-43065): tDTDValidator fails with tDTDValidator_1 Invalid byte 2 of 3-byte UTF-8 sequence when XML file encoded in UTF-8 contains multi-bytes characters. Change default encoding to system's 'file.encoding'

(cherry picked from commit f77ff96de2)
2019-10-28 12:08:29 +02:00
dmytroshekera
7556a6dbce fix(TDI-42973):An error occurs on tFileOutputExcel after Iterate when… (#3986)
* fix(TDI-42973):An error occurs on tFileOutputExcel after Iterate when /tmp/profiles folder does not exist
* related to fix(TDI-42092)
2019-10-03 15:21:29 +03:00
Maksym Basiuk
c56beab21f fix(TDI-43025): apply fix for this issue in older studios 2019-10-01 14:33:21 +03:00
dmytroshekera
c784f00467 revert "fix(TDI-42092): An error occurs on tFileOutputExcel after Iterate when /tmp/profiles folder does not exist (#3419) (#3945)" (#3946)
This reverts commit 654dd40c7f.
2019-09-18 19:59:30 +03:00
dmytroshekera
654dd40c7f fix(TDI-42092): An error occurs on tFileOutputExcel after Iterate when /tmp/profiles folder does not exist (#3419) (#3945)
* fix(TDI-42092): An error occurs on tFileOutputExcel after
* Iterate when /tmp/profiles folder does not exist.
* reproduce in multithread env - each thread try create
* folder. First thread create. Second crash because folder exist
2019-09-18 16:43:21 +03:00
5 changed files with 78 additions and 87 deletions

View File

@@ -1,67 +0,0 @@
---
version: 6.5.1
module: https://talend.poolparty.biz/coretaxonomy/42
product:
- https://talend.poolparty.biz/coretaxonomy/23
---
# TPS-3235
| Info | Value |
| ---------------- | ---------------- |
| Patch Name | Patch\_20190809_TPS-3235\_v1-6.5.1 |
| Release Date | 2019-08-09 |
| Target Version | Talend-Studio-20180116\_1512-V6.5.1 |
| Product affected | Talend Studio |
## Introduction
This is a self-contained patch.
**NOTE**: For information on how to obtain this patch, reach out to your Support contact at Talend.
## Fixed issues
This patch contains the following fixes:
- TPS-3235 [6.5.1] Sub jobs for tParallelize will not die when it is an independent process by tRunJob (TDI-42570)
## Prerequisites
Consider the following requirements for your system:
- Talend Studio 6.5.1 must be installed.
## Installation
### Installing the patch using Software update
1) Logon TAC and switch to Configuration->Software Update, then enter the correct values and save referring to the documentation: https://help.talend.com/reader/f7Em9WV_cPm2RRywucSN0Q/j9x5iXV~vyxMlUafnDejaQ
2) Switch to Software update page, where the new patch will be listed. The patch can be downloaded from here into the nexus repository.
3) On Studio Side: Logon Studio with remote mode, on the logon page the Update button is displayed: click this button to install the patch.
### Installing the patch using Talend Studio
1) Create a folder named "patches" under your studio installer directory and copy the patch .zip file to this folder.
2) Restart your studio: a window pops up, then click OK to install the patch, or restart the commandline and the patch will be installed automatically.
### Installing the patch using Commandline
Execute the following commands:
1. Talend-Studio-win-x86_64.exe -nosplash -application org.talend.commandline.CommandLine -consoleLog -data commandline-workspace startServer -p 8002 --talendDebug
2. initRemote {tac_url} -ul {TAC login username} -up {TAC login password}
3. checkAndUpdate -tu {TAC login username} -tup {TAC login password}
## Uninstallation
Backup the Affected files list below. Uninstall the patch by restore the backup files.
## Affected files for this patch
The following files are installed by this patch:
- {Talend\_Studio\_path}/plugins/org.talend.designer.components.localprovider\_6.5.1.20180116\_1512/components/tRunJob/tRunJob\_main.javajet

View File

@@ -38,7 +38,7 @@ class BigQueryUtil_<%=cid%> {
job.setConfiguration(config);
List<com.google.api.services.bigquery.model.TableReference> referencedTables = bigqueryclient.jobs().insert(projectId, job).execute().getStatistics().getQuery().getReferencedTables();
if(referencedTables != null && !referencedTables.isEmpty()) {
location = bigqueryclient.tables().get(projectId, referencedTables.get(0).getDatasetId(), referencedTables.get(0).getTableId()).execute().getLocation();
location = bigqueryclient.tables().get(referencedTables.get(0).getProjectId(), referencedTables.get(0).getDatasetId(), referencedTables.get(0).getTableId()).execute().getLocation();
}
return location;
}
@@ -167,4 +167,4 @@ class BigQueryUtil_<%=cid%> {
return insert;
}
}
}

View File

@@ -45,8 +45,8 @@ String xmlfile = ElementParameterParser.getValue(node, "__XMLFILE__");
java.lang.StringBuilder sb<%=cid %>=new java.lang.StringBuilder("");
try{
br<%=cid %> = new java.io.BufferedReader(new java.io.InputStreamReader(url<%=cid %>.openStream()));
br<%=cid %> = new java.io.BufferedReader(new UnicodeReader(url<%=cid %>.openStream(), null));
char[] buffer<%=cid %> = new char[1024];
int length<%=cid %> = -1;
while ((length<%=cid %> = br<%=cid %>.read(buffer<%=cid %>)) != -1)
@@ -66,7 +66,9 @@ String xmlfile = ElementParameterParser.getValue(node, "__XMLFILE__");
dbf<%=cid %> = javax.xml.parsers.DocumentBuilderFactory.newInstance();
dbf<%=cid %>.setValidating(false);
db<%=cid %> = dbf<%=cid %>.newDocumentBuilder();
org.w3c.dom.Document doc<%=cid %> = db<%=cid %>.parse(new java.io.StringBufferInputStream(sb<%=cid%>.toString()));
org.w3c.dom.Document doc<%=cid %> = db<%=cid %>.parse(
new java.io.ByteArrayInputStream(sb<%=cid%>.toString().getBytes("UTF-8")));
String rootnode<%=cid %>=doc<%=cid %>.getDocumentElement().getNodeName();
String encoding=null;
@@ -89,8 +91,8 @@ String xmlfile = ElementParameterParser.getValue(node, "__XMLFILE__");
int offsetRoot<%=cid %>=sb<%=cid %>.indexOf("<"+rootnode<%=cid %>);
sb<%=cid%>.replace(0, offsetRoot<%=cid %>, reference<%=cid %>);
is<%=cid %>=new java.io.StringBufferInputStream(sb<%=cid %>.toString());
is<%=cid %> = new java.io.ByteArrayInputStream(sb<%=cid%>.toString().getBytes("UTF-8"));
class MyHandler<%=cid %> extends org.xml.sax.helpers.DefaultHandler{
String errorMessage = null;
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException {

View File

@@ -777,7 +777,9 @@ if(!hasDynamic && isIncludeHeader){
xlsxTool_<%=cid%>.setRecalculateFormula(<%=recalculateFormula%>);
xlsxTool_<%=cid%>.setXY(<%=firstCellYAbsolute%>,<%=firstCellXStr%>,<%=firstCellYStr%>,<%=keepCellFormating%>);
<%if(!useStream){%>
xlsxTool_<%=cid%>.prepareXlsxFile(fileName_<%=cid%>);
synchronized ( globalMap.get("concurrentHashMap") ) {
xlsxTool_<%=cid%>.prepareXlsxFile(fileName_<%=cid%>);
}
<%}else{%>
xlsxTool_<%=cid%>.prepareStream();
<%}%>

View File

@@ -454,8 +454,15 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
IMetadataTable table = connection.getMetadataTable();
List<IMetadataColumn> listColumns = table.getListColumns();
for (IMetadataColumn column : listColumns) {
%>this.<%= connection.getName() %>__<%= column.getLabel() %> = <%= connection.getName() %>.<%= column.getLabel() %>;
if ("Dynamic".equals(JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable()))) {
%>
this.<%= connection.getName() %>__<%= column.getLabel() %> = (routines.system.Dynamic) <%= connection.getName() %>.<%= column.getLabel() %>.clone();
<%
} else {
%>
this.<%= connection.getName() %>__<%= column.getLabel() %> = <%= connection.getName() %>.<%= column.getLabel() %>;
<%
}
}
}
%>
@@ -463,10 +470,15 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
sizeNextColumns = nextColumnsKeys.size();
for (int iColumn = 0; iColumn < sizeNextColumns; iColumn++) { // T_TM_B_104
IMetadataColumn column = nextColumnsKeys.get(iColumn);
%>this.exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %> = exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %>;
if ("Dynamic".equals(JavaTypesManager.getTypeToGenerate(column.getTalendType(), column.isNullable()))) {
%>
this.exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %> = (routines.system.Dynamic) exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %>.clone();
<%
} else {
%>
this.exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %> = exprKey_<%= nextInputTable.getName() %>__<%=column.getLabel() %>;
<%
}
} // T_TM_B_104
%>
}
@@ -653,14 +665,25 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
<%
} else {
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
typeToGenerate=typeToGenerate.substring(0,1).toUpperCase()+typeToGenerate.substring(1);
typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
typeToGenerate = typeToGenerate.substring(0,1).toUpperCase()+typeToGenerate.substring(1);
%>
length = dis.readByte();
if (length == -1) {
this.<%= connection.getName() %>__<%= column.getLabel() %> = null;
} else {
this.<%= connection.getName() %>__<%= column.getLabel() %> = dis.read<%= typeToGenerate %>();
<%
if ("Dynamic".equals(typeToGenerate)) {
hasAtLeastOneObjectType = true;
%>
this.<%= connection.getName() %>__<%= column.getLabel() %> = (<%= typeToGenerate %>) dis.readObject();
<%
} else {
%>
this.<%= connection.getName() %>__<%= column.getLabel() %> = dis.read<%= typeToGenerate %>();
<%
}
%>
}
<%
}
@@ -727,14 +750,25 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
<%
} else {
typeToGenerate =JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
typeToGenerate=typeToGenerate.substring(0,1).toUpperCase()+typeToGenerate.substring(1);
typeToGenerate = JavaTypesManager.getTypeToGenerate(column.getTalendType(), false);
typeToGenerate = typeToGenerate.substring(0,1).toUpperCase()+typeToGenerate.substring(1);
%>
length = dis.readByte();
if (length == -1) {
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = null;
} else {
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = dis.read<%= typeToGenerate %>();
<%
if ("Dynamic".equals(typeToGenerate)) {
hasAtLeastOneObjectType = true;
%>
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = (<%= typeToGenerate %>) dis.readObject();
<%
} else {
%>
this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %> = dis.read<%= typeToGenerate %>();
<%
}
%>
}
<%
}
@@ -832,7 +866,17 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
dos.writeByte(-1);
} else {
dos.writeByte(0);
dos.write<%= typeToGenerate %>(this.<%= connection.getName() %>__<%= column.getLabel() %>);
<%
if ("Dynamic".equals(typeToGenerate)) {
%>
dos.writeObject(this.<%= connection.getName() %>__<%= column.getLabel() %>);
<%
} else {
%>
dos.write<%= typeToGenerate %>(this.<%= connection.getName() %>__<%= column.getLabel() %>);
<%
}
%>
}
<%
@@ -893,7 +937,17 @@ for (int iInputTable = 0; iInputTable < sizeInputTables - 1; iInputTable++) { //
dos.writeByte(-1);
} else {
dos.writeByte(0);
dos.write<%= typeToGenerate %>(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
<%
if ("Dynamic".equals(typeToGenerate)) {
%>
dos.writeObject(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
<%
} else {
%>
dos.write<%= typeToGenerate %>(this.exprKey_<%= nextInputTable.getName() %>__<%= column.getLabel() %>);
<%
}
%>
}
<%