You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jakob Keres <ja...@gmx.net> on 2008/04/12 13:46:11 UTC

Component reloading is not working

Hi.

I'm quite new to tapestry so it's maybe only a stupid newbie issue.

I created a new project with (copied from website):

mvn archetype:create \
  -DarchetypeGroupId=org.apache.tapestry \
  -DarchetypeArtifactId=quickstart \
  -DgroupId=org.apache.tapestry \
  -DartifactId=tutorial1 \
  -DpackageName=org.apache.tapestry.tutorial

So far everything is working as expected, when I edit Start.tml the
browser output is affected immediately.

Next I changed Start.tml to
------Start.tml------
<t:Layout
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
  My Page Specific Content
</t:Layout>
---------------------

created the path 
src/main/resources/org/apache/tapestry/tutorial/components

and added Layout.tml
------Layout.tml------
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
    <head>
        <title>tutorial1 Start Page</title>
    </head>
    <body>
        <t:body/>
    </body>
</html>
----------------------

and Layout.java in 
src/main/java/org/apache/tapestry/tutorial/components

------Layout.java------
package org.apache.tapestry.tutorial.components;

public class Layout
{
}
-----------------------

If I now press reload in the browser I get the exception:
  Unable to resolve 'Layout' to a component class name...

I noticed
target/classes/org/apache/tapestry/tutorial/components
does not exist.


When I restart Jetty it compiles the new file and the site is working
again, but changes to Layout.* are still not reflected at runtime.

So, what do I do wrong?

Thanks and regards
Jakob


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Component reloading is not working

Posted by Jakob Keres <ja...@gmx.net>.
Am Samstag, den 12.04.2008, 13:54 +0200 schrieb Filip S. Adamsen:
> Hi Jakob,
> 
> You need to compile after making changes, even if the changes you made 
> does not involve any classes. 

OK.

> Which IDE are you using?

Eclipse - of course :)

Thx, 
Jakob


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Component reloading is not working

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi Jakob,

You need to compile after making changes, even if the changes you made 
does not involve any classes. This is so that the templates etc. can be 
pushed to target/classes where Jetty looks for them.

Which IDE are you using?

-Filip

On 2008-04-12 13:46, Jakob Keres wrote:
> Hi.
> 
> I'm quite new to tapestry so it's maybe only a stupid newbie issue.
> 
> I created a new project with (copied from website):
> 
> mvn archetype:create \
>   -DarchetypeGroupId=org.apache.tapestry \
>   -DarchetypeArtifactId=quickstart \
>   -DgroupId=org.apache.tapestry \
>   -DartifactId=tutorial1 \
>   -DpackageName=org.apache.tapestry.tutorial
> 
> So far everything is working as expected, when I edit Start.tml the
> browser output is affected immediately.
> 
> Next I changed Start.tml to
> ------Start.tml------
> <t:Layout
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>   My Page Specific Content
> </t:Layout>
> ---------------------
> 
> created the path 
> src/main/resources/org/apache/tapestry/tutorial/components
> 
> and added Layout.tml
> ------Layout.tml------
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head>
>         <title>tutorial1 Start Page</title>
>     </head>
>     <body>
>         <t:body/>
>     </body>
> </html>
> ----------------------
> 
> and Layout.java in 
> src/main/java/org/apache/tapestry/tutorial/components
> 
> ------Layout.java------
> package org.apache.tapestry.tutorial.components;
> 
> public class Layout
> {
> }
> -----------------------
> 
> If I now press reload in the browser I get the exception:
>   Unable to resolve 'Layout' to a component class name...
> 
> I noticed
> target/classes/org/apache/tapestry/tutorial/components
> does not exist.
> 
> 
> When I restart Jetty it compiles the new file and the site is working
> again, but changes to Layout.* are still not reflected at runtime.
> 
> So, what do I do wrong?
> 
> Thanks and regards
> Jakob
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Component reloading is not working

Posted by Jakob Keres <ja...@gmx.net>.
Am Sonntag, den 13.04.2008, 02:28 -0400 schrieb Andy Huhn:
> Hi Jakob,
> 
> Well, I tried what you mentioned, and it now picks up changes to my .tml
> right away--definitely an improvement over before.  I think I am seeing
> the same problem you are seeing, though, because it is not picking up
> changes to my page classes.

Hmm...I don't have a problem with this, I mean the new compiled classes
are copied to the target directory as expected.


> If I modify a page class and save in Eclipse (3.2.2), I get this error:
> "Java HotSpot(TM) 64-Bit Server VM[localhost:8080] (may be out of synch)
> was unable to replace the running code with the code in the workspace.

