You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Rodrigo Reyes <ro...@instaservi.com> on 2002/08/05 19:32:12 UTC

Velocity init() problem...

Hi
    Sorry if this seems trivial for some of you, but I am stuck here and I
couldn't find any solution in the mail archive. I was trying to create a
HelloWorld using Velocity but couldn't. I always get this messages from the
stack...

java.lang.NullPointerException
        at
org.apache.velocity.runtime.RuntimeInstance.setDefaultProperties(RuntimeInst
ance.java:295)
        at
org.apache.velocity.runtime.RuntimeInstance.initializeProperties(RuntimeInst
ance.java:423)
        at
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:266)
        at
org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:122)
        at tp2txt.HelloWorld.main(HelloWorld.java:24)
Exception in thread "main"

    This happens when I try to init() a new instance of VelocityEngine. I am
using velocity-dep-1.3.1-rc2.jar and jdk1.4.0. I am copying the velocity jar
into JAVA_HOME/jre/lib/ext. Am I missing something? Maybe some configuration
file? I don't think the JRE has anything to do with the problem since I have
JPublish installed in the same machine and Velocity seems to be working fine
there. Thanx

Rodrigo



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


Re: Velocity init() problem...

Posted by Rodrigo Reyes <ro...@instaservi.com>.
I solved my problem...
I was using Forte for JAVA as my IDE and I still can't run the program from
inside Forte. But it had no problem running when I tried it from the command
line. Anyone using Velocity from inside Forte? I haven't figured out how to
do it. Still, thanx for all your advises...

Rodrigo

----- Original Message -----
From: "Geir Magnusson Jr." <ge...@adeptra.com>
To: <ve...@jakarta.apache.org>
Sent: Tuesday, August 06, 2002 4:43 AM
Subject: Re: Velocity init() problem...


> On 8/5/02 1:32 PM, "Rodrigo Reyes" <ro...@instaservi.com> wrote:
>
> > Hi
> >   Sorry if this seems trivial for some of you, but I am stuck here and I
> > couldn't find any solution in the mail archive. I was trying to create a
> > HelloWorld using Velocity but couldn't. I always get this messages from
the
> > stack...
> >
> > java.lang.NullPointerException
> >       at
> >
org.apache.velocity.runtime.RuntimeInstance.setDefaultProperties(RuntimeInst
> > ance.java:295)
> >       at
> >
org.apache.velocity.runtime.RuntimeInstance.initializeProperties(RuntimeInst
> > ance.java:423)
> >       at
> >
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:266)
> >       at
> > org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:122)
> >       at tp2txt.HelloWorld.main(HelloWorld.java:24)
> > Exception in thread "main"
> >
> >   This happens when I try to init() a new instance of VelocityEngine. I
am
> > using velocity-dep-1.3.1-rc2.jar and jdk1.4.0. I am copying the velocity
jar
> > into JAVA_HOME/jre/lib/ext. Am I missing something? Maybe some
configuration
> > file? I don't think the JRE has anything to do with the problem since I
have
> > JPublish installed in the same machine and Velocity seems to be working
fine
> > there. Thanx
>
> This is weird. I assume there is one version of Velocity on your system
(in
> ...jre/lib/ext), or does Jpublish have a copy of it's own?
>
> What happens if you take it out of the ext directory, and just put in your
> classpath?
>
> --
> Geir Magnusson Jr.
> Research & Development, Adeptra Inc.
> geirm@adeptra.com
> +1-203-247-1713
>
>
>
> --
> 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: Velocity init() problem...

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 8/5/02 1:32 PM, "Rodrigo Reyes" <ro...@instaservi.com> wrote:

> Hi
>   Sorry if this seems trivial for some of you, but I am stuck here and I
> couldn't find any solution in the mail archive. I was trying to create a
> HelloWorld using Velocity but couldn't. I always get this messages from the
> stack...
> 
> java.lang.NullPointerException
>       at
> org.apache.velocity.runtime.RuntimeInstance.setDefaultProperties(RuntimeInst
> ance.java:295)
>       at
> org.apache.velocity.runtime.RuntimeInstance.initializeProperties(RuntimeInst
> ance.java:423)
>       at
> org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:266)
>       at
> org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:122)
>       at tp2txt.HelloWorld.main(HelloWorld.java:24)
> Exception in thread "main"
> 
>   This happens when I try to init() a new instance of VelocityEngine. I am
> using velocity-dep-1.3.1-rc2.jar and jdk1.4.0. I am copying the velocity jar
> into JAVA_HOME/jre/lib/ext. Am I missing something? Maybe some configuration
> file? I don't think the JRE has anything to do with the problem since I have
> JPublish installed in the same machine and Velocity seems to be working fine
> there. Thanx

This is weird. I assume there is one version of Velocity on your system (in
...jre/lib/ext), or does Jpublish have a copy of it's own?

What happens if you take it out of the ext directory, and just put in your
classpath? 
 
-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



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