-
Notifications
You must be signed in to change notification settings - Fork 763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Could not add AttachedObjectHandler to MyFaces, after migration to Websphere Liberty 8.5.5? #680
Comments
Please post the complete stacktrace. |
It's the same message that returns to itself, I can attach a screenshot if it may help you: [ERROR ] Could not add AttachedObjectHandler to MyFaces! |
I need the complete stacktrace, not just the first line. |
JFYI: it works fine with MyFaces 2.2.8. So no idea whats wrong on WAS. |
Just some infos from my side: |
WAS guy has opened this issue |
I see. @notatibm Please come back if you need more infos or if you have an idea how to fix this on our side. But AFAICS we can't do anything - our hack works fine on MyFaces 2.2.8. |
So reading the code in AbstractBehaviorHandler line 218-240 the MyFaces workaround wont work by default because the MyFaces classes are not exposed to the applicaation classloader. |
If WAS Liberty were to be updated such that org.apache.myfaces.view.facelets.FaceletCompositionContext were available to the thread context classloader would prime faces consider updating AbstractBehaviorHandler to use the thread context classloader in place of the classloader used to load AbstractBehaviorHandler? Note in WAS Liberty these are not the same thing, the thread context classloader sees a super set of classes. |
Thats what i thouht but i dont see any other possible solution. |
Would be ok from my side. |
any news? |
I will do a fallback to the ThreadClassloader for the next release. |
added the fallback - please create a new issue if we can still enhance the WAS compatibility. |
Liberty is OSGi based and only exports javax.faces-packages to the JEE-world, but org.primefaces.behavior.base.AbstractBehaviorHandler is trying to initialize a Class during runtime
Since the package is not exported you get a ClassNotFoundException. Here is a rather dirty hack.
This works for JSF 2.0, for 2.2 you have to use the com.ibm.ws.jsf.2.2_1.0.10.jar and jsf-2.2.mf. I will report this to the Liberty-devs, but I am not sure if they are willing to export implementation details, so it might be best if IBM and Primefaces would work together on this issue. |
I already added a fallback to the TCCL, we can't do anything else on PF side. |
I also try to reanimate the spec issue here: https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-922 |
We are shipping our part of the fix for this with the WAS Liberty 8.5.5.8 fix. It is documented here: http://www-01.ibm.com/support/docview.wss?uid=swg1PI47095 You'll need the primefaces with this fix as well. |
Issue 7998 from https://code.google.com/p/primefaces/issues/detail?id=7998 appears to affect WAS Liberty 8.5.5.6 running JSF-2.2 which is based on MyFaces 2.2.8 as reported on stack overflow here: http://stackoverflow.com/questions/32370745/error-could-not-add-attachedobjecthandler-to-myfaces-after-migration-to-websph While the original issue was closed in Feb because 2.0.5 of myfaces is old.
Specific failure is:
[ERROR ] Could not add AttachedObjectHandler to MyFaces!
org.apache.myfaces.view.facelets.FaceletCompositionContext
The text was updated successfully, but these errors were encountered: