<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Sun Feb 11 23:09:06 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[MGNLADMLEG-50] Generic TreeHandlerManager with @Singleton annotation causes deployment to fail on JEE7 servers using CDI</title>
                <link>https://jira.magnolia-cms.com/browse/MGNLADMLEG-50</link>
                <project id="10881" key="MGNLADMLEG">Admininterface Legacy 4.x (closed)</project>
                    <description>&lt;p&gt;As I describe in &lt;a href=&quot;http://forum.magnolia-cms.com/forum/thread.html?threadId=71e16516-6efc-4f48-92ab-f69b8e38c316&amp;amp;page=1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this forum posting&lt;/a&gt; trying to deploy on Wildfire or Glassfish 4 fails because TreeHandlerManager does not comply with the &lt;a href=&quot;http://docs.jboss.org/cdi/spec/1.0/html/implementation.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CDI specification&lt;/a&gt; - specifically &lt;cite&gt;&quot;If the managed bean class is a generic type, it must have scope @Dependent. If a managed bean with a parameterized bean class declares any scope other than @Dependent, the container automatically detects the problem and treats it as a definition error.&quot;&lt;/cite&gt;&lt;/p&gt;

&lt;p&gt;On wildfire this is the exception thrown :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
13:40:58,453 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit.&lt;span class=&quot;code-quote&quot;&gt;&quot;rocamora2-webapp.war&quot;&lt;/span&gt;.WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit.&lt;span class=&quot;code-quote&quot;&gt;&quot;rocamora2-webapp.war&quot;&lt;/span&gt;.WeldStartService: Failed to start service
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.CR1.jar:1.2.0.CR1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
	at java.lang.&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;.run(&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;.java:744) [rt.jar:1.7.0_45]
Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-000071: Managed bean &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;info.magnolia.module.admininterface.TreeHandlerManager must be @Dependent
	at org.jboss.weld.bean.ManagedBean.checkType(ManagedBean.java:198)
	at org.jboss.weld.bean.AbstractBean.initializeAfterBeanDiscovery(AbstractBean.java:103)
	at org.jboss.weld.bean.ManagedBean.initializeAfterBeanDiscovery(ManagedBean.java:113)
	at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork(ConcurrentBeanDeployer.java:129)
	at org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork(ConcurrentBeanDeployer.java:120)
	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
	at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_45]
	... 3 more
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


</description>
                <environment>Wildfire * / Glassfish 4</environment>
        <key id="35744">MGNLADMLEG-50</key>
            <summary>Generic TreeHandlerManager with @Singleton annotation causes deployment to fail on JEE7 servers using CDI</summary>
                <type id="1" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10883&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="fgrilli">Federico Grilli</assignee>
                                    <reporter username="jportway">joshua portway</reporter>
                        <labels>
                    </labels>
                <created>Tue, 7 Jan 2014 15:53:42 +0100</created>
                <updated>Tue, 28 Jan 2014 13:26:48 +0100</updated>
                            <resolved>Mon, 13 Jan 2014 13:27:02 +0100</resolved>
                                    <version>5.2</version>
                    <version>5.2.1</version>
                                    <fixVersion>5.2.2</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="77502" author="jportway" created="Wed, 8 Jan 2014 13:49:20 +0100"  >&lt;p&gt;Having thought about this for a bit I&apos;ve realised that the @Singleton annotation on this class doesn&apos;t make much sense to me - since the class is a generic type how does the container know what flavour of the class to inject (i &lt;b&gt;think&lt;/b&gt; type erasure will get rid of that information even if the field that it was being injected into was declared with a type).&lt;br/&gt;
Is this class actually being injected anywhere anyway? Is that Singleton annotation really used?&lt;/p&gt;</comment>
                            <comment id="77607" author="fgrilli" created="Fri, 10 Jan 2014 10:46:01 +0100"  >&lt;p&gt;Hi Joshua, thanks for reporting the issue. As to the @Singleton annotation you&apos;re right there, and that is going to be removed. I then asked a colleague of mine regarding the @Dependent scope and here is his reply &lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&quot;Haven&apos;t heard of the annotation (@Dependent) before. It appears to be part of CDI (previously WebBeans). A dependency injection container that JBoss developed and managed to get standardized and made part of Java EE. Guice is not an implementation of CDI. The @Inject annotation from javax.inject is not part of CDI. Both Guice and CDI use it though.&lt;br/&gt;
