hwellmann / jeeunit

Automatically exported from code.google.com/p/jeeunit
Other
0 stars 1 forks source link

Error on maven multi module #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I run build on my Continuous Integration (Jenkins and Maven 3.1).
I obtain this error:
java.lang.RuntimeException: java.io.FileNotFoundException: /tmp/beans.xml (No 
such file or directory)
    at com.googlecode.jeeunit.glassfish.EmbeddedGlassfishContainer.autodeploy(EmbeddedGlassfishContainer.java:292)
    at com.googlecode.jeeunit.glassfish.EmbeddedGlassfishLauncher.autodeploy(EmbeddedGlassfishLauncher.java:55)
    at com.googlecode.jeeunit.JeeunitRunner.<init>(JeeunitRunner.java:63)
    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.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
    at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
    at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:51)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
    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.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
Caused by: java.io.FileNotFoundException: /tmp/beans.xml (No such file or 
directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at org.glassfish.embeddable.archive.Assembler.transferFile(Assembler.java:233)
    at org.glassfish.embeddable.archive.Assembler.tranferFile(Assembler.java:219)
    at org.glassfish.embeddable.archive.Assembler.assembleWAR(Assembler.java:117)
    at org.glassfish.embeddable.archive.Assembler.assemble(Assembler.java:71)
    at org.glassfish.embeddable.archive.ScatteredArchive.toURI(ScatteredArchive.java:386)
    at com.googlecode.jeeunit.glassfish.EmbeddedGlassfishContainer.buildWar(EmbeddedGlassfishContainer.java:225)
    at com.googlecode.jeeunit.glassfish.EmbeddedGlassfishContainer.autodeploy(EmbeddedGlassfishContainer.java:285)

If i run build module by module, I have no error.

Is it possible to create bean.xml on target module or to generate this file on 
unique directory by build?

Original issue reported on code.google.com by sebg...@gmail.com on 25 Aug 2011 at 3:10

GoogleCodeExporter commented 9 years ago
Hmm, looks like the problem is not the multi-module build but multiple build 
jobs running in parallel on Jenkins.

Anyway, a global temp directory is bound to cause problems with parallel tests. 
I'll use a unique ID instead. Thanks for spotting this!

Original comment by hwellman...@gmail.com on 27 Aug 2011 at 5:16

GoogleCodeExporter commented 9 years ago

Original comment by hwellman...@gmail.com on 29 Aug 2011 at 9:06

GoogleCodeExporter commented 9 years ago
Hello,

If i have on error on glassfish start (before running test method), the tmp dir 
for glassfish is not deleted.

Original comment by sebg...@gmail.com on 25 Jan 2012 at 9:12

GoogleCodeExporter commented 9 years ago
The container has a shutdown hook which deletes the temp directory. I suppose 
the problem in your case is an exception in the shutdown() invocation because 
GlassFish did not get started. 

I'll take a look at the exception handling...

Original comment by hwellman...@gmail.com on 25 Jan 2012 at 9:51