1

I've successfully deployed my app on WebSphere Liberty Profile (16.0.0.3), but when I try to use it, I get the following exception:

java.lang.ClassNotFoundException: org.apache.myfaces.renderkit.html.HtmlFormRenderer
    at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:488)
    at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoader.java:271)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at com.ibm.ws.classloading.internal.AppClassLoader.findOrDelegateLoadClass(AppClassLoader.java:466)
    at com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppClassLoader.java:438)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at pt.sibs.epms.ecc.renderer.HtmlFormRenderer.getRenderer(HtmlFormRenderer.java:54)

JSF 2.2 is enabled in server.xml:

<feature>jsf-2.2</feature>

And the class exists in:

wlp/lib/com.ibm.ws.jsf.2.2_1.0.14.jar

Regarding API type visibilty, both my shared library and application have spec,ibm-api,api,third-party.

If I try to configure another implementation of MyFaces, I start getting ClassCastException.

What do I need to change to make this work?

EPMS Devteam
  • 273
  • 2
  • 15

2 Answers2

1

The jsf-2.2 feature doesn't expose the MyFaces implementation classes as api of any kind which is why the attempt to do a Class.forName isn't working.

Alasdair
  • 3,071
  • 15
  • 20
  • thanks for the reply. Does this mean I can't implement my own renderer? – EPMS Devteam Nov 14 '16 at 14:38
  • I'm sorry I don't know enough about JSF to be able to answer that question. I just checked the doc here: http://www.ibm.com/support/knowledgecenter/SSAW57_liberty/com.ibm.websphere.wlp.nd.doc/ae/rwlp_feature_jsf-2.2.html – Alasdair Nov 14 '16 at 20:52
0

Hi you should be able to implement your own Renderers by using a combination of the RendererWrapper and the RenderKitWrapper. These classes allow you to add specialized behavior to existing Renderer and RenderKit instances.

  • Thank you for the links, I'll have a look and see if I can make it work, but I'm having the same issue with `org.apache.myfaces.application.ActionListenerImpl` (although I can ditch this one). – EPMS Devteam Nov 17 '16 at 07:42