You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Phillip Rhodes <rh...@telerama.com> on 2002/08/22 04:18:53 UTC

need working TurbineStandalone.properties example

Does anyone have turbine 2.1 working standalone using the velocity template 
service?  Not just configured without the VelocityService, but using it in 
your standalone application?

Can you send me your turbinestandalone.properties file?

Can you send me one the line that you use to initialize the turbine.  Here 
is what I use:

         TurbineConfig config = new TurbineConfig(
                                        "/tdk/webapps/hra/WEB-INF/conf",
                                        "TurbineStandalone.properties");

That will help me figure out what I am doing wrong.  I appreciate it if you 
take the time and send me a working configuration.   Thanks.

Here why I need the help.
I had to create a /tdk/webapps/hra/WEB-INF/conf/logs/velocity.log to 
initialize without a fatal error.
But still in my turbine log i get an error that says the velocity template 
could not be started.
Thanks
Here is a link to my TurbineStandalone.properties file:
http://test.rhoderunner.com/logs/TurbineStandalone.properties


Here is the stack trace:
[Wed Aug 21 22:06:24 EDT 2002] -- ERROR --
	Exception:  org.apache.turbine.services.InitializationException: Failed to 
initialize TurbineVelocityService
	Stack Trace follows:
	java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:380)
	at 
org.apache.commons.collections.ExtendedProperties.addPropertyDirect(ExtendedProperties.java:683)
	at 
org.apache.commons.collections.ExtendedProperties.addProperty(ExtendedProperties.java:657)
	at 
org.apache.velocity.runtime.configuration.Configuration.addProperty(Configuration.java)
	at 
org.apache.turbine.services.velocity.TurbineVelocityService.initVelocity(TurbineVelocityService.java:453)
	at 
org.apache.turbine.services.velocity.TurbineVelocityService.init(TurbineVelocityService.java:138)
rethrown as org.apache.turbine.services.InitializationException: Failed to 
initialize TurbineVelocityService
	at 
org.apache.turbine.services.velocity.TurbineVelocityService.init(TurbineVelocityService.java:173)
	at 
org.apache.turbine.services.TurbineBaseService.init(TurbineBaseService.java:108)
	at 
org.apache.turbine.services.BaseInitableBroker.initClass(BaseInitableBroker.java:150)
	at 
org.apache.turbine.services.BaseServiceBroker.doInitService(BaseServiceBroker.java:226)
	at 
org.apache.turbine.services.BaseServiceBroker.initServices(BaseServiceBroker.java:195)
	at org.apache.turbine.Turbine.init(Turbine.java:185)
	at org.apache.turbine.util.TurbineConfig.init(TurbineConfig.java:163)
	at com.rhoderunner.hra.main.GuideGenerator.main(GuideGenerator.java:50)

[Wed Aug 21 22:06:24 EDT 2002] -- INFO -- Finished initializing all services!




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: need working TurbineStandalone.properties example

Posted by Bert van Brakel <be...@advance-enterprise.com>.
I've had some problems running in standalone mode too. I fixed it by
putting an empty velocity.log file in the logs directory. This may or
not be related to your problem.

Bert.

