0

Is there any conflict in Websphere 8.0.0.4 with JSF 1.2 (Sun provider/ IBM provider)?

I am getting below issue while accessing my application:

Caused by: java.lang.ClassNotFoundException: com.sun.faces.application.ApplicationAssociate at java.net.URLClassLoader.findClass(URLClassLoader.java:434) at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:204) at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:665) at java.lang.ClassLoader.loadClass(ClassLoader.java:644) at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:119) at java.lang.ClassLoader.loadClass(ClassLoader.java:627) at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62) at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:566) at java.lang.ClassLoader.loadClass(ClassLoader.java:627) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:566) at java.lang.ClassLoader.loadClass(ClassLoader.java:627) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:566) at java.lang.ClassLoader.loadClass(ClassLoader.java:627)

My POM Entries are:

     <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>1.2</version>
    </dependency>

     <dependency>
        <groupId>com.ibm.faces</groupId>
        <artifactId>jsf-ibm</artifactId>
        <version>1.0</version>
    </dependency>

     <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-impl-messages</artifactId>
        <version>1.0</version>
    </dependency>  
4

1 回答 1

1

I found the answer.

  1. Basically, websphere 8 is based on Java EE 6 and Java EE 6 is based on JSF 2.0 (refer this: http://www.oracle.com/technetwork/java/javaee/tech/index.html). Where, websphere 7 is based on Java EE 5 and Java EE 5 is based on JSF 1.2 (refer this: http://www.oracle.com/technetwork/java/javaee/tech/javaee5-jsp-135162.html)

  2. Websphere 8 has J2ee.jar (Java EE 6) and com.ibm.ws.jsf.jar which has JSF 2.0 Implementation.

Best option is to not go with websphere 8.0 with jsf 1.2. But, if you still need to switch to websphere 8.0 with having jsf 1.2, you need to take either of the following options:

using jsf 2.0 jars with jsf 1.2 code

Or

We need to change the classloading hierarchy ( Parent last ) and add JSF 1.2 specific jars in your application. This will allow to refer JSF 1.2 jars from application not fromwebspeher shared libraries

于 2013-01-29T13:45:02.607 回答