First up I'm a long-time reader of and first time poster on JavaRanch, so in advance, I'd like to offer my sincere thanks for all the help I have received thus far, it's long overdue!
Now, I have come up against a problem I cannot find a solution to here (or anywhere else on the web), I hope someone here will be able to help. I have been tasked with migrating an existing application running on JBoss to Tomcat (7) and upgrading from JSF 1.1 to 2.X along with upgrading from Richfaces 3.3.0 to 4.X. Thanks to Cameron Wallace McKenzie and his excellent article http://www.theserverside.com/tutorial/Slingshot-Yourself-into-JavaServer-Faces-20-Learning-JSF I have managed to get the application running on tomcat 7 with JSF 2.0 but when I try and add the new Richface 4.1 jars I get an error which prevents my server from starting correctly. The log of my server starting is attached. below. (Couldnt attach due to file extension restrictions?)
Further to trying to provide plenty of useful information the jar files I have in my WEB-INF/lib directory are:
Finally it's worth noting that I've created a directory called "endorsed" in my Tomcat home directory into which I've had to place another copy of the jaxws-api.jar. If I do not have this jar in the endorsed directory the server will not start (with a different error which I can provide details for if necessary).
I don't think that the "endorsed" thing is what you need to be doing for Tomcat 7. The "endorsed" directory was sort of a magical extension to the privileged directories of the JRE itself, and just naming a directory "endorsed" isn't likely to help.
Your error message is finding fault with an attribute named "source" on your Context definition. According to the Tomcat 7 docs, the Context element doesn't provide a "source=" attribute.
Moving from JBoss to Tomcat is a lot harder than going the other way. JBoss is a full-stack JEE implementation and Tomcat isn't. Also, configuration of database connection pools is different.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Mar 13, 2012
You pointed out that I shouldn't need to have the jaxws-api.jar in a tomcat/endorsed directory (and I agree). In fact, this is not my go forward solution, I can't even have this endorsed directory in the production environment at all. Putting the jar there is a stop-gap solution to allow me to progress with the upgrade to Richfaces 4.
The error message below is what I get when I revert to Richfaces 3.3.0 and only include the jaxws-api jar in the WEB-INF/lib directory and not in the tomcat/lib directory. Let me know if this sheds any light on the matter for you! I've tried the same thing with Richfaces 4, but the LOrdering issue brings things grinding to a halt before this particular error is displayed.
You're still getting the same error message, and that's no surprize. The fault isn't in the code or the WAR or the libraries, it's in the Tomcat Context element (deployment descriptor). Context doesn't support a "source=" attribute.
Joined: Mar 13, 2012
Tim, thanks for your help, but I found the solution, it seems the issue wasn’t a classloader problem at all, but a compilation error. Ordering is a Richfaces 3.3.x class (org.rchfaces.models.Ordering) that no longer exists in version 4.x.