You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Fabian Hagen <ha...@hotmail.com> on 2007/01/04 14:35:00 UTC

Missing Cactus property

Hello,

I've recently downloaded cactus and trying to integrate it in my project. 
But if I'd like to start the test it prints out the following error:



testCase1(com.ubs.swidBOB.v5.batch.basel2.RealEstateServiceTest)org.apache.cactus.util.ChainedRuntimeException: 
Missing Cactus property [cactus.contextURL]
	at 
org.apache.cactus.internal.configuration.BaseConfiguration.getContextURL(BaseConfiguration.java:59)
	at 
org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL_aroundBody0(AbstractWebConfiguration.java:46)
	at 
org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL_aroundBody1$advice(AbstractWebConfiguration.java:306)
	at 
org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL(AbstractWebConfiguration.java)
	at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callRunTest(DefaultHttpClient.java:159)
	at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:80)
	at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
	at 
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
	at 
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
	at 
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
	at 
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
	at 
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
	at 
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
	at 
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
	at 
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
	at 
com.ubs.swidBOB.v5.batch.basel2.RealEstateServiceTest.main(RealEstateServiceTest.java:102)



I've already found a thread, that contains a solution for this problem, but 
it doesn't aid me...
"My" cactus.properties lies in the rootfolder of the javaclient project. The 
contextroot is that one from the WebProject (serverside).

Thanks for helping in advance!


Fabian Hagen

_________________________________________________________________
Was halten Sie von einer Seite, die all Ihre Lieblingsthemen beinhaltet? 
http://ch.msn.com/


Re: Missing Cactus property

Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Fabian,

In article <BA...@phx.gbl>,
Thu, 04 Jan 2007 14:35:00 +0100,
"Fabian Hagen" <ha...@hotmail.com> wrote: 
haege_10> But if I'd like to start the test it prints out the following error:
haege_10> 
haege_10> testCase1(com.ubs.swidBOB.v5.batch.basel2.RealEstateServiceTest)org.apache.cactus.util.ChainedRuntimeException: 
haege_10> Missing Cactus property [cactus.contextURL]
haege_10> 	at 
haege_10> org.apache.cactus.internal.configuration.BaseConfiguration.getContextURL(BaseConfiguration.java:59)
[snip]
haege_10> 	at 
haege_10> org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
haege_10> 	at 
haege_10> com.ubs.swidBOB.v5.batch.basel2.RealEstateServiceTest.main(RealEstateServiceTest.java:102)
haege_10> 
haege_10> 
haege_10> I've already found a thread, that contains a solution for this problem, but 
haege_10> it doesn't aid me...
haege_10> "My" cactus.properties lies in the rootfolder of the javaclient project. The 
haege_10> contextroot is that one from the WebProject (serverside).

First of all, cactus.properties should be located in the classpath
of the JVM which calls the main method.
The classpath may not contain the rootfolder.

Next, you should ensure that cactus.properties file contains
an entry of cactus.contextURL such as follows:
	  cactus.contextURL = http://localhost:8080/somewhere

These conditions should be met.
Then you will go to the next step.

Hope this helps,
----
Kazuhito SUGURI