On Fri, 2002-08-23 at 00:26, Phillip Rhodes wrote:
> Hugh,
> Thanks, but did not work.
> 
> Can you confirm the full path to your TurbineResources.properties is:
> f:/gti/gti-jetspeed/WEB-INF/conf/TurbineResources.properties
> 
> Phillip
> 
> 
> 
> 
> 
> At 03:25 AM 8/22/2002 -0500, you wrote:
> 
> >I think the problem you are having is the way you are passing the variables
> >into TurbineConfig.  Your properties file should be okay out of the box.
> >
> >     boolean isTurbineStarted  = false;
> >
> >     public  String  webAppDir = "f:/gti/gti-jetspeed";
> >     public  String  configFile =
> >"WEB-INF\\conf\\TurbineResources.properties";
> >     if (!isTurbineStarted)
> >         {
> >             if (config == null)
> >             {
> >                 config = new TurbineConfig(this.webAppDir, this.configFile);
> >                 config.init();
> >                 isTurbineStarted = true;
> >             }
> >         }
> >
> >        this.runData = new DefaultJetspeedRunData();
> >         //Create a ParameterParser and pass it into the RunData Object
> >         DefaultParameterParser parser = new DefaultParameterParser();
> >         runData.setParameterParser(parser);
> >         this.context = TurbineVelocity.getContext(runData);
> >         this.setUser(DCIPortalTest.userId);
> >
> >         //You can then call the Velocity service
> >         VelocityService velocityService =
> >(VelocityService)TurbineServices.getInstance().getService(VelocityService.SE
> >RVICE_NAME);
> >         String result = velocityService.handleRequest(context,
> >"templateName.vm")
> >
> >r,
> >Hugh
> >
> >----- Original Message -----
> >From: "Phillip Rhodes" <rh...@telerama.com>
> >To: <tu...@jakarta.apache.org>
> >Sent: Wednesday, August 21, 2002 9:18 PM
> >Subject: need working TurbineStandalone.properties example
> >
> >
> > > Does anyone have turbine 2.1 working standalone using the velocity
> >template
> > > service?  Not just configured without the VelocityService, but using it in
> > > your standalone application?
> > >
> > > Can you send me your turbinestandalone.properties file?
> > >
> > > Can you send me one the line that you use to initialize the turbine.  Here
> > > is what I use:
> > >
> > >          TurbineConfig config = new TurbineConfig(
> > >                                         "/tdk/webapps/hra/WEB-INF/conf",
> > >                                         "TurbineStandalone.properties");
> > >
> > > That will help me figure out what I am doing wrong.  I appreciate it if
> >you
> > > take the time and send me a working configuration.   Thanks.
> > >
> > > Here why I need the help.
> > > I had to create a /tdk/webapps/hra/WEB-INF/conf/logs/velocity.log to
> > > initialize without a fatal error.
> > > But still in my turbine log i get an error that says the velocity template
> > > could not be started.
> > > Thanks
> > > Here is a link to my TurbineStandalone.properties file:
> > > http://test.rhoderunner.com/logs/TurbineStandalone.properties
> > >
> > >
> > > Here is the stack trace:
> > > [Wed Aug 21 22:06:24 EDT 2002] -- ERROR --
> > > Exception:  org.apache.turbine.services.InitializationException: Failed to
> > > initialize TurbineVelocityService
> > > Stack Trace follows:
> > > java.lang.NullPointerException
> > > at java.util.Hashtable.put(Hashtable.java:380)
> > > at
> > >
> >org.apache.commons.collections.ExtendedProperties.addPropertyDirect(Extended
> >Properties.java:683)
> > > at
> > >
> >org.apache.commons.collections.ExtendedProperties.addProperty(ExtendedProper
> >ties.java:657)
> > > at
> > >
> >org.apache.velocity.runtime.configuration.Configuration.addProperty(Configur
> >ation.java)
> > > at
> > >
> >org.apache.turbine.services.velocity.TurbineVelocityService.initVelocity(Tur
> >bineVelocityService.java:453)
> > > at
> > >
> >org.apache.turbine.services.velocity.TurbineVelocityService.init(TurbineVelo
> >cityService.java:138)
> > > rethrown as org.apache.turbine.services.InitializationException: Failed to
> > > initialize TurbineVelocityService
> > > at
> > >
> >org.apache.turbine.services.velocity.TurbineVelocityService.init(TurbineVelo
> >cityService.java:173)
> > > at
> > >
> >org.apache.turbine.services.TurbineBaseService.init(TurbineBaseService.java:
> >108)
> > > at
> > >
> >org.apache.turbine.services.BaseInitableBroker.initClass(BaseInitableBroker.
> >java:150)
> > > at
> > >
> >org.apache.turbine.services.BaseServiceBroker.doInitService(BaseServiceBroke
> >r.java:226)
> > > at
> > >
> >org.apache.turbine.services.BaseServiceBroker.initServices(BaseServiceBroker
> >.java:195)
> > > at org.apache.turbine.Turbine.init(Turbine.java:185)
> > > at org.apache.turbine.util.TurbineConfig.init(TurbineConfig.java:163)
> > > at com.rhoderunner.hra.main.GuideGenerator.main(GuideGenerator.java:50)
> > >
> > > [Wed Aug 21 22:06:24 EDT 2002] -- INFO -- Finished initializing all
> >services!
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> ><ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> ><ma...@jakarta.apache.org>
> > >
> >
> >
> >--
> >To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> >For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: need working TurbineStandalone.properties example

Posted by Phillip Rhodes <rh...@telerama.com>.
Hugh,
Thanks, but did not work.

Can you confirm the full path to your TurbineResources.properties is:
f:/gti/gti-jetspeed/WEB-INF/conf/TurbineResources.properties

Phillip





At 03:25 AM 8/22/2002 -0500, you wrote:

