0

I'm trying to migrate a JSF (MyFaces, Trinidad) project from 1.2 to 2.0. I've followed this link. Below is what I've did.

1. Updated the XMLNS of faces-config.xml, web.xml, facelets.xml
2. Updated the Jar files (MyFaces 2.0.16, Trinidad 2.0.1)
3. Removed the facelets
3. Removed the ALTERNATE_VIEW_HANDLER tag from web.xml
4. Changed the classloaderMode to PARENT_LAST in WAS 8.5

We are using jspx alone and not xhtml pages. el-api 2.2 and el-ri 1.1.11 are also in our lib folder
When I start the server, I'm getting the below exception. Please help me to resolve the problem.

ContainerHelp E   WSVR0501E: Error creating component com.ibm.ws.runtime.component.CompositionUnitMgrImpl@8d7ccd79
com.ibm.ws.exception.RuntimeWarning: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: <b>Failed to load webapp: javax.servlet.ServletContainerInitializer: Provider org.apache.myfaces.ee6.MyFacesContainerInitializer not a subtype </b>
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:432)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718)

.......
.......
Caused by: java.util.ServiceConfigurationError: javax.servlet.ServletContainerInitializer: Provider org.apache.myfaces.ee6.MyFacesContainerInitializer not a subtype
    at java.util.ServiceLoader$ServiceIterator.next(ServiceLoader.java:212)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:535)
    at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409)
Community
  • 1
  • 1
Deepan
  • 13
  • 1
  • 9
  • Problem suggests a dirty runtime classpath. E.g. you provided servlet API or even Java EE API JAR files along with the webapp, while those are supposed to be already provided by the server itself. If you have no idea what that means, you'd best just let your build system produce a WAR file and then inspect it using a zip tool and list the JARs in `/WEB-INF/lib` folder. Then we can point out conflicting ones. – BalusC Jul 17 '15 at 12:26
  • Thanks, BalusC. We are using Maven. My lib folder has J2EE jar. If I give the scope as "provided" for J2EE jar, then I'm getting the build error "Javax.faces package not found"
    I can able to see the WAS 8.5 runtime in the build path.
    – Deepan Jul 17 '15 at 13:56
  • http://i.stack.imgur.com/eiaLI.jpg This image shows the availability of WAS 8.5 runtime in the build path. But when I expand it, it's not showing any of its jars. – Deepan Jul 17 '15 at 13:59
  • @BalusC I have resolved the issue by removing the J2EE jars in the lib folder manually. But now getting different exception with JNDI when I change the classloaderMode to PARENT_LAST. Below is the exception. `A java: URL name was used, but Naming was not configured to handle java: URL names. The likely cause is a user in error attempting to specify a java: URL name in a non-J2EE client or server environment. Throwing ConfigurationException` – Deepan Jul 22 '15 at 02:17

0 Answers0