Browse Source

Bugfix Kettle Env. #1

(cherry picked from commit f8e4e4ba91)
RELEASE_kern5.0
Daniel Quathamer 9 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 {
try { try {
initKettleEnv(); initKettleEnv();
} catch (Exception e) {
e.printStackTrace();
System.err.println("Kettle konnte nicht initialisiert werden.DETAILS:" + e.getMessage());
}
try {
SxPools.init(); SxPools.init();
initAll(); initAll();
@ -704,10 +709,12 @@ public class SuperXManager extends HttpServlet {
} }
} }
public final static void initKettleEnv() { public static void initKettleEnv() {
// init kettle environment // init kettle environment
try { try {
KettleEnvironment.init(); KettleEnvironment.init();
KettleLogStore.init();
logger.debug("Kettle environment sucessfully initialized.");
} catch (KettleException e) { } catch (KettleException e) {
logger.error("Couldn't initialize KettleEnvironment!", e); logger.error("Couldn't initialize KettleEnvironment!", e);
} }
@ -717,8 +724,6 @@ public class SuperXManager extends HttpServlet {
//DataSourceProviderFactory.setDataSourceProviderInterface(new KettleDataSourceProvider("default",logger)); //DataSourceProviderFactory.setDataSourceProviderInterface(new KettleDataSourceProvider("default",logger));
// init KettleLogStore // init KettleLogStore
KettleLogStore.init();
logger.debug("Kettle environment sucessfully initialized.");
} }
private final static class CacheUpdater extends Thread { 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 {
lastpart = lastpart.replaceAll("\\?ApplicationName.*", ""); lastpart = lastpart.replaceAll("\\?ApplicationName.*", "");
String type = getDatabaseAbbr().equals("PG") ? "POSTGRESQL" : "INFORMIX"; String type = getDatabaseAbbr().equals("PG") ? "POSTGRESQL" : "INFORMIX";
// DatabaseMeta.getDatabaseInterfacesMap() ; // DatabaseMeta.getDatabaseInterfacesMap() ;
try {
kettleDatabaseMeta = new DatabaseMeta("eduetl", type, "Native", host, lastpart, port, kettleDatabaseMeta = new DatabaseMeta("eduetl", type, "Native", host, lastpart, port,
props.getProperty("connectionName"), props.getProperty("password")); props.getProperty("connectionName"), props.getProperty("password"));
if (lastpart.indexOf(":INFORMIXSERVER") > -1) { if (lastpart.indexOf(":INFORMIXSERVER") > -1) {
@ -183,6 +184,10 @@ public class SxPool extends GenericObjectPool implements NamedObjectI {
kettleDatabaseMeta.setServername(ixServer); kettleDatabaseMeta.setServername(ixServer);
} }
} catch (Exception e1) {
System.err.println("Fehler bei Kettle DB Einrichtung: "+e1.toString());
e1.printStackTrace();
}
ConnectionFactory connectionFactory = new DriverManagerConnectionFactory( ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(
this.props.getProperty("connectionURL"), this.props); this.props.getProperty("connectionURL"), this.props);
PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory, this, PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory, this,

Loading…
Cancel
Save