Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003954 [Resin] minor always 03-17-10 11:23 03-01-10 10:29
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.6 Product Version 4.0.5
  Product Build
Summary 0003954: CDI circular initialization
Description (rep by Hontvari Jozsef)

I have downloaded 4.0.4 but it still throws StackOverflowError on the same example configuration file.
 
Scott Ferguson írta:
> Hontvári József wrote:
>
>> The name of the first class is misleading (maybe Scheduled... would have
>> been better, it is executing scheduled tasks itself), Resin's scheduler
>> hasn't been involved in the configuration. But the issue is either the
>> same or we have two independent issues. If I remove the constructor
>> initialization by creating an empty constructor and use setter instead
>> of it, then the CanDI initialization does completes. However, if I add
>> @Startup annotation, so a class instance is actually created, then I
>> again receive StackOverflow.
>>
>>
> Thanks. I have this fixed for 4.0.4.
>
> -- Scott
>
>> Wesley Wu írta:
>>
>>
>>> This could be a lazy init problem I think.
>>>
>>> The scheduled tasks would be inited before some of other beans which
>>> the tasks need.
>>>
>>> I've met this before.
>>>
>>> The workaround:
>>> Inject the Injector into your task, no other webbeans.
>>> When the task starts (run()), create webbeans instances via the injector.
>>>
>>> -Wesley
>>>
>>> 2010/2/11 Hontvári József <hontvari@flyordie.com>:
>>>
>>>
>>>
>>>> I reduced the configuration to the minimum. It consists of a circular setter
>>>> dependency, and then a separate third constructor initialization which
>>>> refers to one of circular items. Both have to be present, otherwise
>>>> StackOverflow doesn't happen. I attached a configuration sample and a part
>>>> of the log file, logged on "finer" level.
>>>>
>>>> Scott Ferguson írta:
>>>>
>>>> Hontvári József wrote:
>>>>
>>>>
>>>> I receive java.lang.StackOverflowError when Resin tries to read the
>>>> configuration file:
>>>>
>>>> [10-02-10 10:31:56.929] {resin-37}
>>>> C:/Progra~1/mireka-1.2/conf/mireka.xml:325: com.caucho.confi
>>>> g.core.ResinIf.init(): java.lang.StackOverflowError
>>>>
>>>> I believe there is no circular constructor dependency in the file. To be
>>>> sure I replaced almost all constructor initialisation blocks with setter
>>>> initialization. Is there a way to debug this error? There is no stack
>>>> trace or anything else in the log.
>>>>
>>>>
>>>>
>>>> Can you send that section of the configuration file? It looks like it's
>>>> something to do with the <resin:if> like the test EL expression,
>>>> although it could also be the contents of the if.
>>>>
>>>> Also, it's possible that adding a <logger name="" level="finer"/> in the
>>>> <resin> section will show the stack trace.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0004499)
ferg
03-01-10 10:29

ioc/04i0
 

- Issue History
Date Modified Username Field Change
03-17-10 11:23 ferg New Issue
03-01-10 10:29 ferg Note Added: 0004499
03-01-10 10:29 ferg Assigned To  => ferg
03-01-10 10:29 ferg Status new => closed
03-01-10 10:29 ferg Resolution open => fixed
03-01-10 10:29 ferg Fixed in Version  => 4.0.6


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker