I am trying to override Mojarra in Glassfish with MyFaces. I have put myfaces-impl dependency in maven and removed the RI dependencies - jsf-api.jar and jsf-impl.jar. I've also asked Glassfish nicely to use bundled JSF implementation as shown in here using these lines in glassfish-web.xml:
<glassfish-web-app error-url="">
<context-root>/Grandis</context-root>
<class-loader delegate="false" />
<property name="useBundledJsf" value="true"/>
</glassfish-web-app>
However, when I try to deploy the application I get the following error:
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/faces/webapp/FacesServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:927)
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1486)
I also tried downloading MyFaces jars(myfaces-2.1.3.jar, myfaces-api-2.1.3.jar, myfaces-bundle-2.1.3.jar and a bunch of apache commons libraries) manually and putting them in the classpath of application. Same result.
Any ideas?
UPDATE: Posting the contents of WEB-INF/lib inside WAR when I add dependency through maven (excluding only my own jars):
commons-beanutils-1.8.3.jar
commons-codec-1.3.jar
commons-collections-3.2.jar
commons-digester-1.8.jar
commons-logging-1.1.1.jar
javaee-api-6.0.jar
jstl-1.1.2.jar
log4j-1.2.16.jar
myfaces-api-2.1.3.jar
myfaces-impl-2.1.3.jar
org.eclipse.persistence.antlr-2.0.0.jar
org.eclipse.persistence.asm-2.0.0.jar
org.eclipse.persistence.core-2.0.0.jar
org.eclipse.persistence.jpa-2.0.0.jar
prettyfaces-jsf2-3.3.0.jar
primefaces-3.0.M4-SNAPSHOT.jar
standard-1.1.2.jar
xpp3_min-1.1.4c.jar
xstream-1.3.1.jar
/WEB-INF/lib
of the WAR build. – BalusC