You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christine <my...@christine.nl> on 2015/09/12 20:15:01 UTC

Ajax issue in beta35

I have recently added Ajax to a project, to update a zone periodically 
(following the example in Jumpstart7). I couldn't get it to work in one 
project, but copying the code to another, similar project showed it 
worked. Today I found it stopped working. Took me some time to realize I 
had updated the projects from 5.4 beta26 to beta35. Moving back to 26 
made the call work again.

I can give the code, but it's basically copied and pasted from the 
Periodic Update example in jumpstart7.

dagdag
Christine

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


Re: Ajax issue in beta35

Posted by Geoff Callender <ge...@gmail.com>.
Very strange, because JumpStart7 is running beta 35.

> On 13 Sep 2015, at 4:15 am, Christine <my...@christine.nl> wrote:
> 
> I have recently added Ajax to a project, to update a zone periodically (following the example in Jumpstart7). I couldn't get it to work in one project, but copying the code to another, similar project showed it worked. Today I found it stopped working. Took me some time to realize I had updated the projects from 5.4 beta26 to beta35. Moving back to 26 made the call work again.
> 
> I can give the code, but it's basically copied and pasted from the Periodic Update example in jumpstart7.
> 
> dagdag
> Christine
> 
> ---------------------------------------------------------------------
> 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: Ajax issue in beta35

Posted by Christine <my...@christine.nl>.
On 13-09-15 11:12, françois facon wrote:
> Hi Christine,
>
> Did you try to force the use of jQuery whithout prototype  in your beta35
> version ?

I will try.

After I created a .war file from the app and uploaded it to the server, 
running jetty8, the app worked, but the ajax call doesn't. I think it's 
an issue with where the assets and .js files are put, I'm not sure. When 
I run the same .war file on my desktop computer with jetty8, I get

2015-09-13 17:24:17.619:WARN:oejw.WebAppContext:Failed startup of 
context 
o.e.j.w.WebAppContext{/mgnl,file:/var/cache/jetty8/data/jetty-0.0.0.0-8080-mgnl.war-_mgnl-any-/webapp/},/var/lib/jetty8/webapps/mgnl.war
javax.servlet.UnavailableException: org.apache.tapestry5.TapestryFilter
         at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:114)
         at 
org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:90)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
         at 
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
         at 
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1270)
         at 
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:719)
         at 
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
         at 
org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
         at 
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
         at 
org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
         at 
org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
         at 
org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
         at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
         at 
org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
         at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
         at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
         at 
org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
         at 
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
         at 
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
         at org.eclipse.jetty.server.Server.doStart(Server.java:282)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
         at java.security.AccessController.doPrivileged(Native Method)
         at 
org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:606)
         at org.eclipse.jetty.start.Main.invokeMain(Main.java:473)
         at org.eclipse.jetty.start.Main.start(Main.java:615)
         at org.eclipse.jetty.start.Main.main(Main.java:96)

This is the page:
http://www.christine.nl/mgnl/7


dagdag
Christine




>
> This could be done by adding the following code  configuration.add(
> SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
> in the contributeApplicationDefaults part of your AppModule.
>
>
> Best Regards
> François
>
>
>
> 2015-09-12 20:15 GMT+02:00 Christine <my...@christine.nl>:
>
>> I have recently added Ajax to a project, to update a zone periodically
>> (following the example in Jumpstart7). I couldn't get it to work in one
>> project, but copying the code to another, similar project showed it worked.
>> Today I found it stopped working. Took me some time to realize I had
>> updated the projects from 5.4 beta26 to beta35. Moving back to 26 made the
>> call work again.
>>
>> I can give the code, but it's basically copied and pasted from the
>> Periodic Update example in jumpstart7.
>>
>> dagdag
>> Christine
>>
>> ---------------------------------------------------------------------
>> 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: Ajax issue in beta35

Posted by Christine <my...@christine.nl>.
On 14-09-15 11:41, françois facon wrote:
> I would suggest you to do a project->clean  under eclipse and also to do a
> mvn clean before the build of your war.
> I would also try to clean the remote server.

Thanks François, now it works.

dagdag
Christine


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


Re: Ajax issue in beta35

Posted by françois facon <fr...@gmail.com>.
I would suggest you to do a project->clean  under eclipse and also to do a
mvn clean before the build of your war.
I would also try to clean the remote server.



2015-09-13 19:54 GMT+02:00 Christine <my...@christine.nl>:

> On 13-09-15 19:34, françois facon wrote:
>
>> Good news!
>>
>> I had to face  the same problem with some tapestry5-jquery components
>> Your issue is related to TAP5-2463.
>> This should be fix in next version.
>>
>> Anyway, if you don't have any legacy code that use prototype.js, it is
>> better to only use jQuery.
>>
>
> :-)
> I didn't have javascript, I don't like it. Only thing I do is use a simple
> script to update a zone without having to refresh a page.
>
> But I still have this issue, when I put the application in a war file. It
> used to work before I added the js code. The app works in Eclipse with
> RunJettyRun, but not with Jetty in a .war file.
>
>
> 2015-09-13 17:24:17.619:WARN:oejw.WebAppContext:Failed startup of context
> o.e.j.w.WebAppContext{/mgnl,file:/var/cache/jetty8/data/jetty-0.0.0.0-8080-mgnl.war-_mgnl-any-/webapp/},/var/lib/jetty8/webapps/mgnl.war
>
> javax.servlet.UnavailableException: org.apache.tapestry5.TapestryFilter
>         at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:114)
>         at
> org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:90)
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
>         at
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
>         at
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
>         at
> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1270)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:719)
>         at
> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
>         at
> org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
>         at
> org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
>         at
> org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
>         at
> org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
>         at
> org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
>         at
> org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
>         at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
>         at
> org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
>         at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
>         at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
>         at
> org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
>         at
> org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
>         at
> org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
>         at
> org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
>         at
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
>         at org.eclipse.jetty.server.Server.doStart(Server.java:282)
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
>         at
> org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.eclipse.jetty.start.Main.invokeMain(Main.java:473)
>         at org.eclipse.jetty.start.Main.start(Main.java:615)
>         at org.eclipse.jetty.start.Main.main(Main.java:96)
>
>
>
>
>
>
>> Best regards
>> François
>>
>> 2015-09-13 17:46 GMT+02:00 Christine <my...@christine.nl>:
>>
>> On 13-09-15 11:12, françois facon wrote:
>>>
>>> Hi Christine,
>>>>
>>>> Did you try to force the use of jQuery whithout prototype  in your
>>>> beta35
>>>> version ?
>>>>
>>>> This could be done by adding the following code  configuration.add(
>>>> SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
>>>> in the contributeApplicationDefaults part of your AppModule.
>>>>
>>>> that worked, thank you.
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>

Re: Ajax issue in beta35

Posted by Christine <my...@christine.nl>.
On 13-09-15 19:34, françois facon wrote:
> Good news!
>
> I had to face  the same problem with some tapestry5-jquery components
> Your issue is related to TAP5-2463.
> This should be fix in next version.
>
> Anyway, if you don't have any legacy code that use prototype.js, it is
> better to only use jQuery.

:-)
I didn't have javascript, I don't like it. Only thing I do is use a 
simple script to update a zone without having to refresh a page.

