Re: No container in actions after upgrading to 2.5.13

2017-09-19 Thread Yasser Zamani


On 9/19/2017 11:43 AM, LAW Andy wrote:
> 
>> On 14 Sep 2017, at 16:03, Yasser Zamani  wrote:
>>
>> Do last three exceptions occur in same time, in one action call (I think
>> because of first word of their lines 73709, 73712 and 73716 and their
>> same thread name "http-nio-8082-exec-9") ? If so, it means you want to
>> evaluate > > ActionOptionBase and BasemydomainAction. I wonder how do you reach such
>> state or maybe I miss something but it's impossible while only one
>> object can be root of the OGNL.
>>
> 
> This is an old application, first written around 10 years ago and maintained 
> since then. It is possible that we have misinterpreted the intent of some of 
> the Struts support classes over the years, and equally it is possible that 
> the intent of those classes has changed. I know that the application worked 
> up until this latest release.
> 
> The actions are complex and consist of a series of sub-actions which are 
> re-usable. The top level Actions (which I’ll cal Routes) *and* the 
> sub-actions each inherit ultimately from ActionSupport. So, Route 1 might be 
> a chain of sub-action A, sub-action B, sub-action C and Route 2 might be 
> sub-action A followed by sub-action C then sub-action D. The Route object’s 
> execute() function delegates in turn to the sub-actions. The Route level 
> actions are defined in struts.xml whereas the sub-actions are created in the 
> constructors of the Route-level actions. I suspect that this is why things 
> are now breaking, but they did not do so previously.
> 

Yes, that's the cause. Instantiating actions manually is not a good 
practice but if currently it does not make any sense in your case, I 
thought you may like my following solution:

