0 Replies Latest reply on Mar 28, 2007 7:39 PM by svadu

    InstantiationException: org.ajax4jsf.framework.renderer.Cham

      Hi all,

      I am trying to run a simple facelets+ajax4jsf 1.1.0 application on websphere 6.0.x (RAD 7 with built-in websphere 6.0 test environment).
      Because this version of websphere contains JSF 1.0 I had to put myfaces 1.1.5 in a separate directory and use my own version of jsf implementation.

      To do this I use a shared library settings in ewb sphere which points at the directory with myfaces with a small set of libraries that myfaces uses (I prefer not to replace the jsf jars in websphere itself because it's not nice to mess with the default installation of servers). I also use PARENT_LAST strategy to pick up jars from the application (a version of http://wiki.apache.org/myfaces/Websphere_Installation ).

      So far I manage to deploy a very simple web app (no beans just very simple xhtml form with a4j:status to check ajax is functioning) except that during the deployment I see this message:

      [29.03.07 1:07:56:781 CEST] 00000010 WebApp E Exception caught while initializing context
      javax.faces.FacesException: org.ajax4jsf.framework.renderer.ChameleonRenderKitFactory
       at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:553)
       at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:426)
       at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:229)
       at com.ibm.ws.jsf.configuration.FacesConfigParser.createDefaultRenderKitFactory(FacesConfigParser.java:352)
       at com.ibm.ws.jsf.configuration.FacesConfigParser.initializeConfiguration(FacesConfigParser.java:332)
       at com.ibm.ws.jsf.util.FacesConfigUtil._parseJSFConfiguration(FacesConfigUtil.java:128)
       at com.ibm.ws.jsf.util.FacesConfigUtil.parseJSFConfiguration(FacesConfigUtil.java:82)
       at com.sun.faces.util.Util.verifyFactoriesAndInitDefaultRenderKit(Util.java:465)
       at com.ibm.ws.jsf.configuration.FacesConfig.initialize(FacesConfig.java:96)
       at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:83)
       at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1434)
       at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:411)
       at com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:117)
       at com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:128)
       at com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:939)
       at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:892)
       at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:167)
       at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:391)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1228)
       at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1067)
       at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:547)
       at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:751)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:892)
       at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1412)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
       at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
       at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1366)
       at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:1012)
       at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:233)
       at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:128)
       at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
       at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:128)
       at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:128)
       at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:167)
       at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1249)
       at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:990)
       at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
       at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:906)
       at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:157)
       at com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:177)
       at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:378)
       at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:147)
       at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:610)
       at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:463)
       at com.ibm.rmi.iiop.ORB.process(ORB.java:439)
       at com.ibm.CORBA.iiop.ORB.process(ORB.java:1737)
       at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2300)
       at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:65)
       at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
       at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1471)
      Caused by: java.lang.InstantiationException: org.ajax4jsf.framework.renderer.ChameleonRenderKitFactory
       at java.lang.Class.newInstance3(Class.java(Compiled Code))
       at java.lang.Class.newInstance(Class.java(Compiled Code))
       at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:551)
       ... 52 more
      


      Apparently ajax4jsf is still being initialized by websphere jsf implementation no matter what (even though myfaces are being used). The example application still seem to be working (that is a4j:status is being triggered). The questions are:

      * How critical is it to have ChameleonRenderKitFactory not being initialized?
      * It seems to be there is some weird stuff with classloading appearing, is it possible there is a bug in ajax4jsf 1.1.0?

      Thanks in advance for any help!