You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Lukasz Lenart <lu...@apache.org> on 2018/10/19 07:52:54 UTC
Regression in Struts 2.5.18
Hello,
I have notice a regression bug in Struts 2.5.18, looks like defining
your own ConfigurationProvider wich will change some internal states
cause infinitive reload loop.
See this:
[INFO] GCLOUD: 2018-10-19 07:46:57,567 INFO [qtp403716510-30]
config.ConfigurationManager (ConfigurationManager.java:212) - Detected
container provider [Struts XML configuration provider
(struts-default.xml)] needs to be reloaded. Reloading all providers.
[INFO] GCLOUD: 2018-10-19 07:46:57,603 DEBUG [qtp403716510-30]
web.GruufConfigurationProvider (GruufConfigurationProvider.java:66) -
Setting struts.devMode to value true
[INFO] GCLOUD: 2018-10-19 07:46:57,680 INFO [qtp403716510-16]
config.ConfigurationManager (ConfigurationManager.java:212) - Detected
container provider [Struts XML configuration provider
(struts-default.xml)] needs to be reloaded. Reloading all providers.
The GruufConfigurationProvider class is my custom provider which sets
devMode based on Google AppEngine envs, but now this causes reloading
of all providers again, which will request reloading my
GruufConfigurationProvider again, and again,....
[INFO] GCLOUD: 2018-10-19 07:46:57,717 DEBUG [qtp403716510-16]
web.GruufConfigurationProvider (GruufConfigurationProvider.java:66) -
Setting struts.devMode to value true
[INFO] GCLOUD: 2018-10-19 07:46:57,803 INFO [qtp403716510-23]
config.ConfigurationManager (ConfigurationManager.java:212) - Detected
container provider [Struts XML configuration provider
(struts-default.xml)] needs to be reloaded. Reloading all providers.
Any idea what's wrong?
The easiest workaround is to set "struts.configuration.xml.reload" to false.
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Regression in Struts 2.5.18
Posted by Lukasz Lenart <lu...@apache.org>.
It only happened locally but now it works, maybe it was some mismatch
of JARs. Anyway the issue is gone now :)
wt., 23 paź 2018 o 09:52 Yasser Zamani <ya...@apache.org> napisał(a):
>
> We just have fixed file monitoring and reloading in recent versions including 2.5.18. I think the last modified date of one or more of XmlConfigurationProvider.loadedFileUrls has changed maybe by google cloud or something else?
>
> Regards.
>
> >-----Original Message-----
> >From: Lukasz Lenart <lu...@apache.org>
> >Sent: Friday, October 19, 2018 11:23 AM
> >To: Struts Developers List <de...@struts.apache.org>
> >Subject: Regression in Struts 2.5.18
> >
> >Hello,
> >
> >I have notice a regression bug in Struts 2.5.18, looks like defining your own
> >ConfigurationProvider wich will change some internal states cause infinitive
> >reload loop.
> >
> >See this:
> >
> >[INFO] GCLOUD: 2018-10-19 07:46:57,567 INFO [qtp403716510-30]
> >config.ConfigurationManager (ConfigurationManager.java:212) - Detected
> >container provider [Struts XML configuration provider (struts-default.xml)] needs
> >to be reloaded. Reloading all providers.
> >[INFO] GCLOUD: 2018-10-19 07:46:57,603 DEBUG [qtp403716510-30]
> >web.GruufConfigurationProvider (GruufConfigurationProvider.java:66) - Setting
> >struts.devMode to value true [INFO] GCLOUD: 2018-10-19 07:46:57,680 INFO
> >[qtp403716510-16] config.ConfigurationManager
> >(ConfigurationManager.java:212) - Detected container provider [Struts XML
> >configuration provider (struts-default.xml)] needs to be reloaded. Reloading all
> >providers.
> >
> >The GruufConfigurationProvider class is my custom provider which sets devMode
> >based on Google AppEngine envs, but now this causes reloading of all providers
> >again, which will request reloading my GruufConfigurationProvider again, and
> >again,....
> >
> >[INFO] GCLOUD: 2018-10-19 07:46:57,717 DEBUG [qtp403716510-16]
> >web.GruufConfigurationProvider (GruufConfigurationProvider.java:66) - Setting
> >struts.devMode to value true [INFO] GCLOUD: 2018-10-19 07:46:57,803 INFO
> >[qtp403716510-23] config.ConfigurationManager
> >(ConfigurationManager.java:212) - Detected container provider [Struts XML
> >configuration provider (struts-default.xml)] needs to be reloaded. Reloading all
> >providers.
> >
> >Any idea what's wrong?
> >
> >The easiest workaround is to set "struts.configuration.xml.reload" to false.
> >
> >
> >Regards
> >--
> >Łukasz
> >+ 48 606 323 122 http://www.lenart.org.pl/
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >For additional commands, e-mail: dev-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
RE: Regression in Struts 2.5.18
Posted by Yasser Zamani <ya...@apache.org>.
We just have fixed file monitoring and reloading in recent versions including 2.5.18. I think the last modified date of one or more of XmlConfigurationProvider.loadedFileUrls has changed maybe by google cloud or something else?
Regards.
>-----Original Message-----
>From: Lukasz Lenart <lu...@apache.org>
>Sent: Friday, October 19, 2018 11:23 AM
>To: Struts Developers List <de...@struts.apache.org>
>Subject: Regression in Struts 2.5.18
>
>Hello,
>
>I have notice a regression bug in Struts 2.5.18, looks like defining your own
>ConfigurationProvider wich will change some internal states cause infinitive
>reload loop.
>
>See this:
>
>[INFO] GCLOUD: 2018-10-19 07:46:57,567 INFO [qtp403716510-30]
>config.ConfigurationManager (ConfigurationManager.java:212) - Detected
>container provider [Struts XML configuration provider (struts-default.xml)] needs
>to be reloaded. Reloading all providers.
>[INFO] GCLOUD: 2018-10-19 07:46:57,603 DEBUG [qtp403716510-30]
>web.GruufConfigurationProvider (GruufConfigurationProvider.java:66) - Setting
>struts.devMode to value true [INFO] GCLOUD: 2018-10-19 07:46:57,680 INFO
>[qtp403716510-16] config.ConfigurationManager
>(ConfigurationManager.java:212) - Detected container provider [Struts XML
>configuration provider (struts-default.xml)] needs to be reloaded. Reloading all
>providers.
>
>The GruufConfigurationProvider class is my custom provider which sets devMode
>based on Google AppEngine envs, but now this causes reloading of all providers
>again, which will request reloading my GruufConfigurationProvider again, and
>again,....
>
>[INFO] GCLOUD: 2018-10-19 07:46:57,717 DEBUG [qtp403716510-16]
>web.GruufConfigurationProvider (GruufConfigurationProvider.java:66) - Setting
>struts.devMode to value true [INFO] GCLOUD: 2018-10-19 07:46:57,803 INFO
>[qtp403716510-23] config.ConfigurationManager
>(ConfigurationManager.java:212) - Detected container provider [Struts XML
>configuration provider (struts-default.xml)] needs to be reloaded. Reloading all
>providers.
>
>Any idea what's wrong?
>
>The easiest workaround is to set "struts.configuration.xml.reload" to false.
>
>
>Regards
>--
>Łukasz
>+ 48 606 323 122 http://www.lenart.org.pl/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>For additional commands, e-mail: dev-help@struts.apache.org
Re: Regression in Struts 2.5.18
Posted by Lukasz Lenart <lu...@apache.org>.
False alarm, now it works and I'm confused :\
niedz., 21 paź 2018 o 13:17 Greg Huber <gr...@gmail.com> napisał(a):
>
> Maybe its somewhere in locatableProperties?
>
> I change the dev to false in the war build, so I know its always off.
>
> <execution>
> <id>update-struts</id>
> <phase>process-resources</phase>
> <configuration>
> <target name="struts-update">
> <echo level="info">Update
> struts.properties dev runtime to false</echo>
> <replace
> dir="${project.build.directory}/classes">
> <include
> name="struts.properties" />
> <replacefilter
> token="struts.devMode=true" value="struts.devMode=false" />
> <replacefilter
> token="struts.configuration.xml.reload=true"
> value="struts.configuration.xml.reload=false" />
> <replacefilter
> token="struts.i18n.reload=true" value="struts.i18n.reload=false" />
> </replace>
> <property prefix="check"
> file="${project.build.directory}/classes/struts.properties" />
> <echo>
>
> struts.devMode=${check.struts.devMode}
> </echo>
> </target>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
>
> .....the gruff guest login does not work ;-) >> Cannot login!
>
>
>
> On Sat, 20 Oct 2018 at 13:08, Lukasz Lenart <lu...@apache.org> wrote:
>
> > pt., 19 paź 2018 o 10:24 Greg Huber <gr...@gmail.com> napisał(a):
> > >
> > > I remember years ago there was a bug on the reloading and fixed by
> > checking
> > > to reload once per request.
> > > (This is definitely not happening now as I always run dev reloading, it
> > > really slows things down.)
> >
> > You meant that we should reload once per request? Tie this cycle to the
> > request?
> >
> > > Where is GruufConfigurationProvider?
> >
> > I used it inside my prototype app
> >
> > https://github.com/lukaszlenart/gruuf-webapp/blob/master/src/main/java/com/gruuf/web/GruufConfigurationProvider.java
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> > For additional commands, e-mail: dev-help@struts.apache.org
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Regression in Struts 2.5.18
Posted by Greg Huber <gr...@gmail.com>.
Maybe its somewhere in locatableProperties?
I change the dev to false in the war build, so I know its always off.
<execution>
<id>update-struts</id>
<phase>process-resources</phase>
<configuration>
<target name="struts-update">
<echo level="info">Update
struts.properties dev runtime to false</echo>
<replace
dir="${project.build.directory}/classes">
<include
name="struts.properties" />
<replacefilter
token="struts.devMode=true" value="struts.devMode=false" />
<replacefilter
token="struts.configuration.xml.reload=true"
value="struts.configuration.xml.reload=false" />
<replacefilter
token="struts.i18n.reload=true" value="struts.i18n.reload=false" />
</replace>
<property prefix="check"
file="${project.build.directory}/classes/struts.properties" />
<echo>
struts.devMode=${check.struts.devMode}
</echo>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
.....the gruff guest login does not work ;-) >> Cannot login!
On Sat, 20 Oct 2018 at 13:08, Lukasz Lenart <lu...@apache.org> wrote:
> pt., 19 paź 2018 o 10:24 Greg Huber <gr...@gmail.com> napisał(a):
> >
> > I remember years ago there was a bug on the reloading and fixed by
> checking
> > to reload once per request.
> > (This is definitely not happening now as I always run dev reloading, it
> > really slows things down.)
>
> You meant that we should reload once per request? Tie this cycle to the
> request?
>
> > Where is GruufConfigurationProvider?
>
> I used it inside my prototype app
>
> https://github.com/lukaszlenart/gruuf-webapp/blob/master/src/main/java/com/gruuf/web/GruufConfigurationProvider.java
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
Re: Regression in Struts 2.5.18
Posted by Lukasz Lenart <lu...@apache.org>.
pt., 19 paź 2018 o 10:24 Greg Huber <gr...@gmail.com> napisał(a):
>
> I remember years ago there was a bug on the reloading and fixed by checking
> to reload once per request.
> (This is definitely not happening now as I always run dev reloading, it
> really slows things down.)
You meant that we should reload once per request? Tie this cycle to the request?
> Where is GruufConfigurationProvider?
I used it inside my prototype app
https://github.com/lukaszlenart/gruuf-webapp/blob/master/src/main/java/com/gruuf/web/GruufConfigurationProvider.java
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: Regression in Struts 2.5.18
Posted by Greg Huber <gr...@gmail.com>.
I remember years ago there was a bug on the reloading and fixed by checking
to reload once per request.
(This is definitely not happening now as I always run dev reloading, it
really slows things down.)
Where is GruufConfigurationProvider?
On Fri, 19 Oct 2018 at 08:53, Lukasz Lenart <lu...@apache.org> wrote:
> Hello,
>
> I have notice a regression bug in Struts 2.5.18, looks like defining
> your own ConfigurationProvider wich will change some internal states
> cause infinitive reload loop.
>
> See this:
>
> [INFO] GCLOUD: 2018-10-19 07:46:57,567 INFO [qtp403716510-30]
> config.ConfigurationManager (ConfigurationManager.java:212) - Detected
> container provider [Struts XML configuration provider
> (struts-default.xml)] needs to be reloaded. Reloading all providers.
> [INFO] GCLOUD: 2018-10-19 07:46:57,603 DEBUG [qtp403716510-30]
> web.GruufConfigurationProvider (GruufConfigurationProvider.java:66) -
> Setting struts.devMode to value true
> [INFO] GCLOUD: 2018-10-19 07:46:57,680 INFO [qtp403716510-16]
> config.ConfigurationManager (ConfigurationManager.java:212) - Detected
> container provider [Struts XML configuration provider
> (struts-default.xml)] needs to be reloaded. Reloading all providers.
>
> The GruufConfigurationProvider class is my custom provider which sets
> devMode based on Google AppEngine envs, but now this causes reloading
> of all providers again, which will request reloading my
> GruufConfigurationProvider again, and again,....
>
> [INFO] GCLOUD: 2018-10-19 07:46:57,717 DEBUG [qtp403716510-16]
> web.GruufConfigurationProvider (GruufConfigurationProvider.java:66) -
> Setting struts.devMode to value true
> [INFO] GCLOUD: 2018-10-19 07:46:57,803 INFO [qtp403716510-23]
> config.ConfigurationManager (ConfigurationManager.java:212) - Detected
> container provider [Struts XML configuration provider
> (struts-default.xml)] needs to be reloaded. Reloading all providers.
>
> Any idea what's wrong?
>
> The easiest workaround is to set "struts.configuration.xml.reload" to
> false.
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>