[ http://issues.apache.org/jira/browse/MYFACES-1163?page=comments#action_12369457 ]
Ingo Massen commented on MYFACES-1163: -------------------------------------- Same thing happens with server state saving. The actual problem occurs if you install myfaces.jar in tomcat jsf.libs deploy folder. My web.xml references org.apache.myfaces.webapp.StartupServletContextListener which is outside of WEB-INF/lib (no myfaces.jar in WEB-INF/lib). Now myfaces.jar tries to load some jsf-facelets class (jsf.facelets.jar is located in WEB-INF/lib). MyFaces uses incorrect classloader NoClassDefFound occurs. Try installing myfaces-api-1.1.3-SNAPSHOT.jar and myfaces-impl-1.1.3-SNAPSHOT.jar in JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs replacing myfaces-api.jar and myfaces-impl.jar (which are version 1.1.1). Then try to run the jboss-seam examples (seam-booking, seam-dvd) which will run fine with myfaces 1.1.1 but not with myfaces-1.1.3-SNAPSHOT, because 1.1.1 uses ObjectInputStream s = new MyFacesObjectInputStream(input). I changed to code already in 1.1.3 and everything runs as expected. > JBoss classloading fails if myfaces jars installed in tomcat > ------------------------------------------------------------ > > Key: MYFACES-1163 > URL: http://issues.apache.org/jira/browse/MYFACES-1163 > Project: MyFaces Core > Type: Bug > Versions: 1.1.2-SNAPSHOT, 1.1.2, 1.1.3-SNAPSHOT > Environment: JBoss 4.0.4RC1 myfaces-1.1.3-SNAPSHOT > Reporter: Ingo Massen > Assignee: Stan Silvert > > Cannot use Myfaces jars installed in > JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs as they do > not use the correct WebappClassloader but instead an UCL3 classloader. > This is because myfaces use the following line in StateUtils.getAsObject > ObjectInputStream s = new ObjectInputStream(input); > instead of > import org.apache.myfaces.shared.util.MyFacesObjectInputStream; > ObjectInputStream s = new MyFacesObjectInputStream(input); > The same applies to JspStateManagerImpl.deserializeView(). > ObjectInputStream uses Class.forName instead of > Thread.currentThread().getContextClassLoader() as the ClassUtils > implementation that MyFacesObjectInputStream uses does. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
