You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Will Glass-Husain <wg...@forio.com> on 2002/06/15 00:11:11 UTC

possible bug -- couldn't include file

Hi,

I tried to include a text file in a velocity page and got an error that it
couldn't include the file despite it being in the template path.  I removed
most of the text-- it worked.  I put the text back-- it didn't work.  After
much trial and error, I discovered that the file had been corrupted with a
dozen instances of hex character "A0" instead of a space "20".  Don't know
why.  Removing these characters with a hex editor fixed the problem.

The error message (reproduced below) was pretty unhelpful, so I thought this
might be a bug in Velocity.  (and in fact, incorrect as the file was
present).  Any comments?  Thanks.

Best, WILL


Fri Jun 14 14:55:21 PDT 2002   [info] ResourceManager : found
screens/Support.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Fri Jun 14 14:55:21 PDT 2002  [error] Cannot process content resource :
sun.io.MalformedInputException
Fri Jun 14 14:55:21 PDT 2002  [error] Cannot process content resource :
java.lang.NullPointerException
Fri Jun 14 14:55:21 PDT 2002  [error] ResourceManager : unable to find
resource 'support/mdl_equationref.htm' in any resource loader.
Fri Jun 14 14:55:21 PDT 2002  [error] #include(): cannot find resource
'support/mdl_equationref.htm', called from template screens/Support.vm at
(2, 9)


_______________________________________
Forio Business Simulations
Will Glass-Husain
(415) 440-7500 phone
(415) 235-4293 mobile

wglass@forio.com
www.forio.com



Re: possible bug -- couldn't include file

Posted by Terry Steichen <te...@net-frame.com>.
Geir,

This is very similar (perhaps identical) to the problem I've experienced.  I
did a workaround by changing the input encoding, so the file (which was a
html page created by a 3rd party) finally loaded (also using '#include()',
see my messages last week).  But I had to use a different encoding on the
output, and I still have some characters (notably hex 95, 96 and 97) which
are displayed as '?'.

Regards,

Terry

PS: I believe I attached a copy of the offending file.  Were you able to try
it yourself?


----- Original Message -----
From: "Geir Magnusson Jr." <ge...@adeptra.com>
To: <ve...@jakarta.apache.org>
Sent: Friday, June 14, 2002 6:38 PM
Subject: Re: possible bug -- couldn't include file


> On 6/14/02 6:11 PM, "Will Glass-Husain" <wg...@forio.com> wrote:
>
> > Hi,
> >
> > I tried to include a text file in a velocity page and got an error that
it
> > couldn't include the file despite it being in the template path.  I
removed
> > most of the text-- it worked.  I put the text back-- it didn't work.
After
> > much trial and error, I discovered that the file had been corrupted with
a
> > dozen instances of hex character "A0" instead of a space "20".  Don't
know
> > why.  Removing these characters with a hex editor fixed the problem.
> >
> > The error message (reproduced below) was pretty unhelpful, so I thought
this
> > might be a bug in Velocity.  (and in fact, incorrect as the file was
> > present).  Any comments?  Thanks.
>
> That's *bizarre*.
>
> Can you send the file?
>
> --
> 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: possible bug -- couldn't include file

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 6/14/02 6:11 PM, "Will Glass-Husain" <wg...@forio.com> wrote:

> Hi,
> 
> I tried to include a text file in a velocity page and got an error that it
> couldn't include the file despite it being in the template path.  I removed
> most of the text-- it worked.  I put the text back-- it didn't work.  After
> much trial and error, I discovered that the file had been corrupted with a
> dozen instances of hex character "A0" instead of a space "20".  Don't know
> why.  Removing these characters with a hex editor fixed the problem.
> 
> The error message (reproduced below) was pretty unhelpful, so I thought this
> might be a bug in Velocity.  (and in fact, incorrect as the file was
> present).  Any comments?  Thanks.

That's *bizarre*.

Can you send the file?

-- 
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>