Skip to main content

[Hudson-Dev] Re: Hudson-bundled Maven 3- build failure

  • From: Stuart McCulloch <mcculls@...>
  • To: Mary S Michael <marysowdha@...>
  • Cc: Hudson Developers <dev@...>, "karthigayan@..." <karthigayan@...>
  • Subject: [Hudson-Dev] Re: Hudson-bundled Maven 3- build failure
  • Date: Wed, 21 Dec 2011 00:05:48 +0000

On 20 Dec 2011, at 23:55, Mary S Michael wrote:
Stuart,

I get the same error when running Maven 3.0.3 from the command Line too. But the build succeeds.

Something else to check is the surefire report, in case the true cause of the test failure turns out to be unrelated to the exception displayed on the console (since it always occurs regardless of the job type).

We don't set any additional properties to skip any tests. 

Will file an internal bug for the fileNotFound exception. But Hudons-bundled maven failing the builds is blocking us migrating from the Build a Maven 2/3 project (Legacy) project types.

Given the same exception occurs on the command-line I think it might be a red-herring. We really need to see the (sanitized) surefire report from the CI machine to confirm the exact reason why surefire marked that test as FAILURE when running there, when the same surefire plugin marks it as PASSED on the local machine.

Thanks
Mary


From: Stuart McCulloch <mcculls@...>
To: Mary S Michael <marysowdha@...>
Cc: Hudson Developers <dev@...>; "karthigayan@..." <karthigayan@...>
Sent: Tuesday, December 20, 2011 1:02 PM
Subject: Re: Hudson-bundled Maven 3- build failure

On 20 Dec 2011, at 20:45, Mary S Michael wrote:

Hello Stuart,

We are trying to get rid off the project types -Build a Maven 2/3 project (Legacy)

While doing so, either choosing Build a free-style software project + Maven3 OR Build multi-configuration project+ Maven3 makes the build fail.

Note: When choosing Maven 2 (legacy) we inturn refer it to use Maven 3.0.2 and the build completes successfully. Also if I build the same project using an external Maven 3, the build completes successfully.

Something is wrong with the Hudson-integrated Maven3 and I get the following issue.  Below error was seen when using Maven 3(external) and Maven 2 (legacy) builds ALSO but build is declared FAILED with the same error in hudson-bundled Maven 3 build.

Hi Mary,

Can you attach the output when you run the same project from the command-line using Maven 3.0.3? (This is the version currently bundled in Hudson)

Do you also set any additional properties (such as -Dmaven.test.failure.ignore) in your legacy project configuration or in the command-line environment (env) ?

Looking at the stack trace below, I would expect this to be reported as a failure - so if you do see this exception with M2 I'd say it's more a bug in the legacy project type to mark the build as PASSED.

I would also suggest looking into the root cause of the FileNotFoundException from Log4J - it might just be a misconfiguration or a missing system property / environment variable.

--
Cheers, Stuart

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.XXXX.XXXX.XXXX.XXXX
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.023 sec
Running com.XXXX.XXXX.XXXX.XXXX.XXXXXXXXXXX
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /logs/.XXXXXXX.log (No such file or directory)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
    at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:194)
    at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:164)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97)
    at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689)
    at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
    at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
    at org.apache.log4j.Logger.getLogger(Logger.java:105)
    at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)
    at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:109)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1116)
    at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:914)
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:310)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
    at org.springframework.mock.web.MockServletContext.<init>(MockServletContext.java:85)
    at org.springframework.mock.web.MockServletContext.<init>(MockServletContext.java:110)
    at com.XXXX.XXXX.XXXXX.XXXXXX.<init>(XXXXXX.java:33)
    at com.XXXX.XXXX.XXXXX.XXXXXX.<init>(XXXXXX.java:20)
    at com.XXXX.XXXX.XXXXX.XXXXXX.<init>(XXXXXX.java:28)
    at com.XXXX.XXXX.XXXXX.XXXXXXX(XXXXXXX.java:34)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:115)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
    at $Proxy0.invoke(Unknown Source)
    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150)
    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.377 sec <<< FAILURE!

Thanks
Mary






[Hudson-Dev] Hudson-bundled Maven 3- build failure

Mary S Michael 12/20/2011

[Hudson-Dev] Re: Hudson-bundled Maven 3- build failure

Stuart McCulloch 12/20/2011

[Hudson-Dev] Re: Hudson-bundled Maven 3- build failure

Mary S Michael 12/20/2011

[Hudson-Dev] Re: Hudson-bundled Maven 3- build failure

Stuart McCulloch 12/21/2011
 
 
Close
loading
Please Confirm
Close