velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yoshia Makino <mak...@valuecommerce.ne.jp>
Subject RE: Velocity initialize failure in resin
Date Thu, 12 Dec 2002 04:01:33 GMT
I found the problem.

This was happening because org.apache.commons.collections.ExtendedProperties
is not very nice.

It was using a while(true) loop and using NullPointerExceptions to figure
out the EOF of the velocity.properties file.  So when the
BufferedReader.readLine() was called, it seg faulted when EOF was reached
instead of throwing a NullPointerException.

Althought this must obviously work for most people, it was causing problems
in this case.

Thanks 

-----Original Message-----
From: Yoshia Makino [mailto:makino@valuecommerce.ne.jp] 
Sent: Thursday, December 12, 2002 9:57 AM
To: 'Velocity Users List'
Subject: RE: Velocity initialize failure in resin


Nope.

There is a try catch around the configuration.load() as follows :- 

private  ExtendedProperties configuration = new ExtendedProperties();
org.apache.velocity.runtime.RuntimeInstance.setDefaultProperties(){
	try {
             configuration.load( inputStream );
	} catch ( Exception e ) {
		e.printStackTrace();
	}
	
}

The exception is never reached.  Its crashing inside the ExtendProperties
instance.

What I find confusing is that I am using the default VelocityEngine and am
not doing anything funky.

I suppose the next step is to get the source for ExtendedProperties and
trace through that.  I just thought it may be more of a configuration error
rather than a code problem since this setup has been deployed in other
machines before.

Thanks


-----Original Message-----
From: Geir Magnusson Jr. [mailto:geirm@adeptra.com] 
Sent: Wednesday, December 11, 2002 10:37 PM
To: Velocity Users List
Subject: Re: Velocity initialize failure in resin


And you have no idea where?

Hm.  Can you put a try around that and catch anything that might get 
thrown?

On Wednesday, December 11, 2002, at 06:13 AM, Yoshia Makino wrote:

> Hi,
> I am using resin 2.1.6 and velocity 1.3.1 rc-2 and I am experiencing
> difficulties in bringing resin up.
>
> When I initialize the VelocityEngine, resin crashes quietly. ie 
> without a stacktrace.
>
> Using the System.out debug method, I found that the crash occurs
> whilst executing
>
> org.apache.velocity.runtime.RuntimeInstance.setDefaultProperties(){
>             configuration.load( inputStream );
> }
>
>
>
> I have installed the same setup in a 3-4 other machines without a 
> problem.
>
> Can anyone help me track this problem down or has anyone experienced 
> the same problem?
>
> Thank you
> Yoshia
>
-- 
Geir Magnusson Jr                                   203-355-2219(w)
Adeptra, Inc.                                       203-247-1713(m)
geirm@adeptra.com


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

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

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


Mime
View raw message