Browse Source

Bugfix Kettle Env. #1

(cherry picked from commit f8e4e4ba91)
RELEASE_kern5.0
Daniel Quathamer 11 months ago
parent
commit
0de24d2a6c
  1. 11
      src/de/superx/servlet/SuperXManager.java
  2. 5
      src/de/superx/servlet/SxPool.java

11
src/de/superx/servlet/SuperXManager.java

@ -689,6 +689,11 @@ public class SuperXManager extends HttpServlet { @@ -689,6 +689,11 @@ public class SuperXManager extends HttpServlet {
try {
initKettleEnv();
} catch (Exception e) {
e.printStackTrace();
System.err.println("Kettle konnte nicht initialisiert werden.DETAILS:" + e.getMessage());
}
try {
SxPools.init();
initAll();
@ -704,10 +709,12 @@ public class SuperXManager extends HttpServlet { @@ -704,10 +709,12 @@ public class SuperXManager extends HttpServlet {
}
}
public final static void initKettleEnv() {
public static void initKettleEnv() {
// init kettle environment
try {
KettleEnvironment.init();
KettleLogStore.init();
logger.debug("Kettle environment sucessfully initialized.");
} catch (KettleException e) {
logger.error("Couldn't initialize KettleEnvironment!", e);
}
@ -717,8 +724,6 @@ public class SuperXManager extends HttpServlet { @@ -717,8 +724,6 @@ public class SuperXManager extends HttpServlet {
//DataSourceProviderFactory.setDataSourceProviderInterface(new KettleDataSourceProvider("default",logger));
// init KettleLogStore
KettleLogStore.init();
logger.debug("Kettle environment sucessfully initialized.");
}
private final static class CacheUpdater extends Thread {

5
src/de/superx/servlet/SxPool.java

@ -174,6 +174,7 @@ public class SxPool extends GenericObjectPool implements NamedObjectI { @@ -174,6 +174,7 @@ public class SxPool extends GenericObjectPool implements NamedObjectI {
lastpart = lastpart.replaceAll("\\?ApplicationName.*", "");
String type = getDatabaseAbbr().equals("PG") ? "POSTGRESQL" : "INFORMIX";
// DatabaseMeta.getDatabaseInterfacesMap() ;
try {
kettleDatabaseMeta = new DatabaseMeta("eduetl", type, "Native", host, lastpart, port,
props.getProperty("connectionName"), props.getProperty("password"));
if (lastpart.indexOf(":INFORMIXSERVER") > -1) {
@ -183,6 +184,10 @@ public class SxPool extends GenericObjectPool implements NamedObjectI { @@ -183,6 +184,10 @@ public class SxPool extends GenericObjectPool implements NamedObjectI {
kettleDatabaseMeta.setServername(ixServer);
}
} catch (Exception e1) {
System.err.println("Fehler bei Kettle DB Einrichtung: "+e1.toString());
e1.printStackTrace();
}
ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(
this.props.getProperty("connectionURL"), this.props);
PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory, this,

Loading…
Cancel
Save