Bom dia!
Fiz o datasource do Senior e esta dando o seguinte erro ao conectar, alguém poderia me ajudar?
**OBS: Em fluig produção funciona corretamente, mas no fluig homologação que da esse erro.
Obrigada
function createDataset(fields, constraints, sortFields) {
var newDataset = DatasetBuilder.newDataset();
log.info("QUERY: " + myQuery);
var dataSource = "java:/jdbc/FluigDS";
var ic = new javax.naming.InitialContext();
var ds = ic.lookup(dataSource);
var created = false;
var myQuery = "SELECT F.NUMEMP, F.TIPCOL, F.NUMCAD, F.NOMFUN, F.NUMPIS, F.EMICAR, F.CONRHO, P.USU_NUMLID, " +
"(SELECT F1.NOMFUN FROM R034FUN F1 WHERE F1.NUMCAD = P.USU_NUMLID) NOME_LIDER, " +
"H.USU_NUMFIS, U.CODCCU, U.NOMCCU, C.CODCAR, C.TITRED, C.SISCAR, R.NUMLOC, R.NOMLOC " +
"FROM R034FUN F " +
"INNER JOIN R034CPL P ON P.NUMEMP = F.NUMEMP AND P.TIPCOL = F.TIPCOL AND P.NUMCAD = F.NUMCAD " + //Complemento funcionario
"INNER JOIN R038HCH H ON H.NUMEMP = F.NUMEMP AND H.TIPCOL = F.TIPCOL AND H.NUMCAD = F.NUMCAD " + //Historico cracha
"INNER JOIN R018CCU U ON U.NUMEMP = F.NUMEMP AND U.CODCCU = F.CODCCU " + //Centro de Custo
"INNER JOIN R024CAR C ON C.ESTCAR = F.ESTCAR AND C.CODCAR = F.CODCAR " + //Cargo
"INNER JOIN R016ORN R ON R.TABORG = F.TABORG AND R.NUMLOC = F.NUMLOC " + //Setor
"INNER JOIN R010SIT S ON S.CODSIT = F.SITAFA " + //Descricao das situacoes (SITAFA)
"WHERE F.NUMEMP = '1' " + //empresa
"AND F.CODFIL = '1' " + //filial
"AND F.TIPCOL = '1' " + //funcionario
"AND F.SITAFA = '1' " + //trabalhando
"AND H.TIPCRA = '1' " + //tipo cracha
"AND H.STAATU = '1' " + //situacao cracha ativo
"AND C.CODCAR <> '768' " + //não considerar jovem aprendiz
"ORDER BY U.CODCCU, C.SISCAR, F.NOMFUN, P.USU_NUMLID ";
try {
var conn = ds.getConnection();
var stmt = conn.createStatement();
var rs = stmt.executeQuery(myQuery);
var columnCount = rs.getMetaData().getColumnCount();
while (rs.next()) {
if (!created) {
for (var i = 1; i <= columnCount; i++) {
newDataset.addColumn(rs.getMetaData().getColumnName(i));
}
created = true;
}
var Arr = new Array();
for (var i = 1; i <= columnCount; i++) {
var obj = rs.getObject(rs.getMetaData().getColumnName(i));
if (null != obj) {
Arr[i - 1] = rs.getObject(rs.getMetaData().getColumnName(i)).toString();
} else {
Arr[i - 1] = "null";
}
}
newDataset.addRow(Arr);
}
} catch (e) {
log.error("ERRO==============> " + e.message);
} finally {
if (stmt != null) {
stmt.close();
}
if (conn != null) {
conn.close();
}
}
return newDataset;
}
2018-11-01 11:07:42,665 ERROR [com.datasul.technology.webdesk.customization.CustomizationManager] (default task-52) - Usuário Executor : samara.oliveira - Substituto : Não - Executando evento : createDatasetERRO AO EXECUTAR SCRIPT -> NOK - sun.org.mozilla.javascript.internal.WrappedException: Wrapped javax.naming.NameNotFoundException: jdbc/Senior [Root exception is java.lang.IllegalStateException] (#6) in at line number 6
**2018-11-01 11:07:42,665 ERROR [com.datasul.technology.webdesk.dataset.CustomizedDatasetBuilder] (default task-52) Não foi possÃvel executar script do dataset.
**
2018-11-01 11:07:42,665 ERROR [com.datasul.technology.webdesk.dataset.CustomizedDatasetBuilder] (default task-52) sun.org.mozilla.javascript.internal.WrappedException: Wrapped javax.naming.NameNotFoundException: jdbc/Senior [Root exception is java.lang.IllegalStateException] (#6) in at line number 6: com.datasul.technology.webdesk.customization.CustomizationException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped javax.naming.NameNotFoundException: jdbc/Senior [Root exception is java.lang.IllegalStateException] (#6) in at line number 6