>I think the problem you are having is the way you are passing the variables
>into TurbineConfig.  Your properties file should be okay out of the box.
>
>     boolean isTurbineStarted  = false;
>
>     public  String  webAppDir = "f:/gti/gti-jetspeed";
>     public  String  configFile =
>"WEB-INF\\conf\\TurbineResources.properties";
>     if (!isTurbineStarted)
>         {
>             if (config == null)
>             {
>                 config = new TurbineConfig(this.webAppDir, this.configFile);
>                 config.init();
>                 isTurbineStarted = true;
>             }
>         }
>
>        this.runData = new DefaultJetspeedRunData();
>         //Create a ParameterParser and pass it into the RunData Object
>         DefaultParameterParser parser = new DefaultParameterParser();
>         runData.setParameterParser(parser);
>         this.context = TurbineVelocity.getContext(runData);
>         this.setUser(DCIPortalTest.userId);
>
>         //You can then call the Velocity service
>         VelocityService velocityService =
>(VelocityService)TurbineServices.getInstance().getService(VelocityService.SE
>RVICE_NAME);
>         String result = velocityService.handleRequest(context,
>"templateName.vm")
>
>r,
>Hugh
>
>----- Original Message -----
>From: "Phillip Rhodes" <rh...@telerama.com>
>To: <tu...@jakarta.apache.org>
>Sent: Wednesday, August 21, 2002 9:18 PM
>Subject: need working TurbineStandalone.properties example
>
>
> > Does anyone have turbine 2.1 working standalone using the velocity
>template
> > service?  Not just configured without the VelocityService, but using it in
> > your standalone application?
> >
> > Can you send me your turbinestandalone.properties file?
> >
> > Can you send me one the line that you use to initialize the turbine.  Here
> > is what I use:
> >
> >          TurbineConfig config = new TurbineConfig(
> >                                         "/tdk/webapps/hra/WEB-INF/conf",
> >                                         "TurbineStandalone.properties");
> >
> > That will help me figure out what I am doing wrong.  I appreciate it if
>you
> > take the time and send me a working configuration.   Thanks.
> >
> > Here why I need the help.
> > I had to create a /tdk/webapps/hra/WEB-INF/conf/logs/velocity.log to
> > initialize without a fatal error.
> > But still in my turbine log i get an error that says the velocity template
> > could not be started.
> > Thanks
> > Here is a link to my TurbineStandalone.properties file:
> > http://test.rhoderunner.com/logs/TurbineStandalone.properties
> >
> >
> > Here is the stack trace:
> > [Wed Aug 21 22:06:24 EDT 2002] -- ERROR --
> > Exception:  org.apache.turbine.services.InitializationException: Failed to
> > initialize TurbineVelocityService
> > Stack Trace follows:
> > java.lang.NullPointerException
> > at java.util.Hashtable.put(Hashtable.java:380)
> > at
> >
>org.apache.commons.collections.ExtendedProperties.addPropertyDirect(Extended
>Properties.java:683)
> > at
> >
>org.apache.commons.collections.ExtendedProperties.addProperty(ExtendedProper
>ties.java:657)
> > at
> >
>org.apache.velocity.runtime.configuration.Configuration.addProperty(Configur
>ation.java)
> > at
> >
>org.apache.turbine.services.velocity.TurbineVelocityService.initVelocity(Tur
>bineVelocityService.java:453)
> > at
> >
>org.apache.turbine.services.velocity.TurbineVelocityService.init(TurbineVelo
>cityService.java:138)
> > rethrown as org.apache.turbine.services.InitializationException: Failed to
> > initialize TurbineVelocityService
> > at
> >
>org.apache.turbine.services.velocity.TurbineVelocityService.init(TurbineVelo
>cityService.java:173)
> > at
> >
>org.apache.turbine.services.TurbineBaseService.init(TurbineBaseService.java:
>108)
> > at
> >
>org.apache.turbine.services.BaseInitableBroker.initClass(BaseInitableBroker.
>java:150)
> > at
> >
>org.apache.turbine.services.BaseServiceBroker.doInitService(BaseServiceBroke
>r.java:226)
> > at
> >
>org.apache.turbine.services.BaseServiceBroker.initServices(BaseServiceBroker
>.java:195)
> > at org.apache.turbine.Turbine.init(Turbine.java:185)
> > at org.apache.turbine.util.TurbineConfig.init(TurbineConfig.java:163)
> > at com.rhoderunner.hra.main.GuideGenerator.main(GuideGenerator.java:50)
> >
> > [Wed Aug 21 22:06:24 EDT 2002] -- INFO -- Finished initializing all
>services!
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
> > For additional commands, e-mail:
><ma...@jakarta.apache.org>
> >
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: need working TurbineStandalone.properties example

