Hi all,
Using the maven plugin for Cactus, I am getting this error message:
Testsuite:
com.upstate.customerservice.creditcards.service.TestCreditCardTransactionSer
vice
Tests run: 3, Failures: 0, Errors: 3, Time elapsed: 0.156 sec
Testcase: testPropertiesSetForCreditCardService took 0.078 sec
Caused an ERROR
Missing Cactus property [cactus.contextURL]
org.apache.cactus.util.ChainedRuntimeException: Missing Cactus property
[cactus.contextURL]
at
org.apache.cactus.util.Configuration.getContextURL(Configuration.java:185)
at
org.apache.cactus.util.ServletConfiguration.getServletRedirectorURL(ServletC
onfiguration.java:94)
at
org.apache.cactus.client.ServletHttpClient.getRedirectorURL(ServletHttpClien
t.java:87)
at
org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClient.j
ava;org/apache/cactus/util/log/LogAspect.aj(1k):184)
at
org.apache.cactus.client.AbstractHttpClient.dispatch2_doTest(AbstractHttpCli
ent.java;org/apache/cactus/util/log/LogAspect.aj(1k):109)
at
org.apache.cactus.client.AbstractHttpClient.around2_doTest(AbstractHttpClien
t.java;org/apache/cactus/util/log/LogAspect.aj(1k):1236)
at
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.java;o
rg/apache/cactus/util/log/LogAspect.aj(1k):104)
at
org.apache.cactus.AbstractWebTestCase.runGenericTest(AbstractWebTestCase.jav
a:260)
at
org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:133)
at
org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:195)
However, what is odd is that on the same machine, another project using the
maven plugin works fine! Not sure what the difference could be. I did a
diff of both /cactus directories, and aside from app specific differences,
everything is the same, including the various cactus files. I did check,
and cactus.contextURL is specified in
/target/cactus/resources/cactus.properties file. This is against Tomcat
4.1.16..
# Web app Context under which our application to test runs
cactus.contextURL = http://localhost:8080/test
Also, I am not specifing any web.xml, so the plugin is using the default
included web.xml.
Scratching my head,
Eric Pugh