But I still have this issue, when I put the application in a war file. 
It used to work before I added the js code. The app works in Eclipse 
with RunJettyRun, but not with Jetty in a .war file.

2015-09-13 17:24:17.619:WARN:oejw.WebAppContext:Failed startup of 
context 
o.e.j.w.WebAppContext{/mgnl,file:/var/cache/jetty8/data/jetty-0.0.0.0-8080-mgnl.war-_mgnl-any-/webapp/},/var/lib/jetty8/webapps/mgnl.war 

javax.servlet.UnavailableException: org.apache.tapestry5.TapestryFilter
         at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:114)
         at 
org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:90)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
         at 
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
         at 
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1270)
         at 
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:719)
         at 
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
         at 
org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
         at 
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
         at 
org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
         at 
org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
         at 
org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
         at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
         at 
org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
         at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
         at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
         at 
org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
         at 
org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
         at 
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
         at org.eclipse.jetty.server.Server.doStart(Server.java:282)
         at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
         at 
org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
         at java.security.AccessController.doPrivileged(Native Method)
         at 
org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:606)
         at org.eclipse.jetty.start.Main.invokeMain(Main.java:473)
         at org.eclipse.jetty.start.Main.start(Main.java:615)
         at org.eclipse.jetty.start.Main.main(Main.java:96)





>
> Best regards
> François
>
> 2015-09-13 17:46 GMT+02:00 Christine <my...@christine.nl>:
>
>> On 13-09-15 11:12, françois facon wrote:
>>
>>> Hi Christine,
>>>
>>> Did you try to force the use of jQuery whithout prototype  in your beta35
>>> version ?
>>>
>>> This could be done by adding the following code  configuration.add(
>>> SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
>>> in the contributeApplicationDefaults part of your AppModule.
>>>
>> that worked, thank you.
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>


Re: Ajax issue in beta35

Posted by françois facon <fr...@gmail.com>.
Good news!

I had to face  the same problem with some tapestry5-jquery components
Your issue is related to TAP5-2463.
This should be fix in next version.

Anyway, if you don't have any legacy code that use prototype.js, it is
better to only use jQuery.

Best regards
François

2015-09-13 17:46 GMT+02:00 Christine <my...@christine.nl>:

> On 13-09-15 11:12, françois facon wrote:
>
>> Hi Christine,
>>
>> Did you try to force the use of jQuery whithout prototype  in your beta35
>> version ?
>>
>> This could be done by adding the following code  configuration.add(
>> SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
>> in the contributeApplicationDefaults part of your AppModule.
>>
>
> that worked, thank you.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Ajax issue in beta35

Posted by Christine <my...@christine.nl>.
On 13-09-15 11:12, françois facon wrote:
> Hi Christine,
>
> Did you try to force the use of jQuery whithout prototype  in your beta35
> version ?
>
> This could be done by adding the following code  configuration.add(
> SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
> in the contributeApplicationDefaults part of your AppModule.

that worked, thank you.



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


Re: Ajax issue in beta35

Posted by françois facon <fr...@gmail.com>.
Hi Christine,

Did you try to force the use of jQuery whithout prototype  in your beta35
version ?

This could be done by adding the following code  configuration.add(
SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery");
in the contributeApplicationDefaults part of your AppModule.


Best Regards
François



2015-09-12 20:15 GMT+02:00 Christine <my...@christine.nl>:

> I have recently added Ajax to a project, to update a zone periodically
> (following the example in Jumpstart7). I couldn't get it to work in one
> project, but copying the code to another, similar project showed it worked.
> Today I found it stopped working. Took me some time to realize I had
> updated the projects from 5.4 beta26 to beta35. Moving back to 26 made the
> call work again.
>
> I can give the code, but it's basically copied and pasted from the
> Periodic Update example in jumpstart7.
>
> dagdag
> Christine
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>