I had this problem too the first time, this was due to the reason that
the target directory had old files from jetty and eclipse didn't want or
could delete them and refused to create new files and folders. After a
manual cleanup this behavior disappeared.
But I have doubt that this is the same problem you're faced with.

Jakob


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Component reloading is not working

Posted by Andy Huhn <am...@hslt-online.com>.
Hi Jakob,

Well, I tried what you mentioned, and it now picks up changes to my .tml
right away--definitely an improvement over before.  I think I am seeing
the same problem you are seeing, though, because it is not picking up
changes to my page classes.

If I modify a page class and save in Eclipse (3.2.2), I get this error:
"Java HotSpot(TM) 64-Bit Server VM[localhost:8080] (may be out of synch)
was unable to replace the running code with the code in the workspace.

Reason: Hot code replace failed - Scheme change not implemented"

I wish I could help you, but as you can see, I'm dealing with the same
issue you are.  :o)

Perhaps one of the other folks on the list might have some better ideas.

Andy

On Sat, 2008-04-12 at 19:26 +0200, Jakob Keres wrote:
> Am Samstag, den 12.04.2008, 11:28 -0400 schrieb Andy Huhn:
> > Hi Jakob,
> > 
> > Also, which version of Jetty are you using?
> 
> 
> Jetty6 but...
> 
> >   I don't believe there's a
> > way to get component reloading working yet with Eclipse + Jetty6,
> > although there is with Eclipse + Jetty5.
> 
> ...it's working. I just adpated the build path in Eclipse3.3 like this:
> 
> Project Properties -> Java Build Path 
> Tab Source: added folder src/main/resources
> Default output folder for all: projectname/target/classes
> 
> Tab Libraries: removed the class folder with the resources directory
> 
> Not sure, if this is the common way to do, but it works quite fine.
> 
> Greets
> Jakob
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Component reloading is not working

Posted by Jakob Keres <ja...@gmx.net>.
Am Samstag, den 12.04.2008, 11:28 -0400 schrieb Andy Huhn:
> Hi Jakob,
> 
> Also, which version of Jetty are you using?


Jetty6 but...

>   I don't believe there's a
> way to get component reloading working yet with Eclipse + Jetty6,
> although there is with Eclipse + Jetty5.

...it's working. I just adpated the build path in Eclipse3.3 like this:

Project Properties -> Java Build Path 
Tab Source: added folder src/main/resources
Default output folder for all: projectname/target/classes

Tab Libraries: removed the class folder with the resources directory

Not sure, if this is the common way to do, but it works quite fine.

Greets
Jakob


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Component reloading is not working

Posted by Andy Huhn <am...@hslt-online.com>.
Hi Jakob,

Also, which version of Jetty are you using?  I don't believe there's a
way to get component reloading working yet with Eclipse + Jetty6,
although there is with Eclipse + Jetty5.

Andy

On Sat, 2008-04-12 at 13:46 +0200, Jakob Keres wrote:
> Hi.
> 
> I'm quite new to tapestry so it's maybe only a stupid newbie issue.
> 
> I created a new project with (copied from website):
> 
> mvn archetype:create \
>   -DarchetypeGroupId=org.apache.tapestry \
>   -DarchetypeArtifactId=quickstart \
>   -DgroupId=org.apache.tapestry \
>   -DartifactId=tutorial1 \
>   -DpackageName=org.apache.tapestry.tutorial
> 
> So far everything is working as expected, when I edit Start.tml the
> browser output is affected immediately.
> 
> Next I changed Start.tml to
> ------Start.tml------
> <t:Layout
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>   My Page Specific Content
> </t:Layout>
> ---------------------
> 
> created the path 
> src/main/resources/org/apache/tapestry/tutorial/components
> 
> and added Layout.tml
> ------Layout.tml------
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>     <head>
>         <title>tutorial1 Start Page</title>
>     </head>
>     <body>
>         <t:body/>
>     </body>
> </html>
> ----------------------
> 
> and Layout.java in 
> src/main/java/org/apache/tapestry/tutorial/components
> 
> ------Layout.java------
> package org.apache.tapestry.tutorial.components;
> 
> public class Layout
> {
> }
> -----------------------
> 
> If I now press reload in the browser I get the exception:
>   Unable to resolve 'Layout' to a component class name...
> 
> I noticed
> target/classes/org/apache/tapestry/tutorial/components
> does not exist.
> 
> 
> When I restart Jetty it compiles the new file and the site is working
> again, but changes to Layout.* are still not reflected at runtime.
> 
> So, what do I do wrong?
> 
> Thanks and regards
> Jakob
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org