You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Erich Meier <Er...@methodpark.de> on 2001/07/05 14:57:02 UTC
TurbineConfig standalone
Hi!
I am trying to initialize a standalone turbine instance within another servlet
framework. Therefore I have an initialization servlet that reads:
public void init() {
String prefix = getServletContext().getRealPath("/");
Category log = Category.getInstance(InitServlet.class.getName());
log.info("configured logging");
/*
* Configure and set up turbine.
*/
String turbineinitfile = getInitParameter("turbineinitfile");
if (turbineinitfile != null) {
log.info("configuring turbine from "+prefix+turbineinitfile);
TurbineConfig config = new TurbineConfig(".",
prefix+turbineinitfile);
log.info("initializing turbine");
config.init();
log.info("initialized turbine");
/*
* Now try to use the turbine logging service.
*/
try {
Log.info("turbine initialization done");
}
catch (Exception e) {
log.error("turbine logging threw exception: "+e.getMessage());
}
}
log.info("service initialization done");
}
This does not work. Calling Log.info results in a
"java.lang.ExceptionInInitializerError:
org.apache.turbine.services.InstantiationException: ServiceBroker: unknown
service LoggingService requested"
exception.
prefix+turbineinitfile contain the absolute path to the
TurbineResources.properties file, the file is attached.
What am I doing wrong?
TIA,
Erich
--
Dr. Erich Meier, Software Process Improvement
method park, Wetterkreuz 19a, 91058 Erlangen, Germany
Tel. +49-9131-97206-316 mailto:Erich.Meier@methodpark.de
Fax. +49-9131-97206-200 http://www.methodpark.de/