This blog is mainly about Java...

Tuesday, August 4, 2009

Wicket error in Seam test

The Problem

Recently we upgrade to Seam 2.1.x and suddenly our testng test using ant failed with the following message:
No wicket components directory specified to give Seam super powers to
Wicket was added to Seam 2.1.0.BETA1.
This error message doesn't really say anything. Also it said further:
Must set application-class using  in components.xml 

But we where not using wicket and didnt want to add it.

The stacktrace was as following:
WARN  [org.jboss.seam.wicket.web.WicketFilterInstantiator] No wicket components directory specified to give Seam super powers to
[testng] FAILED: getDefaultContacts
[testng] java.lang.IllegalStateException: Must set application-class using in components.xml
[testng] at org.jboss.seam.wicket.web.WicketFilterInstantiator$1.init(WicketFilterInstantiator.java:107)
[testng] at org.jboss.seam.web.WicketFilter.doFilter(WicketFilter.java:124)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
[testng] at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
[testng] at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
[testng] at org.jboss.seam.mock.AbstractSeamTest$Request.run(AbstractSeamTest.java:491)
[testng] at no.whatever.test.AddressBookTest.getDefaultContacts(AddressBookTest.java:18)
[testng] ... Removed 22 stack frames
[testng] FAILED: setup

The Solution


It seems like ant will just put all the libraries in the lib folder in the classpath, and eclipse obviously would not. Thus, when the wicket jars where removed, the tests where back online. I believe it is sufficient to remove jboss-seam-wicket.jar and jboss-seam-wicket-ant.jar, however I just removed all jars that included the name wicket.

No comments:

Labels