You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Anuradha Weeraman <aw...@gmail.com> on 2006/06/23 17:10:07 UTC

Velocity on z/OS - velocity.properties not getting picked up

Hi,

I've been using Velocity in J2EE web application on z/OS and have been
running into a few problems. I'm using maven to build the application
which has set dependencies on velocity 1.4. the repository/jars folder
contains both velocity-1.4.jar and velocity-1.4-dev.jar.

For some reason, when velocity is initialized, the velocity.properties
file doesn't get picked up and as a result throws a
NullPointerException. When a Property object is manually populated
with the needed fields or if the property file is manually loaded and
passed into the init method, it seems to work.

Does anybody any idea why the velocity.properties in
velocity-1.4.jar\org\apache\velocity\runtime\defaults doesn't get
picked up automatically?

Could it be because the property file appears in both maven-1.4.jar
and maven-1.4-dev.jar?

Regards,
Anuradha

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Velocity on z/OS - velocity.properties not getting picked up

Posted by Anuradha Weeraman <aw...@gmail.com>.
> Could it be because the property file appears in both maven-1.4.jar
> and maven-1.4-dev.jar?

Correction:

Could it be because the property file appears in both velocity-1.4.jar
and velocity-1.4-dev.jar?

Regards,
Anuradha

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Velocity on z/OS - velocity.properties not getting picked up

Posted by Anuradha Weeraman <aw...@gmail.com>.
> Can you get rid of one and see what happens?

Tried doing that, but maven complained. The two jars look pretty much
same, I'm guessing that dependance on both might be redundant.

Tried removing the velocity.properties from one jar but that didn't
fix the problem either.

Regards,
Anuradha

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Velocity on z/OS - velocity.properties not getting picked up

Posted by Will Glass-Husain <wg...@forio.com>.
Having the multiple jars with Velocity has been known to cause problems 
in the past, particularly if they are loaded by different classloaders 
(e.g. one in a container classpath and one in the app).

Can you get rid of one and see what happens?

WILL

Anuradha Weeraman wrote:
> Hi,
>
> I've been using Velocity in J2EE web application on z/OS and have been
> running into a few problems. I'm using maven to build the application
> which has set dependencies on velocity 1.4. the repository/jars folder
> contains both velocity-1.4.jar and velocity-1.4-dev.jar.
>
> For some reason, when velocity is initialized, the velocity.properties
> file doesn't get picked up and as a result throws a
> NullPointerException. When a Property object is manually populated
> with the needed fields or if the property file is manually loaded and
> passed into the init method, it seems to work.
>
> Does anybody any idea why the velocity.properties in
> velocity-1.4.jar\org\apache\velocity\runtime\defaults doesn't get
> picked up automatically?
>
> Could it be because the property file appears in both maven-1.4.jar
> and maven-1.4-dev.jar?
>
> Regards,
> Anuradha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

-- 
Forio Business Simulations

Will Glass-Husain
phone (415) 440-7500 x89
mobile (415) 235-4293
wglass@forio.com
www.forio.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org