dsmclaughlin
asked on
LOrdering Error while starting Tomcat 7 server using Richfaces 4.1 and JSF 2.0
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.ja r
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-annotati ons.jar
hibernate-entitymanager.ja r
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.integr ation.adap ter-1.0.4. RELEASE.ja r
org.springframework.integr ation.even t-1.0.4.RE LEASE.jar
org.springframework.integr ation.file -1.0.4.REL EASE.jar
org.springframework.integr ation.http -1.0.4.REL EASE.jar
org.springframework.integr ation.http invoker-1. 0.4.RELEAS E.jar
org.springframework.integr ation.jms- 1.0.4.RELE ASE.jar
org.springframework.integr ation.mail -1.0.4.REL EASE.jar
org.springframework.integr ation.rmi- 1.0.4.RELE ASE.jar
org.springframework.integr ation.secu rity-1.0.4 .RELEASE.j ar
org.springframework.integr ation.stre am-1.0.4.R ELEASE.jar
org.springframework.integr ation.ws-1 .0.4.RELEA SE.jar
org.springframework.integr ation.xml- 1.0.4.RELE ASE.jar
org.springframework.integr ation-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.F inal.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.j ar
V4_2_JDK1_5_CMITSecurityIn terfaces.j ar
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
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.
commons-collections-3.2.ja
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-annotati
hibernate-entitymanager.ja
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.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
org.springframework.integr
persistence-api-1.0.jar
policy.jar
PSOCMITLPEWDevSecurityKey.
resolver.jar
richfaces-components-api-4
richfaces-components-ui-4.
richfaces-core-api-4.1.0.F
richfaces-core-impl-4.1.0.
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.j
V4_2_JDK1_5_CMITSecurityIn
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
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.
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.
ASKER
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!
@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!
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.Be anCreation Exception: Error creating bean with name 'org.springframework.integ ration.con fig.Consum erEndpoint FactoryBea n#0': Cannot resolve reference to bean 'org.springframework.integ ration.han dler.Messa geHandlerC hain#1' while setting bean property 'handler'; nested exception is org.springframework.beans. factory.Be anCreation Exception: Error creating bean with name 'org.springframework.integ ration.han dler.Messa geHandlerC hain#1': Cannot resolve reference to bean 'org.springframework.integ ration.han dler.Servi ceActivati ngHandler# 0' while setting bean property 'handlers' with key [1]; nested exception is org.springframework.beans. factory.Be anCreation Exception: Error creating bean with name 'org.springframework.integ ration.han dler.Servi ceActivati ngHandler# 0': Cannot resolve reference to bean 'engineeringService' while setting constructor argument; nested exception is org.springframework.beans. factory.Be anCreation Exception: Error creating bean with name 'engineeringService' defined in class path resource [resources//lpew-integrati on.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans. factory.Be anCreation Exception: 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.Be anCreation Exception: 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.NoClassDefFoundE rror: LOrdering;
at org.springframework.beans. factory.su pport.Bean Definition ValueResol ver.resolv eReference (BeanDefin itionValue Resolver.j ava:275)
at org.springframework.beans. factory.su pport.Bean Definition ValueResol ver.resolv eValueIfNe cessary(Be anDefiniti onValueRes olver.java :104)
at org.springframework.beans. factory.su pport.Abst ractAutowi reCapableB eanFactory .applyProp ertyValues (AbstractA utowireCap ableBeanFa ctory.java :1245)
at org.springframework.beans. factory.su pport.Abst ractAutowi reCapableB eanFactory .populateB ean(Abstra ctAutowire CapableBea nFactory.j ava:1010)
at org.springframework.beans. factory.su pport.Abst ractAutowi reCapableB eanFactory .doCreateB ean(Abstra ctAutowire CapableBea nFactory.j ava:472)
at org.springframework.beans. factory.su pport.Abst ractAutowi reCapableB eanFactory $1.run(Abs tractAutow ireCapable BeanFactor y.java:409 )
at java.security.AccessContro ller.doPri vileged(Na tive Method)
at org.springframework.beans. factory.su pport.Abst ractAutowi reCapableB eanFactory .createBea n(Abstract AutowireCa pableBeanF actory.jav a:380)
at org.springframework.beans. factory.su pport.Abst ractBeanFa ctory$1.ge tObject(Ab stractBean Factory.ja va:264)
at org.springframework.beans. factory.su pport.Defa ultSinglet onBeanRegi stry.getSi ngleton(De faultSingl etonBeanRe gistry.jav a:222)
at org.springframework.beans. factory.su pport.Abst ractBeanFa ctory.doGe tBean(Abst ractBeanFa ctory.java :261)
at org.springframework.beans. factory.su pport.Abst ractBeanFa ctory.getB ean(Abstra ctBeanFact ory.java:1 85)
at org.springframework.beans. factory.su pport.Abst ractBeanFa ctory.getB ean(Abstra ctBeanFact ory.java:1 64)
at org.springframework.beans. factory.su pport.Defa ultListabl eBeanFacto ry.getBean sOfType(De faultLista bleBeanFac tory.java: 308)
at org.springframework.contex t.support. AbstractAp plicationC ontext.get BeansOfTyp e(Abstract Applicatio nContext.j ava:947)
at org.springframework.contex t.support. AbstractAp plicationC ontext.reg isterListe ners(Abstr actApplica tionContex t.java:701 )
at org.springframework.contex t.support. AbstractAp plicationC ontext.ref resh(Abstr actApplica tionContex t.java:377 )
at org.springframework.web.co ntext.Cont extLoader. createWebA pplication Context(Co ntextLoade r.java:255 )
at org.springframework.web.co ntext.Cont extLoader. initWebApp licationCo ntext(Cont extLoader. java:199)
at org.springframework.web.co ntext.Cont extLoaderL istener.co ntextIniti alized(Con textLoader Listener.j ava:45)
at org.apache.catalina.core.S tandardCon text.liste nerStart(S tandardCon text.java: 4723)
at org.apache.catalina.core.S tandardCon text$1.cal l(Standard Context.ja va:5226)
at org.apache.catalina.core.S tandardCon text$1.cal l(Standard Context.ja va:5221)
at java.util.concurrent.Futur eTask$Sync .innerRun( FutureTask .java:303)
at java.util.concurrent.Futur eTask.run( FutureTask .java:138)
at java.util.concurrent.Threa dPoolExecu tor$Worker .runTask(T hreadPoolE xecutor.ja va:886)
at java.util.concurrent.Threa dPoolExecu tor$Worker .run(Threa dPoolExecu tor.java:9 08)
at java.lang.Thread.run(Threa d.java:662 )
Caused by: org.springframework.beans. factory.Be anCreation Exception: Error creating bean with name 'org.springframework.integ ration.han dler.Messa geHandlerC hain#1': Cannot resolve reference to bean 'org.springframework.integ ration.han dler.Servi ceActivati ngHandler# 0' while setting bean property 'handlers' with key [1]; nested exception is org.springframework.beans. factory.Be anCreation Exception: Error creating bean with name 'org.springframework.integ ration.han dler.Servi ceActivati ngHandler# 0': Cannot resolve reference to bean 'engineeringService' while setting constructor argument; nested exception is org.springframework.beans. factory.Be anCreation Exception: Error creating bean with name 'engineeringService' defined in class path resource [resources//lpew-integrati on.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans. factory.Be anCreation Exception: 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.Be anCreation Exception: 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.NoClassDefFoundE rror: LOrdering;
at org.springframework.beans. factory.su pport.Bean Definition ValueResol ver.resolv eReference (BeanDefin itionValue Resolver.j ava: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.
Your server log exceptions like this:
--------------------------
INFO: Initializing Spring root WebApplicationContext
[Thread-2] ERROR Context initialization failed (context.ContextLoader)
org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at java.security.AccessContro
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.beans.
at org.springframework.contex
at org.springframework.contex
at org.springframework.contex
at org.springframework.web.co
at org.springframework.web.co
at org.springframework.web.co
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at org.apache.catalina.core.S
at java.util.concurrent.Futur
at java.util.concurrent.Futur
at java.util.concurrent.Threa
at java.util.concurrent.Threa
at java.lang.Thread.run(Threa
Caused by: org.springframework.beans.
at org.springframework.beans.
[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.
ASKER
@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!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Congrats on getting it working. If you had followed my advice above, you also would have gotten it working.
ASKER
A colleague in work helped me solve the issue.
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