You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Mark Lybarger <Ma...@CBC-Companies.com> on 2003/04/08 16:12:45 UTC

TurbineConfig in a junit test case

I'm tring to use the TurbineConfig in a junit test case.  I see the
following error when i run. I 've searched the archives, but don't see a
resolution for this.  

NOTICE: init
log4j:ERROR No appenders could be found for category (system).
log4j:ERROR Please initialize the log4j system properly.
java.lang.Error: VelocityService runtime log file is misconfigured: 'null'
is not a valid log file: TurbineConfig users must use a path relative to web
application root
	at
org.apache.turbine.services.velocity.TurbineVelocityService.initVelocity(Unk
nown Source)
	at
org.apache.turbine.services.velocity.TurbineVelocityService.init(Unknown
Source)
	at org.apache.turbine.services.TurbineBaseService.init(Unknown
Source)
	at org.apache.turbine.services.BaseInitableBroker.initClass(Unknown
Source)
	at
org.apache.turbine.services.BaseServiceBroker.doInitService(Unknown Source)
	at
org.apache.turbine.services.BaseServiceBroker.initServices(Unknown Source)
	at org.apache.turbine.Turbine.init(Unknown Source)
	at org.apache.turbine.util.TurbineConfig.init(Unknown Source)
	at
com.cbc.isac.ejb20.acdv.util.ACDVTestCase.<clinit>(ACDVTestCase.java:40)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
	at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
	at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
	at junit.framework.TestSuite.createTest(TestSuite.java:135)
	at junit.framework.TestSuite.addTestMethod(TestSuite.java:114)
	at junit.framework.TestSuite.<init>(TestSuite.java:75)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.getTest(RemoteTestRun
ner.java:331)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:369)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:276)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:167)

Here's the code that attempts to initialize the TurbineConfig:

	static
	{
		try
		{
	   config = new TurbineConfig(
"./Source/","/WEB-INF/conf/TurbineResources.properties" );
	   config.init();
		}
		catch (Exception e)
		{
			fail(StringUtils.stackTrace(e));
		}
	}

My system is setup as:
	c:\myProject\myProjectV4\Source\WEB-INV\conf\ and I'm using Eclipse
to interactively run the tests.  Hopefully this will be integrated in our
build.xml file later on.  

Any suggestions/ideas on how to resolve this?

Mark Lybarger
Mark.Lybarger@cbc-companies.com
CBC Companies
614.442.3741

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
 

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org