Posted by Hugh Brien <hp...@comcast.net>.
I think the problem you are having is the way you are passing the variables
into TurbineConfig.  Your properties file should be okay out of the box.

    boolean isTurbineStarted  = false;

    public  String  webAppDir = "f:/gti/gti-jetspeed";
    public  String  configFile =
"WEB-INF\\conf\\TurbineResources.properties";
    if (!isTurbineStarted)
        {
            if (config == null)
            {
                config = new TurbineConfig(this.webAppDir, this.configFile);
                config.init();
                isTurbineStarted = true;
            }
        }

       this.runData = new DefaultJetspeedRunData();
        //Create a ParameterParser and pass it into the RunData Object
        DefaultParameterParser parser = new DefaultParameterParser();
        runData.setParameterParser(parser);
        this.context = TurbineVelocity.getContext(runData);
        this.setUser(DCIPortalTest.userId);

        //You can then call the Velocity service
        VelocityService velocityService =
(VelocityService)TurbineServices.getInstance().getService(VelocityService.SE
RVICE_NAME);
        String result = velocityService.handleRequest(context,
"templateName.vm")

r,
Hugh

----- Original Message -----
From: "Phillip Rhodes" <rh...@telerama.com>
To: <tu...@jakarta.apache.org>
Sent: Wednesday, August 21, 2002 9:18 PM
Subject: need working TurbineStandalone.properties example


> Does anyone have turbine 2.1 working standalone using the velocity
template
> service?  Not just configured without the VelocityService, but using it in
> your standalone application?
>
> Can you send me your turbinestandalone.properties file?
>
> Can you send me one the line that you use to initialize the turbine.  Here
> is what I use:
>
>          TurbineConfig config = new TurbineConfig(
>                                         "/tdk/webapps/hra/WEB-INF/conf",
>                                         "TurbineStandalone.properties");
>
> That will help me figure out what I am doing wrong.  I appreciate it if
you
> take the time and send me a working configuration.   Thanks.
>
> Here why I need the help.
> I had to create a /tdk/webapps/hra/WEB-INF/conf/logs/velocity.log to
> initialize without a fatal error.
> But still in my turbine log i get an error that says the velocity template
> could not be started.
> Thanks
> Here is a link to my TurbineStandalone.properties file:
> http://test.rhoderunner.com/logs/TurbineStandalone.properties
>
>
> Here is the stack trace:
> [Wed Aug 21 22:06:24 EDT 2002] -- ERROR --
> Exception:  org.apache.turbine.services.InitializationException: Failed to
> initialize TurbineVelocityService
> Stack Trace follows:
> java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:380)
> at
>
org.apache.commons.collections.ExtendedProperties.addPropertyDirect(Extended
Properties.java:683)
> at
>
org.apache.commons.collections.ExtendedProperties.addProperty(ExtendedProper
ties.java:657)
> at
>
org.apache.velocity.runtime.configuration.Configuration.addProperty(Configur
ation.java)
> at
>
org.apache.turbine.services.velocity.TurbineVelocityService.initVelocity(Tur
bineVelocityService.java:453)
> at
>
org.apache.turbine.services.velocity.TurbineVelocityService.init(TurbineVelo
cityService.java:138)
> rethrown as org.apache.turbine.services.InitializationException: Failed to
> initialize TurbineVelocityService
> at
>
org.apache.turbine.services.velocity.TurbineVelocityService.init(TurbineVelo
cityService.java:173)
> at
>
org.apache.turbine.services.TurbineBaseService.init(TurbineBaseService.java:
108)
> at
>
org.apache.turbine.services.BaseInitableBroker.initClass(BaseInitableBroker.
java:150)
> at
>
org.apache.turbine.services.BaseServiceBroker.doInitService(BaseServiceBroke
r.java:226)
> at
>
org.apache.turbine.services.BaseServiceBroker.initServices(BaseServiceBroker
.java:195)
> at org.apache.turbine.Turbine.init(Turbine.java:185)
> at org.apache.turbine.util.TurbineConfig.init(TurbineConfig.java:163)
> at com.rhoderunner.hra.main.GuideGenerator.main(GuideGenerator.java:50)
>
> [Wed Aug 21 22:06:24 EDT 2002] -- INFO -- Finished initializing all
services!
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>