velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Brisson <cla...@renegat.net>
Subject Re: classpath problem with ResourceManager and JUnit
Date Mon, 05 Nov 2007 16:20:44 GMT
Have you checked that there isn't any older version of Velocity
somewhere in the classpath that junit swing gui is using?

What happens for instance if you put your velocity jar first in the
classpath?


  Claude

Le lundi 05 novembre 2007 à 16:12 +0100, Matthias Epheser a écrit :
> 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
> 


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


Mime
View raw message