"Aravinda Addala" <[EMAIL PROTECTED]> writes:
> I have been trying to use Turbine as a standalone application with Velocity service.
>When I tried to use this code, get an error:
>
> TurbineConfig tc = new
>TurbineConfig("/export/home/aravinda/myapplication/WEB-INF/conf","Standalone.properties");
> tc.init();
>
> I have just copied TurbineResources.properties to Standalone.properties
>
> The error is:
>
> Turbine: init
> Exception in thread "main" java.lang.Error: VelocityService runtime log file is
>misconfigured: 'null' is not a valid log file: TurbineConfig users must use a path
>relative to web application root
As the error states, you don't have the path to your Velocity log file
configured properly in your TurbineResources.properties file.
Because TurbineVelocityService uses TurbineConfig's getRealPath(), the
log file *must exist before Turbine is initialized* (as per the
servlet APIs contract for ServletConfig's getRealPath() method).
getRealPath() is returning null because even if your log file
configuration points to a reasonable place, your log file doesn't yet
exist.
I am not happy with this behavior. Jason, do we have another method
which mirrors the path resolution functionality of getRealPath() but
doesn't need the file to already exist?
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]