velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Epheser <matthias.ephe...@gmx.at>
Subject classpath problem with ResourceManager and JUnit
Date Mon, 05 Nov 2007 15:12:06 GMT
Hi list,

I'm currently implementing a velocity integration into the source 
generation process of the castor framework (www.castor.org). So I 
generate java POJOs out a xml schema.

The castor framework includes a testsuite that uses an embedded junit 
runner. I encouter a very strange classpath issue here:

- running the testsuite in textmode (using junit.textui.TestRunner), 
everything works fine as expected

- running the testsuite in swing mode (using 
junit.swingui.TestRunner), I get the following exception during Velocity 
init:

[error] The specified class for ResourceManager 
(org.apache.velocity.runtime.resource.ResourceManagerImpl) does not 
implement org.apache.velocity.runtime.resource.ResourceManager; Velocity 
is not initialized correctly.
java.lang.Exception: The specified class for ResourceManager 
(org.apache.velocity.runtime.resource.ResourceManagerImpl) does not 
implement org.apache.velocity.runtime.resource.ResourceManager; Velocity 
is not initialized correctly.
         at 
org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:589)
         at 
org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:241)
         at 
org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:113)
         at org.apache.velocity.app.Velocity.init(Velocity.java:83)


The only difference between both executions is the TestRunner class, 
everything else (classpath, used jars etc.) is exactly the same..

Has someone stepped over a similar problem?

Regards
matthias


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


Mime
View raw message