Hi Ravi,

A quick google ( searched for "hudson java.lang.NoClassDefFoundError:
org/apache/log4j/Category") suggests it's an issue with Maven and
Hudson, rather than JBehave. I'm not familiar with Maven (that's
Mauro's baby!) but see if this helps:

http://www.nabble.com/Re:-Hudson-%3EMaven-%3EJetty-%3D%3D-java.lang.NoClassDefFoundError:-org-apache-log4j-Category-p20735055.html

Hope you manage to fix the problem! Please let us know if this does
turn out to be a JBehave issue after all.

Cheers,
Liz.

On Wed, Oct 28, 2009 at 9:18 PM, Ravi Varanasi <ravi...@gmail.com> wrote:
> I have configured a maven build to run the scenarios inside hudson using the
> jbehave maven plugin. I have provided a constructor for the scenario to take a
> ClassLoader. The scenarios run fine when running from command line. However,
> when running it from inside hudson get an error -
>
> Below is the exception :
> org.apache.commons.logging.LogConfigurationException:
> org.apache.commons.logging.LogConfigurationException: No suitable Log
> constructor [Ljava.lang.Class;@487113 for
> org.apache.commons.logging.impl.Log4JLogger (Caused by
> java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by
> org.apache.commons.logging.LogConfigurationException: No suitable Log
> constructor [Ljava.lang.Class;@487113 for
> org.apache.commons.logging.impl.Log4JLogger (Caused by
> java.lang.NoClassDefFoundError: org/apache/log4j/Category))
>
>
> Things Tried:
> 1. Tried to use the commons logging api instead of using commons logging
> (conflict between commons logging and log4j).
> 2.Use the same version of commons logging in hudson installation and the one
> used by the application.
> 3. Move commons logging api to common/lib directory as per this page
> (http://www.qos.ch/logging/classloader.jsp)
>
>
> Code in Scenario class :
> public MyScenario extends Scenario {
>
>  public MyScenario(final ClassLoader loader){
>  super(new MostUsefulConfiguration() {
>            public ScenarioReporter forReportingScenarios() {
>                return new PrintStreamScenarioReporter();
>            }
>        }, new Steps());
> }
>
> I would appreciate any pointers/feedback.
>
> Ravi
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



-- 
Elizabeth Keogh
l...@lunivore.com
http://lizkeogh.com
http://jbehave.org

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to