I jave JEE application which is deployed as ".ear" file into jboss-5.1.0.GA
My application uses JSF with SEAM 2.1.2 implementation, RichFaces 3.3.2.SR1 (you can see the full jar list in the attachment file).
I don't use any where in my code any of MyFaces/tomahawk tags. (as you can see in my web.xml configurations bellow).
This server has becide of my application, another application that uses MyFaces implementation of JSF.
uploading the server has no Errors but after my first access to my app, the server throws this error:
I will appreciate if any one has solution for that.
Unlike Tomcat, recent releases of JBoss are JEE-compliant, and that means that the JSF implementation is in the server itself, so it doesn't have to be added to the application's WAR.
If you want to use MyFaces despite this fact, there's a web.xml setting that tells JBoss to allow it. Check the JBoss documentation for details.
Note that "MyFaces" means only the MyFaces JSF core in this context. It's perfectly fine to use the JBoss (RI) faces implementation with MyFaces Tomahawk, and hopefully by now they've fixed the issues that made it not work well with Trinidad and Tobago.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Aug 04, 2009
Thanks for your reply.
my application uses Jboss Seam that requires JSF RI (which JBOSS already holds) and not MyFaces.
I don't hold in my ".ear" file any JSF implementation because I want my application to use those of JBOSS.
When I run my app without any other app every thing goes well.
The problem starts when the other application that run on the same JBOSS (without ear file, just a folder) uses MyFaces
and then there is a conflict in the class loaders that causes my exception.
I need a way to force JBOSS to use it's JSF RI jars for my application instead of using the MyFaces jars of the other application for my application. In the meanwhile I found some clues that might solve this: 1. The other application should be packed in ".ear" file and that the MyFaces jars will be part of the ".ear" file.
2. consider using "hierarchical classloader" (or Isolation) with JBoss (jboss-app.xml, jboss-web.xml). see also: http://community.jboss.org/wiki/ClassLoadingConfiguration 3. add the following to my application web.xml (but this wasn't enough):
This doesn't sound quite right. Each webapp in a J(2)EE container has its own classpath, and anything in the WEB-INF/lib and WEB-INF/classes of one webapp will not appear in the classpath of any other webapp. That's true regardless of whether you deploy WARs or EARS and whether you keep them zipped or exploded.
You can have a conflict in JSF implementations in one webapp, but that shouldn't cause conflicts in other webapps, because the implementation jar is in not in their classpaths. The only way to have a global conflict is if you put classes in the globally-shared part of the classpath, which doesn't include the internal classpaths for individual webapps.
Joined: Aug 04, 2009
Thats what I think that should be, but the fact is that when I put asside the other app jars every think works fine.
also, the only place that the MyFaces jars can come from in JBOSS is only from other application because JBOSS default implementation of JSF is JSF RI and not those of apache MyFaces.