Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Problem with script inside Report Set Name field #2838

eciu ·
Hi,

So I'm trying to get a dynamic name for junit report publish task. I've writen following script inside the field 'Report Set Name':

${util.readFileAsString(util.getFile("D:/somefolder/somefile.txt"))}


Problem is whenever this script is inside the field I keep getting "IllegalStateException" error in Publish Junit Report task, but the content of the file is correctly readed and included into report (but the report itself is not created).

here is the error log. Any ideas what do I do wrong ?

14:01:46,922 ERROR - Step 'master>Publish Junit Report' is failed.
java.lang.IllegalStateException
at com.google.common.base.Preconditions.checkState(Preconditions.java:133)
at com.pmease.quickbuild.plugin.report.engine.contribution.publisher.BuildReportPublisher$ChecksumJob.execute(BuildReportPublisher.java:299)
at com.pmease.quickbuild.grid.GridNode.executeJob(GridNode.java:448)
at com.pmease.quickbuild.plugin.report.engine.contribution.publisher.BuildReportPublisher.transferFiles(BuildReportPublisher.java:252)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$d2ce626c.CGLIB$transferFiles$16(<generated>)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$d2ce626c$$FastClassByCGLIB$$c0d84bbb.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:269)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$d2ce626c.transferFiles(<generated>)
at com.pmease.quickbuild.plugin.report.engine.contribution.publisher.AbstractPublisher.run(AbstractPublisher.java:139)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$d2ce626c.CGLIB$run$30(<generated>)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$d2ce626c$$FastClassByCGLIB$$c0d84bbb.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:269)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$d2ce626c.run(<generated>)
at com.pmease.quickbuild.stepsupport.Step.execute(Step.java:501)
at com.pmease.quickbuild.stepsupport.StepExecutionJob.executeStepAwareJob(StepExecutionJob.java:30)
at com.pmease.quickbuild.stepsupport.StepAwareJob.executeBuildAwareJob(StepAwareJob.java:47)
at com.pmease.quickbuild.BuildAwareJob.execute(BuildAwareJob.java:61)
at com.pmease.quickbuild.grid.GridJob.run(GridJob.java:78)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
  • replies 12
  • views 3684
  • stars 0
steveluo ADMIN ·
Hi,

What is your QuickBuild version?
eciu ·
It's 5.0.19 . I've just updated to 5.1.28 and problems seems to be peristant.


10:00:39,766 ERROR - Step 'master>Publish Junit Report' is failed.
java.lang.IllegalStateException
at com.google.common.base.Preconditions.checkState(Preconditions.java:133)
at com.pmease.quickbuild.plugin.report.engine.contribution.publisher.BuildReportPublisher$ChecksumJob.execute(BuildReportPublisher.java:305)
at com.pmease.quickbuild.grid.GridNode.executeJob(GridNode.java:452)
at com.pmease.quickbuild.plugin.report.engine.contribution.publisher.BuildReportPublisher.transferFiles(BuildReportPublisher.java:258)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$fbd1d0f7.CGLIB$transferFiles$16(<generated>)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$fbd1d0f7$$FastClassByCGLIB$$7ab2bb48.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:273)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$fbd1d0f7.transferFiles(<generated>)
at com.pmease.quickbuild.plugin.report.engine.contribution.publisher.AbstractPublisher.run(AbstractPublisher.java:139)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$fbd1d0f7.CGLIB$run$31(<generated>)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$fbd1d0f7$$FastClassByCGLIB$$7ab2bb48.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:273)
at com.pmease.quickbuild.plugin.report.junit.JUnitPublisher$$EnhancerByCGLIB$$fbd1d0f7.run(<generated>)
at com.pmease.quickbuild.stepsupport.Step.execute(Step.java:539)
at com.pmease.quickbuild.stepsupport.StepExecutionJob.executeStepAwareJob(StepExecutionJob.java:30)
at com.pmease.quickbuild.stepsupport.StepAwareJob.executeBuildAwareJob(StepAwareJob.java:45)
at com.pmease.quickbuild.BuildAwareJob.execute(BuildAwareJob.java:60)
at com.pmease.quickbuild.grid.GridJob.run(GridJob.java:73)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
steveluo ADMIN ·
Is this error occurred on every configuration or just one configuration? Is this error occurred every time or just a few time? Please go to the directory:

${you-data-dir}/builds/${build-id-with-error}/reports/junit

and check whether there is any junit.h2.db file.
eciu ·
This problem occurs every time I use configuratino with this line. I'm currently running only one configuration. There is junit.h2.db file in said (problematic) builds.
I thought that this may be becouse of quite lengthy name being copied from the file, but it also crashes whenever file contains only 3 chars.
steveluo ADMIN ·
Can you publish the JUnit successfully if you don't use the report set name field?
Would you mind send your database backup to me (steve at pmease)?
eciu ·
Yes I can publish Junit successfully if I dont try to read content of the file and use it as a report set name (if I for example use calendar.year it works fine o0).

Do you need full database or only this junit.db ? (btw. I'm still using embedded database on this station ).
steveluo ADMIN ·
You can go to Administration -> Database Backup to backup your database and then send the backup to me.

Before you send the backup, I want to know what is the content in your external file you want to populate the Report Set Name field?
eciu ·
Content of the file is a some version of hardware which is being used (is a bit lengthy but not to much, about 100 chars).
steveluo ADMIN ·
How about change your file content to foobar and see whether this can work?
eciu ·
Already did that.
steveluo ADMIN ·
Please send me (steve at pmease) the database backup and the file you were trying to read as well.
steveluo ADMIN ·
Hi,

Thank you for sending me the files. Now I can reproduce the issue, the cause of this issue is that the string in produceVersion.txt contains several spaces at the end of line, so the workaround is trim the space first like below:

${util.readFileAsString(util.getFile("D:/somefolder/somefile.txt”)).trim()}


I have also created the issue below and will get it fixed in next patch release:

http://track.pmease.com/browse/QB-2112