> The application is now largely in maintenance-only mode and we have only been 
> working on it when security concerns arise. I don’t have the resources to 
> commit to re-architecting so finding security updates that break the code as 
> a side-effect is something that causes grief :(
> 
> I’m pretty sure that the context-fallback should get this code working again, 
> so I’d be keen to get an ETA on that point release if it’s likely to happen.
> 

Till release, I thought you may like something as below:

public class RouteLevelAction extends ActionSupport {
 public String getActionTitle() {
 SubAction b = new SubAction();
 this.container.inject(b); /* I added this under your manual 
instantiate which injects Strut's needed staff into it :) */
 return base.getTitle();
 }
}


> Thanks for the work that you guys do. It is very much appreciated (even if we 
> don’t give that impression at times).
> 
> Later,
> 
> Andy
> 
> 

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-19 Thread LAW Andy

> On 14 Sep 2017, at 16:03, Yasser Zamani  wrote:
> 
> Do last three exceptions occur in same time, in one action call (I think 
> because of first word of their lines 73709, 73712 and 73716 and their 
> same thread name "http-nio-8082-exec-9") ? If so, it means you want to 
> evaluate   ActionOptionBase and BasemydomainAction. I wonder how do you reach such 
> state or maybe I miss something but it's impossible while only one 
> object can be root of the OGNL.
> 

This is an old application, first written around 10 years ago and maintained 
since then. It is possible that we have misinterpreted the intent of some of 
the Struts support classes over the years, and equally it is possible that the 
intent of those classes has changed. I know that the application worked up 
until this latest release.

The actions are complex and consist of a series of sub-actions which are 
re-usable. The top level Actions (which I’ll cal Routes) *and* the sub-actions 
each inherit ultimately from ActionSupport. So, Route 1 might be a chain of 
sub-action A, sub-action B, sub-action C and Route 2 might be sub-action A 
followed by sub-action C then sub-action D. The Route object’s execute() 
function delegates in turn to the sub-actions. The Route level actions are 
defined in struts.xml whereas the sub-actions are created in the constructors 
of the Route-level actions. I suspect that this is why things are now breaking, 
but they did not do so previously.

The application is now largely in maintenance-only mode and we have only been 
working on it when security concerns arise. I don’t have the resources to 
commit to re-architecting so finding security updates that break the code as a 
side-effect is something that causes grief :(

I’m pretty sure that the context-fallback should get this code working again, 
so I’d be keen to get an ETA on that point release if it’s likely to happen.

Thanks for the work that you guys do. It is very much appreciated (even if we 
don’t give that impression at times).

Later,

Andy


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-19 Thread Lukasz Lenart
2017-09-14 11:11 GMT+02:00 LAW Andy :
>> On 14 Sep 2017, at 09:48, Lukasz Lenart  wrote:
>>
>> You are not the first person who complains about missing container ...
>> I wonder if we should add a fallback though.
>>
>>if (container == null) {
>>LOG.warn("Container is null, action was created manually?
>> Fallback to ActionContext");
>>container = ActionContext.getContext().getContainer();
>>}
>
> That would get *my* vote.

Done but still this requires re-think from our side
https://issues.apache.org/jira/browse/WW-4861


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-14 Thread Yasser Zamani
Do last three exceptions occur in same time, in one action call (I think 
because of first word of their lines 73709, 73712 and 73716 and their 
same thread name "http-nio-8082-exec-9") ? If so, it means you want to 
evaluate  Using version 2.5.13 on Tomcat 8.0.21.
> 
> I’ve attached it to this message as a text file.
> 
> Later,
> 
> Andy
> 
> 
> 
>> On 12 Sep 2017, at 15:56, Yasser Zamani  wrote:
>> 
>> Each one you're more comfortable or is more important for you.
>> 
>> On 9/12/2017 7:08 PM, LAW Andy wrote:
>>> 
 On 12 Sep 2017, at 14:46, Yasser Zamani  wrote:
 
 Great! they mean devMode works.
 
 Could you post your whole stacktrace of exception (including caused
 bys). If you should not send your internal app related info, delete such
 lines from stacktrace. I need to know the trace of the Struts itself
 only. If I know how and where Struts fails, then it'll be helpful a lot.
 
>>> 
>>> Do you want 2.5.12 or 2.5.13 ?
>>> 
>>> Later,
>>> 
>>> Andy
>>> 
>>> 
>>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>> 
> 
> 
> 
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-14 Thread LAW Andy
> On 14 Sep 2017, at 09:48, Lukasz Lenart  wrote:
> 
> You are not the first person who complains about missing container ...
> I wonder if we should add a fallback though.
> 
>if (container == null) {
>LOG.warn("Container is null, action was created manually?
> Fallback to ActionContext");
>container = ActionContext.getContext().getContainer();
>}

That would get *my* vote.

Later,

Andy




-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-14 Thread Lukasz Lenart
You are not the first person who complains about missing container ...
I wonder if we should add a fallback though.

if (container == null) {
LOG.warn("Container is null, action was created manually?
Fallback to ActionContext");
container = ActionContext.getContext().getContainer();
}

Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

2017-09-13 18:17 GMT+02:00 LAW Andy :
> That looks more relevant. I’ll look into it some more tomorrow morning.
>
> Thanks for your help so far.
>
>
>> On 13 Sep 2017, at 17:04, Yasser Zamani  wrote:
>>
>> Maybe you have a similar issue of [1].
>>
>> Say you have X that extends ActionSupport. Please make sure if every X
>> has been instantiated not manually (e.g. X = new X() inside your java
>> files). They should be instantiated via Strut's object factory ( e.g.
>> >
>> [1]
>> https://issues.apache.org/jira/browse/WW-4813?focusedCommentId=16085291=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16085291
>>
>> On 9/13/2017 7:31 PM, LAW Andy wrote:
>>>
 On 13 Sep 2017, at 14:17, Lukasz Lenart  wrote:

 2017-09-13 11:02 GMT+02:00 LAW Andy :
> Using version 2.5.13 on Tomcat 8.0.21.
>
> I’ve attached it to this message as a text file.

 How do you fetch action in
 "my.domain.controller.ActionOption.getAction(ActionOption.java:138)" ?
 Do you construct those actions manually?

 at 
 my.domain.controller.ActionOptionBase.getTextFromProperties(ActionOptionBase.java:122)
 ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
 at my.domain.controller.ActionOption.getAction(ActionOption.java:138)
 ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]

>>>
>>>
>>>
>>> That function is badly named. It actually should be called getActionName();
>>>
>>> The Action contains one or more ActionOption objects. These are built in 
>>> the constructor.
>>>
>>> Later,
>>>
>>> Andy
>>>
>>>
>>>
>
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-13 Thread LAW Andy
That looks more relevant. I’ll look into it some more tomorrow morning.

Thanks for your help so far.


> On 13 Sep 2017, at 17:04, Yasser Zamani  wrote:
> 
> Maybe you have a similar issue of [1].
> 
> Say you have X that extends ActionSupport. Please make sure if every X 
> has been instantiated not manually (e.g. X = new X() inside your java 
> files). They should be instantiated via Strut's object factory ( e.g. 
>  
> [1] 
> https://issues.apache.org/jira/browse/WW-4813?focusedCommentId=16085291=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16085291
> 
> On 9/13/2017 7:31 PM, LAW Andy wrote:
>> 
>>> On 13 Sep 2017, at 14:17, Lukasz Lenart  wrote:
>>> 
>>> 2017-09-13 11:02 GMT+02:00 LAW Andy :
 Using version 2.5.13 on Tomcat 8.0.21.
 
 I’ve attached it to this message as a text file.
>>> 
>>> How do you fetch action in
>>> "my.domain.controller.ActionOption.getAction(ActionOption.java:138)" ?
>>> Do you construct those actions manually?
>>> 
>>> at 
>>> my.domain.controller.ActionOptionBase.getTextFromProperties(ActionOptionBase.java:122)
>>> ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
>>> at my.domain.controller.ActionOption.getAction(ActionOption.java:138)
>>> ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
>>> 
>> 
>> 
>> 
>> That function is badly named. It actually should be called getActionName();
>> 
>> The Action contains one or more ActionOption objects. These are built in the 
>> constructor.
>> 
>> Later,
>> 
>> Andy
>> 
>> 
>> 


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: No container in actions after upgrading to 2.5.13

2017-09-13 Thread Yasser Zamani
Maybe you have a similar issue of [1].

Say you have X that extends ActionSupport. Please make sure if every X 
has been instantiated not manually (e.g. X = new X() inside your java 
files). They should be instantiated via Strut's object factory ( e.g. 
https://issues.apache.org/jira/browse/WW-4813?focusedCommentId=16085291=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16085291

On 9/13/2017 7:31 PM, LAW Andy wrote:
> 
>> On 13 Sep 2017, at 14:17, Lukasz Lenart  wrote:
>>
>> 2017-09-13 11:02 GMT+02:00 LAW Andy :
>>> Using version 2.5.13 on Tomcat 8.0.21.
>>>
>>> I’ve attached it to this message as a text file.
>>
>> How do you fetch action in
>> "my.domain.controller.ActionOption.getAction(ActionOption.java:138)" ?
>> Do you construct those actions manually?
>>
>> at 
>> my.domain.controller.ActionOptionBase.getTextFromProperties(ActionOptionBase.java:122)
>> ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
>> at my.domain.controller.ActionOption.getAction(ActionOption.java:138)
>> ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
>>
> 
> 
> 
> That function is badly named. It actually should be called getActionName();
> 
> The Action contains one or more ActionOption objects. These are built in the 
> constructor.
> 
> Later,
> 
> Andy
> 
>   
> 


Re: No container in actions after upgrading to 2.5.13

2017-09-13 Thread LAW Andy

> On 13 Sep 2017, at 14:17, Lukasz Lenart  wrote:
> 
> 2017-09-13 11:02 GMT+02:00 LAW Andy :
>> Using version 2.5.13 on Tomcat 8.0.21.
>> 
>> I’ve attached it to this message as a text file.
> 
> How do you fetch action in
> "my.domain.controller.ActionOption.getAction(ActionOption.java:138)" ?
> Do you construct those actions manually?
> 
> at 
> my.domain.controller.ActionOptionBase.getTextFromProperties(ActionOptionBase.java:122)
> ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
> at my.domain.controller.ActionOption.getAction(ActionOption.java:138)
> ~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
> 



That function is badly named. It actually should be called getActionName();

The Action contains one or more ActionOption objects. These are built in the 
constructor.

Later,

Andy

 
-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: No container in actions after upgrading to 2.5.13

2017-09-13 Thread Lukasz Lenart
2017-09-13 11:02 GMT+02:00 LAW Andy :
> Using version 2.5.13 on Tomcat 8.0.21.
>
> I’ve attached it to this message as a text file.

How do you fetch action in
"my.domain.controller.ActionOption.getAction(ActionOption.java:138)" ?
Do you construct those actions manually?

at 
my.domain.controller.ActionOptionBase.getTextFromProperties(ActionOptionBase.java:122)
~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]
at my.domain.controller.ActionOption.getAction(ActionOption.java:138)
~[mydomain-struts2-controller-4.0-SNAPSHOT.jar:?]


Rregards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-13 Thread LAW Andy
Using version 2.5.13 on Tomcat 8.0.21.

I’ve attached it to this message as a text file.

Later,

Andy



> On 12 Sep 2017, at 15:56, Yasser Zamani  wrote:
>
> Each one you're more comfortable or is more important for you.
>
> On 9/12/2017 7:08 PM, LAW Andy wrote:
>>
>>> On 12 Sep 2017, at 14:46, Yasser Zamani  wrote:
>>>
>>> Great! they mean devMode works.
>>>
>>> Could you post your whole stacktrace of exception (including caused
>>> bys). If you should not send your internal app related info, delete such
>>> lines from stacktrace. I need to know the trace of the Struts itself
>>> only. If I know how and where Struts fails, then it'll be helpful a lot.
>>>
>>
>> Do you want 2.5.12 or 2.5.13 ?
>>
>> Later,
>>
>> Andy
>>
>>
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>

13-Sep-2017 09:41:50.559 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server version:
Apache Tomcat/8.0.21
13-Sep-2017 09:41:50.560 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server built:  
Mar 23 2015 14:11:21 UTC
13-Sep-2017 09:41:50.560 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Server number: 
8.0.21.0
13-Sep-2017 09:41:50.560 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log OS Name:   
Mac OS X
13-Sep-2017 09:41:50.561 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log OS Version:
10.11.6
13-Sep-2017 09:41:50.561 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Architecture:  
x86_64
13-Sep-2017 09:41:50.561 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Java Home: 
/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
13-Sep-2017 09:41:50.561 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log JVM Version:   
1.8.0_144-b01
13-Sep-2017 09:41:50.561 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:
Oracle Corporation
13-Sep-2017 09:41:50.561 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: 
/Users/my-username/tomcat/apache-tomcat-8.0.21
13-Sep-2017 09:41:50.561 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: 
/Users/my-username/tomcat/apache-tomcat-8.0.21
13-Sep-2017 09:41:50.562 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Djava.util.logging.config.file=/Users/my-username/tomcat/apache-tomcat-8.0.21/conf/logging.properties
13-Sep-2017 09:41:50.562 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
13-Sep-2017 09:41:50.562 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Djava.endorsed.dirs=/Users/my-username/tomcat/apache-tomcat-8.0.21/endorsed
13-Sep-2017 09:41:50.562 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dcatalina.base=/Users/my-username/tomcat/apache-tomcat-8.0.21
13-Sep-2017 09:41:50.562 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dcatalina.home=/Users/my-username/tomcat/apache-tomcat-8.0.21
13-Sep-2017 09:41:50.562 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Djava.io.tmpdir=/Users/my-username/tomcat/apache-tomcat-8.0.21/temp
13-Sep-2017 09:41:50.562 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based 
Apache Tomcat Native library which allows optimal performance in production 
environments was not found on the java.library.path: 
/Users/my-username/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
13-Sep-2017 09:41:50.877 INFO [main] org.apache.coyote.AbstractProtocol.init 
Initializing ProtocolHandler ["http-nio-8082"]
13-Sep-2017 09:41:50.943 INFO [main] 
org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared 
selector for servlet write/read
13-Sep-2017 09:41:50.946 INFO [main] org.apache.coyote.AbstractProtocol.init 
Initializing ProtocolHandler ["ajp-nio-8009"]
13-Sep-2017 09:41:50.947 INFO [main] 
org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared 
selector for servlet write/read
13-Sep-2017 09:41:50.947 INFO [main] org.apache.catalina.startup.Catalina.load 
Initialization processed in 1347 ms
13-Sep-2017 09:41:51.024 INFO [main] 
org.apache.catalina.core.StandardService.startInternal Starting service Catalina
13-Sep-2017 09:41:51.024 INFO [main] 
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: 
Apache Tomcat/8.0.21
13-Sep-2017 

Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread Yasser Zamani
Each one you're more comfortable or is more important for you.

On 9/12/2017 7:08 PM, LAW Andy wrote:
>
>> On 12 Sep 2017, at 14:46, Yasser Zamani  wrote:
>>
>> Great! they mean devMode works.
>>
>> Could you post your whole stacktrace of exception (including caused
>> bys). If you should not send your internal app related info, delete such
>> lines from stacktrace. I need to know the trace of the Struts itself
>> only. If I know how and where Struts fails, then it'll be helpful a lot.
>>
>
> Do you want 2.5.12 or 2.5.13 ?
>
> Later,
>
> Andy
>
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread LAW Andy

> On 12 Sep 2017, at 14:46, Yasser Zamani  wrote:
> 
> Great! they mean devMode works.
> 
> Could you post your whole stacktrace of exception (including caused 
> bys). If you should not send your internal app related info, delete such 
> lines from stacktrace. I need to know the trace of the Struts itself 
> only. If I know how and where Struts fails, then it'll be helpful a lot.
> 

Do you want 2.5.12 or 2.5.13 ?

Later,

Andy



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread Yasser Zamani
Great! they mean devMode works.

Could you post your whole stacktrace of exception (including caused 
bys). If you should not send your internal app related info, delete such 
lines from stacktrace. I need to know the trace of the Struts itself 
only. If I know how and where Struts fails, then it'll be helpful a lot.

On 9/12/2017 2:32 PM, LAW Andy wrote:
> Not sure where we’re going with this line of enquiry, but reducing log4j2 
> level to warn and hitting up the fake property via GET parameter as you 
> suggested shows…
>
> 155201 [http-nio-8082-exec-9] WARN  
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
> [devmode.notification] in bundle [my.domain.controller.package]!
> 155205 [http-nio-8082-exec-9] WARN  
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
> [devmode.notification] in bundle [my.domain.package]!
> 155207 [http-nio-8082-exec-9] WARN  
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
> [devmode.notification] in bundle [my.domain.controller.package]!
> 155207 [http-nio-8082-exec-9] WARN  
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
> [devmode.notification] in bundle [my.domain.package]!
> 155207 [http-nio-8082-exec-9] WARN  
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
> [devmode.notification] in bundle [my.domain.controller.package]!
> 155207 [http-nio-8082-exec-9] WARN  
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
> [devmode.notification] in bundle [my.domain.package]!
> 155207 [http-nio-8082-exec-9] WARN  
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
> [devmode.notification] in bundle [my.domain.controller.package]!
> 155207 [http-nio-8082-exec-9] WARN  
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
> [devmode.notification] in bundle [my.domain.package]!
> 155210 [http-nio-8082-exec-9] ERROR 
> com.opensymphony.xwork2.interceptor.ParametersInterceptor [] - Developer 
> Notification (set struts.devMode to false to disable this message):
> Unexpected Exception caught setting 'IDontExist' on 'class 
> my.domain.controller.LoginAction: Error setting expression 'IDontExist' with 
> value ['true', ]
>
>
> Followed by the now-traditional NPE-based errors because the Container isn’t 
> being set in the Action.
>
> This is now running 2.3.12 Struts on 8.0.21 Tomcat.
>
> Later,
>
> Andy
>
>
>
>> On 12 Sep 2017, at 10:43, Yasser Zamani  wrote:
>>
>> No, "DEBUG" level is not interesting for me now. Also, as I saw, it
>> seems this specific message is not dependent to devMode value [1].
>>
>> Could you please reduce your log4j2 root level to only log "WARN" ? so
>> it'll be less puffy and simpler to examine.
>>
>> Then please check if devMode works, open
>> http://yourIp:yourPort/yourContextPath/oneOfYourAction?iDontExist=test
>> in your browser. while that one action does not have iDontExist
>> property, I think you should see a warning from ParametersInterceptor on
>> output.
>>
>> [1]
>> https://github.com/apache/struts/blob/master/core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java#L266
>>
>> On 9/12/2017 1:17 PM, LAW Andy wrote:
>>>
 On 11 Sep 2017, at 22:50, LAW Andy  wrote:


>
> Did you try "devmode=true" and then examining output for any warning?


 I did. And there’s nothing obvious.

>>>
>>> Scrub that - there is something coming up (I think I must have been looking 
>>> at the wrong debug output last night).
>>>
>>> 6727 [http-nio-8082-exec-5] DEBUG 
>>> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Base class 
>>> org.apache.catalina.loader.WebappClassLoader doesn't contain 
>>> 'resourceEntries' field, trying with parent!
>>> java.lang.NoSuchFieldException: resourceEntries
>>>
>>>
>>> OK. That gives me a start.
>>>
>>>
>>> Later,
>>>
>>> Andy
>>>
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread Lukasz Lenart
2017-09-12 11:42 GMT+02:00 LAW Andy :
>
>> On 12 Sep 2017, at 10:19, Lukasz Lenart  wrote:
>>
>> You can ignore this, it only happens in devMode when Struts want to
>> reload resources. Did you try with Struts 2.3.12?
>
> Also broken in 2.3.12 :(

I think this is related to [1] and you must call getText() before the
action was fully initialised - in a constructor or to init a field

[1] https://issues.apache.org/jira/browse/WW-4756


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread LAW Andy
Not sure where we’re going with this line of enquiry, but reducing log4j2 level 
to warn and hitting up the fake property via GET parameter as you suggested 
shows…

155201 [http-nio-8082-exec-9] WARN  
com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
[devmode.notification] in bundle [my.domain.controller.package]!
155205 [http-nio-8082-exec-9] WARN  
com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
[devmode.notification] in bundle [my.domain.package]!
155207 [http-nio-8082-exec-9] WARN  
com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
[devmode.notification] in bundle [my.domain.controller.package]!
155207 [http-nio-8082-exec-9] WARN  
com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
[devmode.notification] in bundle [my.domain.package]!
155207 [http-nio-8082-exec-9] WARN  
com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
[devmode.notification] in bundle [my.domain.controller.package]!
155207 [http-nio-8082-exec-9] WARN  
com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
[devmode.notification] in bundle [my.domain.package]!
155207 [http-nio-8082-exec-9] WARN  
com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
[devmode.notification] in bundle [my.domain.controller.package]!
155207 [http-nio-8082-exec-9] WARN  
com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Missing key 
[devmode.notification] in bundle [my.domain.package]!
155210 [http-nio-8082-exec-9] ERROR 
com.opensymphony.xwork2.interceptor.ParametersInterceptor [] - Developer 
Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'IDontExist' on 'class 
my.domain.controller.LoginAction: Error setting expression 'IDontExist' with 
value ['true', ]


Followed by the now-traditional NPE-based errors because the Container isn’t 
being set in the Action.

This is now running 2.3.12 Struts on 8.0.21 Tomcat.

Later,

Andy



> On 12 Sep 2017, at 10:43, Yasser Zamani  wrote:
> 
> No, "DEBUG" level is not interesting for me now. Also, as I saw, it 
> seems this specific message is not dependent to devMode value [1].
> 
> Could you please reduce your log4j2 root level to only log "WARN" ? so 
> it'll be less puffy and simpler to examine.
> 
> Then please check if devMode works, open 
> http://yourIp:yourPort/yourContextPath/oneOfYourAction?iDontExist=test 
> in your browser. while that one action does not have iDontExist 
> property, I think you should see a warning from ParametersInterceptor on 
> output.
> 
> [1] 
> https://github.com/apache/struts/blob/master/core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java#L266
> 
> On 9/12/2017 1:17 PM, LAW Andy wrote:
>> 
>>> On 11 Sep 2017, at 22:50, LAW Andy  wrote:
>>> 
>>> 
 
 Did you try "devmode=true" and then examining output for any warning?
>>> 
>>> 
>>> I did. And there’s nothing obvious.
>>> 
>> 
>> Scrub that - there is something coming up (I think I must have been looking 
>> at the wrong debug output last night).
>> 
>> 6727 [http-nio-8082-exec-5] DEBUG 
>> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Base class 
>> org.apache.catalina.loader.WebappClassLoader doesn't contain 
>> 'resourceEntries' field, trying with parent!
>> java.lang.NoSuchFieldException: resourceEntries
>> 
>> 
>> OK. That gives me a start.
>> 
>> 
>> Later,
>> 
>> Andy
>> 
>> 
>> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread Yasser Zamani
No, "DEBUG" level is not interesting for me now. Also, as I saw, it 
seems this specific message is not dependent to devMode value [1].

Could you please reduce your log4j2 root level to only log "WARN" ? so 
it'll be less puffy and simpler to examine.

Then please check if devMode works, open 
http://yourIp:yourPort/yourContextPath/oneOfYourAction?iDontExist=test 
in your browser. while that one action does not have iDontExist 
property, I think you should see a warning from ParametersInterceptor on 
output.

[1] 
https://github.com/apache/struts/blob/master/core/src/main/java/com/opensymphony/xwork2/util/AbstractLocalizedTextProvider.java#L266

On 9/12/2017 1:17 PM, LAW Andy wrote:
>
>> On 11 Sep 2017, at 22:50, LAW Andy  wrote:
>>
>>
>>>
>>> Did you try "devmode=true" and then examining output for any warning?
>>
>>
>> I did. And there’s nothing obvious.
>>
>
> Scrub that - there is something coming up (I think I must have been looking 
> at the wrong debug output last night).
>
> 6727 [http-nio-8082-exec-5] DEBUG 
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Base class 
> org.apache.catalina.loader.WebappClassLoader doesn't contain 
> 'resourceEntries' field, trying with parent!
> java.lang.NoSuchFieldException: resourceEntries
>
>
> OK. That gives me a start.
>
>
> Later,
>
> Andy
>
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread LAW Andy

> On 12 Sep 2017, at 10:19, Lukasz Lenart  wrote:
> 
> You can ignore this, it only happens in devMode when Struts want to
> reload resources. Did you try with Struts 2.3.12?

Also broken in 2.3.12 :(

Later,

Andy

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread LAW Andy

> On 12 Sep 2017, at 10:19, Lukasz Lenart  wrote:
> 
> You can ignore this, it only happens in devMode when Struts want to
> reload resources. Did you try with Struts 2.3.12?

Next on the list (after I deal with a different crisis).

Later,

Andy


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread Lukasz Lenart
2017-09-12 10:47 GMT+02:00 LAW Andy :
> 6727 [http-nio-8082-exec-5] DEBUG 
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Base class 
> org.apache.catalina.loader.WebappClassLoader doesn't contain 
> 'resourceEntries' field, trying with parent!
> java.lang.NoSuchFieldException: resourceEntries

You can ignore this, it only happens in devMode when Struts want to
reload resources. Did you try with Struts 2.3.12?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread LAW Andy

> On 12 Sep 2017, at 09:47, LAW Andy  wrote:
> 
> 
>> On 11 Sep 2017, at 22:50, LAW Andy  wrote:
>> 
>> 
>>> 
>>> Did you try "devmode=true" and then examining output for any warning?
>> 
>> 
>> I did. And there’s nothing obvious.
>> 
> 
> Scrub that - there is something coming up (I think I must have been looking 
> at the wrong debug output last night).
> 
> 6727 [http-nio-8082-exec-5] DEBUG 
> com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Base class 
> org.apache.catalina.loader.WebappClassLoader doesn't contain 
> 'resourceEntries' field, trying with parent!
> java.lang.NoSuchFieldException: resourceEntries
> 
> 
> OK. That gives me a start.
> 

Running against Apache 8.5.20 removes the above error message, but I still get 
the same problem with a Null Container inside my actions - which leads to an 
NPE when I try to call getText()…

Later,

Andy


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



Re: No container in actions after upgrading to 2.5.13

2017-09-12 Thread LAW Andy

> On 11 Sep 2017, at 22:50, LAW Andy  wrote:
> 
> 
>> 
>> Did you try "devmode=true" and then examining output for any warning?
> 
> 
> I did. And there’s nothing obvious.
> 

Scrub that - there is something coming up (I think I must have been looking at 
the wrong debug output last night).

6727 [http-nio-8082-exec-5] DEBUG 
com.opensymphony.xwork2.util.AbstractLocalizedTextProvider [] - Base class 
org.apache.catalina.loader.WebappClassLoader doesn't contain 'resourceEntries' 
field, trying with parent!
java.lang.NoSuchFieldException: resourceEntries


OK. That gives me a start.


Later,

Andy



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread LAW Andy
> On 11 Sep 2017, at 18:24, Yasser Zamani  wrote:
> 
> I sense you may think Struts uses Spring to inject Container. No, 
> "Internally, the framework uses its own dependency injection container 
> that is very similar to Google Guice" [1].
> 
> So do not worry about Spring and it's auto-wiring.

Ahh. You are right. The Spring stuff fires up first and then the struts.xml 
config kicks in.


> 
> Did you try "devmode=true" and then examining output for any warning?


I did. And there’s nothing obvious.


Later,

Andy


> 
> [1] https://struts.apache.org/docs/dependency-injection.html
> 
> On 9/11/2017 8:57 PM, LAW Andy wrote:
>> Does anyone know if the default autowiring method changed in Struts between 
>> 2.5.10 and 2.5.13?
>> 
>> 
>>> On 11 Sep 2017, at 15:28, LAW Andy  wrote:
>>> 
>>> 
 On 11 Sep 2017, at 15:13, Lukasz Lenart  wrote:
 
 2017-09-11 16:09 GMT+02:00 LAW Andy :
> (Indirectly) from a JSP. This is “furniture” on the web page.
> 
> Each action has an “ActionPropertyKey” annotated on it. Each Action 
> inherits from a base class that has a getActionTitle() method on it.
> 
> JSP furniture calls getActionTitle() which extracts the Action-specific 
> property key, appends “.title” and then looks for the appropriate string 
> from a properties file. It’s in there that the getText() call gets hit.
 
 Strange, this should work. Do you request such JSPs via action or directly?
>>> 
>>> And it *did* work until I upgraded to 2.5.13 :(
>>> 
>>> Not *quite* sure what you’re asking with regard to the request and JSPs 
>>> bit, but I’ll try to describe:
>>> 
>>> applicationContext.xml configures (amongst other things) an Action class 
>>> that acts as the top-level of the app. This page lists some introductory 
>>> text and a series of options that are configured in that Spring  
>>> declaration. Each one of the options effectively declares a different 
>>> “namespace” that the app will run under. You can think of it as something 
>>> like a list of towns, where clicking on any of the town options will take 
>>> you to the same app interface, but with data that pertains just to that 
>>> town.
>>> 
>>> The rest of the Actions are then configured in struts.xml.
>>> 
>>> Each action returns a result string which is mapped to a JSP in the 
>>> struts.xml config file, so I think the answer to your question is “via 
>>> action” but please clarify if I’ve misinterpreted.
>>> 
>>> Later,
>>> 
>>> Andy
>>> 
>>> 
 
 
 Regards
 --
 Łukasz
 + 48 606 323 122 http://www.lenart.org.pl/
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
>>> 
>>> 
>>> --
>>> The University of Edinburgh is a charitable body, registered in
>>> Scotland, with registration number SC005336.
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread Lukasz Lenart
2017-09-11 16:28 GMT+02:00 LAW Andy :
> Not *quite* sure what you’re asking with regard to the request and JSPs bit, 
> but I’ll try to describe:

Do you access /my-web-app/index.jsp or /my-web-app/index.action ?

> applicationContext.xml configures (amongst other things) an Action class that 
> acts as the top-level of the app. This page lists some introductory text and 
> a series of options that are configured in that Spring  declaration. 
> Each one of the options effectively declares a different “namespace” that the 
> app will run under. You can think of it as something like a list of towns, 
> where clicking on any of the town options will take you to the same app 
> interface, but with data that pertains just to that town.

Can you try first upgrade to Struts 2.5.12?

And here you have all the issues fixed within those releases related to Spring

https://issues.apache.org/jira/issues/?jql=project%20%3D%20WW%20AND%20resolution%20%3D%20Fixed%20AND%20fixVersion%20in%20(2.5.10.1%2C%202.5.12%2C%202.5.13)%20AND%20text%20~%20%22spring%22%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread Yasser Zamani
I sense you may think Struts uses Spring to inject Container. No, 
"Internally, the framework uses its own dependency injection container 
that is very similar to Google Guice" [1].

So do not worry about Spring and it's auto-wiring.

Did you try "devmode=true" and then examining output for any warning?

[1] https://struts.apache.org/docs/dependency-injection.html

On 9/11/2017 8:57 PM, LAW Andy wrote:
> Does anyone know if the default autowiring method changed in Struts between 
> 2.5.10 and 2.5.13?
>
>
>> On 11 Sep 2017, at 15:28, LAW Andy  wrote:
>>
>>
>>> On 11 Sep 2017, at 15:13, Lukasz Lenart  wrote:
>>>
>>> 2017-09-11 16:09 GMT+02:00 LAW Andy :
 (Indirectly) from a JSP. This is “furniture” on the web page.

 Each action has an “ActionPropertyKey” annotated on it. Each Action 
 inherits from a base class that has a getActionTitle() method on it.

 JSP furniture calls getActionTitle() which extracts the Action-specific 
 property key, appends “.title” and then looks for the appropriate string 
 from a properties file. It’s in there that the getText() call gets hit.
>>>
>>> Strange, this should work. Do you request such JSPs via action or directly?
>>
>> And it *did* work until I upgraded to 2.5.13 :(
>>
>> Not *quite* sure what you’re asking with regard to the request and JSPs bit, 
>> but I’ll try to describe:
>>
>> applicationContext.xml configures (amongst other things) an Action class 
>> that acts as the top-level of the app. This page lists some introductory 
>> text and a series of options that are configured in that Spring  
>> declaration. Each one of the options effectively declares a different 
>> “namespace” that the app will run under. You can think of it as something 
>> like a list of towns, where clicking on any of the town options will take 
>> you to the same app interface, but with data that pertains just to that town.
>>
>> The rest of the Actions are then configured in struts.xml.
>>
>> Each action returns a result string which is mapped to a JSP in the 
>> struts.xml config file, so I think the answer to your question is “via 
>> action” but please clarify if I’ve misinterpreted.
>>
>> Later,
>>
>> Andy
>>
>>
>>>
>>>
>>> Regards
>>> --
>>> Łukasz
>>> + 48 606 323 122 http://www.lenart.org.pl/
>>>
>>> -
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>
>>
>> --
>> The University of Edinburgh is a charitable body, registered in
>> Scotland, with registration number SC005336.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread LAW Andy
Does anyone know if the default autowiring method changed in Struts between 
2.5.10 and 2.5.13?


> On 11 Sep 2017, at 15:28, LAW Andy  wrote:
> 
> 
>> On 11 Sep 2017, at 15:13, Lukasz Lenart  wrote:
>> 
>> 2017-09-11 16:09 GMT+02:00 LAW Andy :
>>> (Indirectly) from a JSP. This is “furniture” on the web page.
>>> 
>>> Each action has an “ActionPropertyKey” annotated on it. Each Action 
>>> inherits from a base class that has a getActionTitle() method on it.
>>> 
>>> JSP furniture calls getActionTitle() which extracts the Action-specific 
>>> property key, appends “.title” and then looks for the appropriate string 
>>> from a properties file. It’s in there that the getText() call gets hit.
>> 
>> Strange, this should work. Do you request such JSPs via action or directly?
> 
> And it *did* work until I upgraded to 2.5.13 :(
> 
> Not *quite* sure what you’re asking with regard to the request and JSPs bit, 
> but I’ll try to describe:
> 
> applicationContext.xml configures (amongst other things) an Action class that 
> acts as the top-level of the app. This page lists some introductory text and 
> a series of options that are configured in that Spring  declaration. 
> Each one of the options effectively declares a different “namespace” that the 
> app will run under. You can think of it as something like a list of towns, 
> where clicking on any of the town options will take you to the same app 
> interface, but with data that pertains just to that town.
> 
> The rest of the Actions are then configured in struts.xml.
> 
> Each action returns a result string which is mapped to a JSP in the 
> struts.xml config file, so I think the answer to your question is “via 
> action” but please clarify if I’ve misinterpreted.
> 
> Later,
> 
> Andy
> 
> 
>> 
>> 
>> Regards
>> -- 
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>> 
> 
> 
> -- 
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread LAW Andy

> On 11 Sep 2017, at 15:13, Lukasz Lenart  wrote:
> 
> 2017-09-11 16:09 GMT+02:00 LAW Andy :
>> (Indirectly) from a JSP. This is “furniture” on the web page.
>> 
>> Each action has an “ActionPropertyKey” annotated on it. Each Action inherits 
>> from a base class that has a getActionTitle() method on it.
>> 
>> JSP furniture calls getActionTitle() which extracts the Action-specific 
>> property key, appends “.title” and then looks for the appropriate string 
>> from a properties file. It’s in there that the getText() call gets hit.
> 
> Strange, this should work. Do you request such JSPs via action or directly?

And it *did* work until I upgraded to 2.5.13 :(

Not *quite* sure what you’re asking with regard to the request and JSPs bit, 
but I’ll try to describe:

applicationContext.xml configures (amongst other things) an Action class that 
acts as the top-level of the app. This page lists some introductory text and a 
series of options that are configured in that Spring  declaration. Each 
one of the options effectively declares a different “namespace” that the app 
will run under. You can think of it as something like a list of towns, where 
clicking on any of the town options will take you to the same app interface, 
but with data that pertains just to that town.

The rest of the Actions are then configured in struts.xml.

Each action returns a result string which is mapped to a JSP in the struts.xml 
config file, so I think the answer to your question is “via action” but please 
clarify if I’ve misinterpreted.

Later,

Andy


> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread Lukasz Lenart
2017-09-11 16:09 GMT+02:00 LAW Andy :
> (Indirectly) from a JSP. This is “furniture” on the web page.
>
> Each action has an “ActionPropertyKey” annotated on it. Each Action inherits 
> from a base class that has a getActionTitle() method on it.
>
> JSP furniture calls getActionTitle() which extracts the Action-specific 
> property key, appends “.title” and then looks for the appropriate string from 
> a properties file. It’s in there that the getText() call gets hit.

Strange, this should work. Do you request such JSPs via action or directly?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread LAW Andy

> On 11 Sep 2017, at 15:03, Lukasz Lenart  wrote:
> 
> 2017-09-11 16:01 GMT+02:00 LAW Andy :
>> I probably could, but I think this is less of an Action problem and more of 
>> a struts/spring dependency injection problem. I don’t think there’s anything 
>> wrong with the Action class code itself, unless there’s an annotation that I 
>> need to add now that wasn’t necessary with 2.5.10.1
> 
> How do you call the getText() method? in a constructor? or when
> initializing a field?


(Indirectly) from a JSP. This is “furniture” on the web page.

Each action has an “ActionPropertyKey” annotated on it. Each Action inherits 
from a base class that has a getActionTitle() method on it.

JSP furniture calls getActionTitle() which extracts the Action-specific 
property key, appends “.title” and then looks for the appropriate string from a 
properties file. It’s in there that the getText() call gets hit.


> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread Lukasz Lenart
2017-09-11 16:01 GMT+02:00 LAW Andy :
> I probably could, but I think this is less of an Action problem and more of a 
> struts/spring dependency injection problem. I don’t think there’s anything 
> wrong with the Action class code itself, unless there’s an annotation that I 
> need to add now that wasn’t necessary with 2.5.10.1

How do you call the getText() method? in a constructor? or when
initializing a field?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread LAW Andy
I probably could, but I think this is less of an Action problem and more of a 
struts/spring dependency injection problem. I don’t think there’s anything 
wrong with the Action class code itself, unless there’s an annotation that I 
need to add now that wasn’t necessary with 2.5.10.1


> On 11 Sep 2017, at 14:53, Lukasz Lenart  wrote:
> 
> 2017-09-11 15:51 GMT+02:00 LAW Andy :
>> I recently upgraded the struts 2 library in an old web application from 
>> 2.5.10.1 to 2.5.13. Simultaneously I upgraded Spring (which we use for 
>> managing the database connections and some other bits and bobs) from 4.3.7 
>> to 4.3.10.
>> 
>> Now, the application runs but the actions do not have a Container injected. 
>> This manifests itself when I try to call getText() - there is no 
>> TextProvider so the library tries to get one from a TextProviderFactory 
>> which comes from the Container which is null which means I get an NPE and a 
>> blank returned value. Rolling back the dependencies to the previous versions 
>> reverts to correct behaviour.
> 
> Can you post an example code of your action?
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread Yasser Zamani
I recently have resolved very similar issue at [1].

That was because of wrong PUBLIC ID in his validator xmls.

But in general, please add  to your struts.xml and configure log4j2 for your application [2] and 
then run your application and review it's output for any warnings. I 
guess you should look for something like "Unable to load config class X 
at Y probably due to a missing jar, which might be fine if you never 
plan to use the Z interceptor".

[1] https://issues.apache.org/jira/browse/WW-4841
[2] https://logging.apache.org/log4j/2.x/manual/migration.html

On 9/11/2017 6:21 PM, LAW Andy wrote:
> I recently upgraded the struts 2 library in an old web application from 
> 2.5.10.1 to 2.5.13. Simultaneously I upgraded Spring (which we use for 
> managing the database connections and some other bits and bobs) from 4.3.7 to 
> 4.3.10.
>
> Now, the application runs but the actions do not have a Container injected. 
> This manifests itself when I try to call getText() - there is no TextProvider 
> so the library tries to get one from a TextProviderFactory which comes from 
> the Container which is null which means I get an NPE and a blank returned 
> value. Rolling back the dependencies to the previous versions reverts to 
> correct behaviour.
>
> I am at a loss as to what needs to be reconfigured in order to get this web 
> app back up and running again with the more up-to-date libraries.
>
> FWIW, I’m developing in NetBeans using maven and running on Tomcat 8.0.21.
>
> Any suggestions will be gratefully received.
>
> TIA.
>
> Andy Law
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


Re: No container in actions after upgrading to 2.5.13

2017-09-11 Thread Lukasz Lenart
2017-09-11 15:51 GMT+02:00 LAW Andy :
> I recently upgraded the struts 2 library in an old web application from 
> 2.5.10.1 to 2.5.13. Simultaneously I upgraded Spring (which we use for 
> managing the database connections and some other bits and bobs) from 4.3.7 to 
> 4.3.10.
>
> Now, the application runs but the actions do not have a Container injected. 
> This manifests itself when I try to call getText() - there is no TextProvider 
> so the library tries to get one from a TextProviderFactory which comes from 
> the Container which is null which means I get an NPE and a blank returned 
> value. Rolling back the dependencies to the previous versions reverts to 
> correct behaviour.

Can you post an example code of your action?


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org