[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-10 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 The case is that on second container initialisation we do not create singletons upfront ... I have tried to change that but got some problems, not sure why. I must re-think how we initialise Str

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-07 Thread yasserzamani
Github user yasserzamani commented on the issue: https://github.com/apache/struts/pull/153 > Thanks a lot :) I see now what's going on but have no idea why :\ @lukaszlenart , as I debug, the trace is `object factory creation` then `set1 (inject it's 1st property)` then `set2 (

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-04 Thread yasserzamani
Github user yasserzamani commented on the issue: https://github.com/apache/struts/pull/153 :) Yes I know, just a bit worry about backward compatibility between minor versions. I also am studying your sample and @lukaszlenart 's pr to understand what is going on as I think sam

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-04 Thread aleksandr-m
Github user aleksandr-m commented on the issue: https://github.com/apache/struts/pull/153 @yasserzamani Looks like a hack :) I would rather leave as it is, then to introduce that. If container is needed then it **should** be injected in the constructor. Take a look at spring object f

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-04 Thread yasserzamani
Github user yasserzamani commented on the issue: https://github.com/apache/struts/pull/153 @aleksandr-m , I modified `ObjectFactory` as below ```java ... private List myPrivateInjectQueue; ... @Inject public void setContainer(Container container)

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-02 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 Thanks a lot :) I see now what's going on but have no idea why :\ --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-02 Thread aleksandr-m
Github user aleksandr-m commented on the issue: https://github.com/apache/struts/pull/153 Sure. No problem. Test project - https://github.com/aleksandr-m/struts2-objectfactory-container/ This commit adds custom date converter - https://github.com/aleksandr-m/struts2-

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-02 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 I don't see any other options now to merge this. @aleksandr-m could you prepare that example app? I will be able to investigate what's wrong with my solution ;-) --- If your project is set up

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 Would it be possible to share an application that replicates this behaviour? Sorry for bothering you but I want to understand what's going on :) --- If your project is set up for it, you can re

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 > With the new code in #155 the custom type converter isn't initialized at all. :( w00t! --- If your project is set up for it, you can reply to this email and have your reply appear on

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread aleksandr-m
Github user aleksandr-m commented on the issue: https://github.com/apache/struts/pull/153 With the new code in #155 the custom type converter isn't initialized at all. :( Call trace of previous code in #155 ``` --- If your project is set up for it, you can reply to this

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 I have changed code a bit, can you try to test it on your side? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project do

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 ... but where the `ObjectFactory#buildBean` is called? It should only be called when building non-internal beans and when all the internal beans were already instantiated. Can you post a call tr

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread aleksandr-m
Github user aleksandr-m commented on the issue: https://github.com/apache/struts/pull/153 It isn't about `XWorkConverter` per se. In #155 the injection of `ConversionPropertiesProcessor` still happens and `TypeConverterCreator` is injected next and `ObjectFactory#buildBean` is called

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 See these screenshots master ![2017-08-01_2119](https://user-images.githubusercontent.com/170103/28842993-f915533e-76ff-11e7-8434-09d2404f.png) this branch

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread aleksandr-m
Github user aleksandr-m commented on the issue: https://github.com/apache/struts/pull/153 Ubuntu, oracle jdk8. If following code prints `setContainer` before other setters (especially before `setInterceptorFactory`) it will work. On Ubuntu using oracle jdk8 `setContainer` is

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 One more question: JDK version? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 (on OSX) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if t

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 hm... but this example works for both branches - `master` and this: ``` DateConverter.convertToString() localizedTextProvider=com.opensymphony.xwork2.util.StrutsLocalizedTextProvider@342e

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread aleksandr-m
Github user aleksandr-m commented on the issue: https://github.com/apache/struts/pull/153 Nope, #155 doesn't seem have any effect. Add following files to project, run under *nix, execute some action which lead to the JSP, `localizedTextProvider` should not be `null` in system

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 I have opened #155 - what do you think? @aleksandr-m can you test it locally as I do not have the exact setup. --- If your project is set up for it, you can reply to this email and have your re

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 Hm... give me few minutes, maybe I will be able add support for it ;-) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your pro

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 I'm not sure if this is a good idea ... basically we need a `@PostConstruct` mechanism in Struts DI - this can be easily achieved by switching to Guice 3 and using CDI annotations. --- If your

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-08-01 Thread yasserzamani
Github user yasserzamani commented on the issue: https://github.com/apache/struts/pull/153 To keep `backward-compatible` if is very important, I think we may have following: ```java protected Object injectInternalBeans(Object obj) { if (obj != null) {

[GitHub] struts issue #153: WW-4827 Not fully initialized ObjectFactory tries to crea...

2017-07-31 Thread lukaszlenart
Github user lukaszlenart commented on the issue: https://github.com/apache/struts/pull/153 No better idea and I think we can assume when you need to inject the `Container` you should always do it in a constructor. --- If your project is set up for it, you can reply to this email and