Just created :
 * https://issues.apache.org/jira/browse/EXTCDI-307 (EAR support for JBoss) 
 * https://issues.apache.org/jira/browse/EXTCDI-308 (EAR support for WAS)
and attached the corresponding patches.

Please note that these patches doesn't cover support for all the CODI modules 
(I've tested EAR support only for the JSF module).

Regards,
Adrian


----- Mail original -----
De : Adrian Gonzalez <adr_gonza...@yahoo.fr>
À : MyFaces Discussion <users@myfaces.apache.org>
Cc : 
Envoyé le : Mercredi 3 avril 2013 11h52
Objet : Re: CODI ViewAccessScoped issue with EAR on JBoss 7.1.x

Hello,

I just resolved java.lang.NullPointerException: null on Websphere (8.0.0.4) 
(see [2] below).

This issue was due :
When a client calls a method with package level access on a CDI bean, WAS 
8.0.0.4 doesn't execute the interceptor chain.
The call is executed directly on the javassist class (and @Inject fields are 
null in the javassist class - so we get the NPE).
For now, just setting method visibility to public on both 
JsfRequestLifecycleBroadcaster#broadcastBeforeEvent et
JsfRequestLifecycleBroadcaster#broadcastAfterEvent resolves this issue.


Question is : bug located in Websphere or in CODI ?
In other workds, does CDI 1.0 supports calling methods with package level 
access ? 
I looked at the CDI spec, but didn't find anything on this matter.
Interceptor spec 1.1 supports it (from chapter Method interceptors : 
'Around-invoke methods can have public, private, protected, or package level 
access. An
around-invoke method must not be declared as final or static.')
If it's in WAS, I can open a PMR for this.
 I will open 2 tickets for EAR support : one for JBoss and another one for 
Websphere and attach both patches.
Sounds good ?


Best regards,
Adrian






________________________________
De : Adrian Gonzalez <adr_gonza...@yahoo.fr>
À : MyFaces Discussion <users@myfaces.apache.org>; Mark Struberg 
<strub...@yahoo.de> 
Envoyé le : Mardi 26 mars 2013 17h22
Objet : Re: CODI ViewAccessScoped issue with EAR on JBoss 7.1.x

Hello,

Sorry for the late feedback.
Currently struggling on making it work with Websphere 8 (as Denis before) 
before sending a patch.

I've corrected locally the IllegalAccessError on DefaultBeanEntryFactory [1] 
(just making DefaultBeanEntryFactory  public corrects the issue).
Now I get only the NullPointerException on 
JsfRequestLifecycleBroadcaster.broadcastBeforeEvent [2].
I know I could set classloader to APPLICATION, but as Denis said, it is not 
officially supported by Websphere.
So I prefer to modify CODI's code (if possible) to be able to use it on WAS.

I don't have anymore time this week to work on these issues, so I'll follow up 
next week.

Thanks,
Adrian


[1]
[3/26/13 16:52:53:494 CET] 000000bc
webapp        E
com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet
Error]-[Faces Servlet]: java.lang.RuntimeException: by
java.lang.IllegalAccessError:
org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultBeanEntryFactory
                at
javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:509)

at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:486)

at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:422)

at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:394)

[2] java.lang.NullPointerException: null

at
org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.JsfRequestLifecycleBroadcaster.broadcastBeforeEvent(JsfRequestLifecycleBroadcaster.java:58)
~[myfaces-extcdi-bundle-jsf20-1.0.5.nxs1-SNAPSHOT.jar:1.0.5.nxs1-SNAPSHOT]

at
org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.JsfRequestLifecyclePhaseListener.beforePhase(JsfRequestLifecyclePhaseListener.java:56)
~[myfaces-extcdi-bundle-jsf20-1.0.5.nxs1-SNAPSHOT.jar:1.0.5.nxs1-SNAPSHOT]

at
org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:76)
~[com.ibm.ws.jsf.myfaces.jar:na]

at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:159)
~[com.ibm.ws.jsf.myfaces.jar:na]

at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
~[com.ibm.ws.jsf.myfaces.jar:na]

at
org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.execute(CodiLifecycleWrapper.java:101)
~[myfaces-extcdi-bundle-jsf20-1.0.5.nxs1-SNAPSHOT.jar:1.0.5.nxs1-SNAPSHOT]

at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
~[javax.j2ee.jsf.jar:na]

________________________________
De : Mark Struberg <strub...@yahoo.de>
À : MyFaces Discussion <users@myfaces.apache.org>; Adrian Gonzalez 
<adr_gonza...@yahoo.fr> 
Envoyé le : Jeudi 21 mars 2013 22h01
Objet : Re: CODI ViewAccessScoped issue with EAR on JBoss 7.1.x

Hi folks!

a.) I hope you find CODI useful nontheless ;)
b.) if this fix solves the problems, can you please open a JIRA for the EXTCDI 
project and attach the patch?

txs and LieGrue,
strub




----- Original Message -----
> From: Пестов Алексей <pestov.ale...@gmail.com>
> To: MyFaces Discussion <users@myfaces.apache.org>; Adrian Gonzalez 
> <adr_gonza...@yahoo.fr>
> Cc: 
> Sent: Thursday, March 21, 2013 8:38 PM
> Subject: Re: CODI ViewAccessScoped issue with EAR on JBoss 7.1.x
> 
> Adrian, thank you very much for quick response!
> 
> I'll try to apply your patch.
> 
> 
> On Thu, Mar 21, 2013 at 9:38 PM, Adrian Gonzalez 
> <adr_gonza...@yahoo.fr>wrote:
> 
>>  Hi Aleksey,
>> 
>>  Here's the patch file (my first one with git).
>>  I've obtained it executing [1]
>> 
>>  I've changed CODI version from 1.0.5 to 1.0.5.nxs1-SNAPSHOT in the same
>>  commit (so sorry, you have this modification with this patch).
>> 
>> 
>>  Hope this helps,
>> 
>>  [1] execute the following line after cloning
>>  https://github.com/gonzalad/myfaces-extcdi
>>  git diff d141ac555cb263c6413c6f4ddebbd41bd4768eac^
>>  d141ac555cb263c6413c6f4ddebbd41bd4768eac on my
>> 
>> 
>> 
>> 
>>  ----- Mail original -----
>>  De : Пестов Алексей <pestov.ale...@gmail.com>
>>  À : users@myfaces.apache.org
>>  Cc :
>>  Envoyé le : Jeudi 21 mars 2013 18h22
>>  Objet : Re: CODI ViewAccessScoped issue with EAR on JBoss 7.1.x
>> 
>>  Hello. Today I decided to use it and got the same problem. This does not
>>  work in the EAR to JBoss 7.1.1.
>> 
>>  Adrian, could you please make a patch (*.diff) with your solution?
>> 
>>  I would also like to know about your option 2)
>> 
>>  >>2. remove @JsfPhaseListener and rely on classic phaseListeners 
> configured
>>  with faces-config.xml
>> 
>>  Can do this in faces-config.xml of my application, not in
>>  myfaces-extcdi-bundle-jsf20-1.0.5.jar
>>  ?
>> 
>>  Best regards,
>> 
>>  Aleksey
>> 
> 
> 
> 
> -- 
> С уважением,
> Алексей Пестов
> тел. +7 (925) 067-32-13
>                                                                               
>                                                                       

Reply via email to