4

I have an old enterprise application that was developed using WAS 6.1, now my company is trying to perform the implementation of that application in WAS 8. But I am having troubles rendering the JSF content, there are some links that when clicked the JS debugger says Uncaught ReferenceError: myfaces is not defined being the rendered HTML:

onclick="return myfaces.oam.submitForm('top_nav:frmTopNav','top_nav:frmTopNav:lnkCP',null,[['default_sort','name']]);"

So I think it's not rendering it well because of the different versions of JSF between my old application and WAS 8.

Now I decided to force it, downloading the MyFaces 1.1 with Tomahawk 1.1.7 and putting them in the WEB-INF/lib folder, and now it says java.lang.IllegalArgumentException - Class org.mything.LocaleViewHandler is no javax.faces.application.ViewHandler

Why could this be happening?

Thank you in advance.

Juan Diego
  • 863
  • 1
  • 10
  • 22

2 Answers2

3

Quoting from WAS 8 infocenter, Configuring JavaServer Faces implementation

If you want to use a third-party JSF implementation that is not shipped with the product, then:

  • Keep the configuration set to MyFaces.
  • Add the third-party listener to the web.xml file that is required.
  • Add the third-party implementation Java archive (JAR) files to the application as an isolated shared library and associate it with your application.

On the above referenced page you may find details on Creating shared libraries and Associating shared libraries with applications or modules.

Community
  • 1
  • 1
Kurtcebe Eroglu
  • 1,934
  • 11
  • 15
  • You are quoting the first point wrong: "If you are using a third-party MyFaces implementation, set the JSF implementation to Sun RI". However it does not matter, because none works! – zardosht Aug 01 '14 at 08:06
0

Make sure that you are using PARENT_LAST classloading.

Otherwise it will load its own JSF 2.0 libs first and your class doesn't match the interface. You should check though if you could update to MyFaces 2.0.

Udo Held
  • 12,314
  • 11
  • 67
  • 93