File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes LOrdering Error wile starting Tomcat 7 server using Richfaces 4.1 and JSF 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "LOrdering Error wile starting Tomcat 7 server using Richfaces 4.1 and JSF 2.0" Watch "LOrdering Error wile starting Tomcat 7 server using Richfaces 4.1 and JSF 2.0" New topic
Author

LOrdering Error wile starting Tomcat 7 server using Richfaces 4.1 and JSF 2.0

Drew McLaughlin
Greenhorn

Joined: Mar 13, 2012
Posts: 5
Hi All,

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:

acegi-security-1.0.5.jar, activation.jar, adwJAXB.jar, antlr.license.txt, antlr-2.7.6.jar, asm.jar, Aspose.Words.jdk15.jar, cglib-2.1.3.jar, cleanse-address-jaxb.jar,
CMITPropertyFileReader.jar, commons-beanutils.jar, commons-codec-1.3.jar, commons-collections.jar, commons-collections-2.1.1.jar, commons-collections-3.2.jar,
commons-dbcp.jar, commons-digester.jar, commons-fileupload-1.1.jar, commons-io-1.2.jar, commons-lang-2.3.jar, commons-logging.jar, commons-pool.jar, cssparser-0.9.5.jar,
db2jcc_license_cu.jar, db2jcc.jar, dom4j-1.6.1.jar, dumbster1.6.jar, easymock-2.5.2.jar, evaluator.jar, FastInfoset.jar, freemarker.jar, gmbal-api-only.jar,
guava-r09.jar, hibernate3.jar, hibernate-annotations.jar, hibernate-commons-annotations.jar, hibernate-entitymanager.jar, hibernate-search.jar, hibernate-tools.jar,
hibernate-validator.jar, hsqldb.jar, html_basic.tld, http.jar, javaee.jar, javassist.jar, jaxb-api.jar, jaxb-impl.jar, jaxb-xjc.jar, jaxws-api.jar, jaxws-rt.jar,
jaxws-spring-1.8.jar, jaxws-tools.jar, jboss-common.jar, jsf-api.jar, jsf-facelets.jar, jsf-impl.jar, jsr173_api.jar, jsr181-api.jar, jsr250-api.jar, jstl-impl-1.2.jar,
jta.jar, jta.licence.txt, jxl.jar, log4j.jar, log4j-1.2.14.jar, log4j-1.2.15.jar, lucene-core-2.3.0.jar, mail.jar, management-api.jar, mimepull.jar,
org.springframework.integration.adapter-1.0.4.RELEASE.jar, org.springframework.integration.event-1.0.4.RELEASE.jar, org.springframework.integration.file-1.0.4.RELEASE.jar,
org.springframework.integration.http-1.0.4.RELEASE.jar, org.springframework.integration.httpinvoker-1.0.4.RELEASE.jar, org.springframework.integration.jms-1.0.4.RELEASE.jar,
org.springframework.integration.mail-1.0.4.RELEASE.jar, org.springframework.integration.rmi-1.0.4.RELEASE.jar, org.springframework.integration.security-1.0.4.RELEASE.jar,
org.springframework.integration.stream-1.0.4.RELEASE.jar, org.springframework.integration.ws-1.0.4.RELEASE.jar, org.springframework.integration.xml-1.0.4.RELEASE.jar,
org.springframework.integration-1.0.4.RELEASE.jar, persistence-api-1.0.jar, policy.jar, PSOCMITLPEWDevSecurityKey.jar, resolver.jar, richfaces-components-api-4.1.0.Final.jar,
richfaces-components-ui-4.1.0.Final.jar, richfaces-core-api-4.1.0.Final.jar, richfaces-core-impl-4.1.0.Final.jar, saaj-api.jar, saaj-impl.jar, sac-1.3.jar,
shale-test-1.0.5.jar, spring-2.5.6.jar, spring-test-2.5.6.jar, standard-1.1.2.jar, stax-ex.jar, streambuffer.jar, V4_2_JDK1_5_CMITSecurity.jar,
V4_2_JDK1_5_CMITSecurityInterfaces.jar, web-facesconfig_1_0.dtd, web-facesconfig_1_1.dtd, woodstox.jar, xbean-spring-2.8.jar

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).

Thanks Again!

~Drew


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

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.
Drew McLaughlin
Greenhorn

Joined: Mar 13, 2012
Posts: 5
Hi Tim,

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.

Thanks again!

~Drew


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

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.
Drew McLaughlin
Greenhorn

Joined: Mar 13, 2012
Posts: 5
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.

I found a migration guide here https://community.jboss.org/thread/159259 which implies Ordering has been replaced with org.richfaces.component.SortOrder.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: LOrdering Error wile starting Tomcat 7 server using Richfaces 4.1 and JSF 2.0