In other words, we&apos;re not doing anything wrong, but what we&apos;re doing violates some kind of requirement in CDI.&lt;/p&gt;

&lt;p&gt;Maybe he can try to exclude our classes from being processed by CDI, &lt;a href=&quot;https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Development_Guide/Exclude_Beans_From_the_Scanning_Process.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6/html/Development_Guide/Exclude_Beans_From_the_Scanning_Process.html&lt;/a&gt;&quot;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Hope this helps,&lt;/p&gt;

&lt;p&gt;Federico&lt;/p&gt;</comment>
                            <comment id="77643" author="jportway" created="Fri, 10 Jan 2014 13:47:06 +0100"  >&lt;p&gt;Hi Federico,&lt;/p&gt;

&lt;p&gt;I&apos;m glad to help.&lt;br/&gt;
From memory, the @Dependent annotation basically means that injected objects of a particular class will never be shared. If you annotate a class with @Dependent then whenever it&apos;s injected a new instance will be created - because these are basically &quot;private&quot; objects they are &quot;dependent&quot; on the object that created them and are disposed of when that object disappears. This means they don&apos;t have to be proxied by CDI, which I think is why it&apos;s necessary to declare generic types to be dependent - because CDI can&apos;t effectively proxy them. I seem to remember coming across this problem several years ago (before this error message existed) and not being able to understand why my program was failing - it turned out to be that CDI was throwing exceptions when trying to create a proxy object.&lt;/p&gt;

&lt;p&gt;Because @Dependent objects can&apos;t be shared it makes no sense to declare one to be a Singleton - that&apos;s the error you&apos;re making here, and that&apos;s why CDI is complaining.&lt;/p&gt;

&lt;p&gt;Please take all the above with a pinch of salt - I&apos;m trying to remember an obscure bug from several years ago while on a train, and I may be completely wrong - but I hope this helps.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_14166" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Acceptance criteria</customfieldname>
                        <customfieldvalues>
                            
        <checklist>
        <![CDATA[
                            




                
                                    <div class="o-completion" style="display: flex; flex-shrink: 0;"><span  class="aui-lozenge aui-lozenge-complete" style="font-size: 12px; font-weight: normal; display: flex; flex-direction: row; align-items: center;" ><span style="padding-right: 4px; vertical-align: middle;"><svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="white"><path clip-rule="evenodd" d="m10.41037,3.42544l-7.86501,0c-0.72395,0 -1.31084,0.58688 -1.31084,1.31084l0,7.86508c0,0.7239 0.58689,1.3108 1.31084,1.3108l7.86501,0c0.724,0 1.3109,-0.5869 1.3109,-1.3108l0,-7.86508c0,-0.72396 -0.5869,-1.31084 -1.3109,-1.31084zm-7.86501,-0.65542c-1.08593,0 -1.96626,0.88032 -1.96626,1.96626l0,7.86508c0,1.0859 0.88033,1.9662 1.96626,1.9662l7.86501,0c1.086,0 1.9663,-0.8803 1.9663,-1.9662l0,-7.86508c0,-1.08594 -0.8803,-1.96626 -1.9663,-1.96626l-7.86501,0z" fill-rule="evenodd"/><path d="m5.09049,10.18526l-1.82767,-1.82766l-0.78479,0.78479l2.61246,2.61246l5.38758,-5.38754l-0.78483,-0.78479l-4.60275,4.60274z"/></svg></span><span>Empty</span></span></div>
                        ]]>
    </checklist>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>stain.org</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 10 Jan 2014 10:46:01 +0100</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>mmuehlebach</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 6 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>fgrilli</customfieldvalue>
            <customfieldvalue>jportway</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02yx3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>17399</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>