Solved

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

Posted on 2012-03-13
8
710 Views
Last Modified: 2012-06-21
Hi All,

I have come up against a problem I cannot find a solution to here (or anywhere else on the web), I hope someone 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 here 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.

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
server-start.txt
0
Comment
Question by:dsmclaughlin
  • 4
  • 3
8 Comments
 
LVL 7

Expert Comment

by:gudii9
ID: 37716274
>>>Thanks to Cameron Wallace McKenzie and his excellent article here

I cannot open the link. Can you please post the link again

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

Have you put all the required dependent jars for Richfaces. Also check for the consistency of the jars. Some times jars might be corrupted or properly not updated in the workspace. How are you building the application

Here are interesting links

http://docs.jboss.org/richfaces/latest_4_X/
http://java.sys-con.com/node/2040167
0
 
LVL 26

Expert Comment

by:mrcoffee365
ID: 37717378
I'm pretty sure he meant this article:
http://www.theserverside.com/tutorial/Installing-the-JavaServer-Faces-Web-application-framework

@dsmclaughlin: you should post the error -- that's probably more helpful than your lib list.

Commenting on your lib list: you have multiple copies of jars, with different versions.  I have no reason to think that's causing your issue, but it is a bad idea.  Pick one version of each, and rename the others as not jars so that your containers don't get confused in the class loader.
0
 

Author Comment

by:dsmclaughlin
ID: 37719436
Hi Guys, thanks so much for the replies!

@gudii9 - as far as I am aware I have all the dependencies I need, can you tell me where I can find me a definitive list of jar dependencies that are needed to run Richfaces 4 on tomcat?

I downloaded the jars from various sources on the internet, I think the workspace is in sync with the file system (due to multiple refreshed and clean builds in Eclipse) how can I check for corrupted jars?

Also mrcoffee365 was correct about the link.

@mrcoffee365 - I have posted the error as an attached txt file. Please have a look and let me know what you think. I will try and remove duplicate jars. I'll let you know how I get on.

Thanks again!
0
 
LVL 26

Expert Comment

by:mrcoffee365
ID: 37720136
Your exceptions are related to the spring installation.  Also you have multiple versions of the same TLD, since you get warning messages about duplicate TLD definitions.

Your server log exceptions like this:
----------------------------------------------------------------------------
INFO: Initializing Spring root WebApplicationContext
[Thread-2] ERROR  Context initialization failed  (context.ContextLoader)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0': Cannot resolve reference to bean 'org.springframework.integration.handler.MessageHandlerChain#1' while setting bean property 'handler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.handler.MessageHandlerChain#1': Cannot resolve reference to bean 'org.springframework.integration.handler.ServiceActivatingHandler#0' while setting bean property 'handlers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.handler.ServiceActivatingHandler#0': Cannot resolve reference to bean 'engineeringService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'engineeringService' defined in class path resource [resources//lpew-integration.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [resources//lpew-data.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [resources//lpew-data.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: LOrdering;
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
      at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
      at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377)
      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
      at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
      at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.handler.MessageHandlerChain#1': Cannot resolve reference to bean 'org.springframework.integration.handler.ServiceActivatingHandler#0' while setting bean property 'handlers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.handler.ServiceActivatingHandler#0': Cannot resolve reference to bean 'engineeringService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'engineeringService' defined in class path resource [resources//lpew-integration.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [resources//lpew-data.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [resources//lpew-data.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: LOrdering;
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
[many more missing bean definitions]
----------------------------------------------------------------------------

When faced with these sorts of errors, I generally start over.  It sounds as if you started with some sort of mixed environment, then added more things.  Try creating a good installation of the new code, get it working with a test program, then add in your old app.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:dsmclaughlin
ID: 37723845
@mrcoffee365 thanks for the follow up, I'm going to try and reduce the number of jars I have to a bare minimum and see if that helps pinpoint the error more accurately. If that doesn't work - I'll start again as you suggest, a prospect I do not relish, I'll let you know how i get on. Thanks!
0
 

Accepted Solution

by:
dsmclaughlin earned 0 total points
ID: 37737065
I found a resolution to the issue 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 which implies Ordering has been replaced with org.richfaces.component.SortOrder.
0
 
LVL 26

Expert Comment

by:mrcoffee365
ID: 37737817
Congrats on getting it working.  If you had followed my advice above, you also would have gotten it working.
0
 

Author Closing Comment

by:dsmclaughlin
ID: 37760244
A colleague in work helped me solve the issue.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
array11 challenge 16 51
stringclean challenge 26 56
pairs challenge 5 44
maven project error 5 20
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now