So far I've been unable to reproduce the issue after adding this:

        connection.getInputStream().close();

I'm curious though if there's still an off chance of conflict if Eclipse
happens to check during the short period of time that the URLConnection
is open. It might be safer to check the timestamp through a File when
possible? This hack at the top of readTimestamp() seems to work fine as
well:

        if (url.getProtocol().equals("file"))
        {
                File file = new File(url.getPath());
                if (file.exists())
                        return file.lastModified();
        }


-----Original Message-----
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 20, 2007 4:31 PM
To: Tapestry users; [EMAIL PROTECTED]
Subject: Re: Tapestry 5 issue with Eclipse

Unfortunately, that's why I didn't notice, I do all my dev on Mac OS X
now.

The code is very careful to close any files it opens.

I wouldn't be surprised if it was a problem inside URLChangeTracker,
which opens a connection to each file URL periodically to see if its
changed. I left a note behind saying "yes, but how do you close the
connection"?  Still don't know.

On 2/20/07, Aslak Gronflaten <[EMAIL PROTECTED]> wrote:
> I'm getting the same (annoying) behaviour on windows as well. Works on
> osx and linux though.
>
> Aslak
>
> On 2/21/07, Matt Ayres <[EMAIL PROTECTED]> wrote:
> > I'm encountering an issue with the automatic component reloading in
T5
> > when used with Eclipse. It's really making it difficult to fully
take
> > advantage of this great feature. It seems to occur consistently when
> > editing any non-Java file that's on the build path. Sometimes it
takes
> > saving the file a few times, yet it almost always happens after
enough
> > tries (5 or 10 at most). I get this error:
> >
> >
> >
> > The project was not built due to "Could not delete:
> >
C:\tapestry\workspace\myapp\bin\org\example\myapp\components\Border.html
> > .". Fix the problem, then try refreshing this project and building
it
> > since it may be inconsistent
> >
> >
> >
> > I've tried a few different workstations and in this case a clean
> > environment using the tapestry-simple as a starting point. I'm using
> > Windows XP, Java 1.5.0_11, Jetty 5.1.12, and Eclipse 3.2.2 with
> > JettyLauncher 1.4.1. I of course have "Build Automatically" enabled
so I
> > can see changes after I save.
> >
> >
> >
> > It appears that T5 is holding a lock on a file that Eclipse wants to
> > overwrite (as it should be for T5 to see the change). Once this
happens,
> > I have to stop Jetty and clean the project to be able to continue
> > development. The only workaround at the moment seems to be to store
> > non-Java files in the WEB-INF directory.
> >
> >
> >
> > Is this a known issue? If so, is there a planned fix or alternate
> > workaround? If not, I can enter a Jira issue.
> >
> >
> >
> > -Matt
> >
> >
> >
> >
>
>
> --
> Mvh Aslak
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to