Hello,
I am having an issue with a JDBC connection when running a graph embedded in java.
The graph runs fine from the gui designer in eclipse and from the command line using the clover engine.
When running it embedded in java it fails. I am using a postgres database for this project
Here is the error message that I am getting.
ERROR org.jetel.component.ComponentFactory - Unknown connection: JDBC class: JDBC
2010-04-05 13:32:55,327 [http-8443-7] ERROR com.matrixretail.etl.CloverHelper - Failed to run Clover graph
java.lang.RuntimeException: Unknown connection: JDBC class: JDBC
at org.jetel.database.ConnectionFactory.getConnectionClass(ConnectionFactory.java:107)
at org.jetel.database.ConnectionFactory.createConnection(ConnectionFactory.java:118)
at org.jetel.graph.TransformationGraphXMLReaderWriter.instantiateDBConnections(TransformationGraphXMLReaderWriter.java:646)
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:338)
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:286)
Relevant code as follows:
env is a tomcat properties file resource bundle
log.debug("Initializing Clover Engine");
EngineInitializer.initEngine(env.getString("paths.clover.engine") + "plugins", env.getString("paths.clover.project") + "workspace.prm", null);
EngineInitializer.forceActivateAllPlugins();
GraphRuntimeContext runtimeContext = new GraphRuntimeContext();
TransformationGraph graph = null;
InputStream graphInputStream = null;
InputStream propsInputStream = null;
Properties props = new Properties();
try
{
log.debug("Getting graph input stream");
graphInputStream = new FileInputStream(pathToGraph);
if (pathToProps != null)
{
log.debug("Props file passed in, loading");
propsInputStream = new FileInputStream(pathToProps);
props.load(propsInputStream);
}
log.debug("Adding project directory to props");
props.put("PROJECT_DIR", env.getString("paths.clover.project"));
log.debug("Loading Graph");
TransformationGraphXMLReaderWriter graphReader = new TransformationGraphXMLReaderWriter(props);
graph = graphReader.read(graphInputStream);
log.debug("Initializing Graph");
graph.init();
log.debug("Running Graph");
WatchDog watchDog = new WatchDog(graph, runtimeContext);
IThreadManager threadManager = new SimpleThreadManager();
Future<Result> futureResult = threadManager.executeWatchDog(watchDog);
Result result = Result.N_A;
result = futureResult.get();
log.debug("Finished, result:" + result.toString());
}
catch (Exception ex)
{
log.error("Failed to run Clover graph", ex);
}
Any help is appreciated.