I've configured test code coverage build but it doesn't compile with can't find RhinoException error

I've configured test code coverage build but it doesn't compile with "can't find RhinoException" error:

C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE\dev\Server\RestoServer\src.test\resto\syntax\TestJavascriptSyntax.java:14: package sun.org.mozilla.javascript.internal does not exist

import sun.org.mozilla.javascript.internal.RhinoException;
^

I use JDK 1.6 so its strange that compiler can't find RhinoException. I've attached full log of the failed build.



Attachment(s):
RMS_Server_Test_Coverage_21543.log
10 comments
Comment actions Permalink

Hello Den,

  Does your build work if you disable code coverage?
 
  Unfortunately, we have known issues with EMMA code coverage under JDK 1.6, but it doesn't seem your case: http://jetbrains.net/tracker/issue/TW-4935

  Regards,
  KIR

0
Comment actions Permalink

I disabled code coverage and got the same problem. So EMMA isn't problem cause. But I can comple my ipr in IDEA without any problems. What could be wrong with my build settings?

0
Comment actions Permalink

Hi,

  Are you sure that sun.org.mozilla.javascript.internal.RhinoException is available in your classpath on the build agent?

  You may need to alter JDK definition on IPR runner settings page to include required jar file to project JDK settings, if this class is kept in unusual place.
 
  By default, TeamCity includes JDK jars under jdk_home/jre/lib/*.jar , but this can be changed on IPR runner settings page.

  Regards,
  KIR

0
Comment actions Permalink

I've rechecked location of rt.jar. It is at usual place: C:\Dev\Java\jdk1.6.0_06\jre\lib\rt.jar

JDK Home are configured at build as: %env.JAVA_HOME%,  JDK Jar Files Patterns as: jre/lib/*.jar

At agent side: JAVA_HOME=C:\Dev\Java\jdk1.6.0_06

0
Comment actions Permalink

Hello Den,

  Please ensure that rt.jar on the build agent contains RhinoException class in the same package as specified in the source code.
  I suspect that this class may change its location.

  Do you use the same JDK version locally and on build agent?

  Regards,
  KIR

0
Comment actions Permalink

I've rechecked thath rt.jar contains nesscesary exception. All is ok there.

I've also tried to build my project sources via ant file at agent using the same JDK and it compiled sucessfully. I've tried to compile generated integrationBuild.xml at agent but get


C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE>ant -f integrationBuild.xml
Buildfile: integrationBuild.xml

prepare.extensions:

BUILD FAILED
C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE\integrationBuild.xml:947: taskdef class com.pme.InnerCall cannot be found

Where can I found com.pme.InnerCall task?



0
Comment actions Permalink

I've tried to configure test code coverage build using my build.xml, but get (detailed log attached):

[12:24:53]: echo
[12:24:53]: [echo] Building Resto, default edition, v 21677.1233739493511
[12:24:55]: taskdef
[12:24:55]: [taskdef] taskdef A class needed by class resto.ant.MergeWebXML cannot be found: com/vladium/emma/rt/RT
[12:24:59]: Ant output:
C:\Dev\Java\jdk1.6.0_06\bin\java.exe "-Dteamcity.buildConfName=Server Test Coverage" -Dagent.home.dir=C:\Dev\TeamCity\BuildAgent -DDotNetFramework1.1_Path=c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 -DDotNetFramework3.0= -Dbuild.number=21677 -Dteamcity.dotnet.nunitlauncher2.0=C:\Dev\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe -Duser.language=ru -Dos.version=5.1 -DDotNetFramework3.0_x86= -Dfile.encoding=Cp1251 -Dteamcity.projectName=RMS -DDotNetFramework2.0_x86_Path=c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 -Dteamcity.dotnet.nunitlauncher2.0.vsts=C:\Dev\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe -DDotNetFramework2.0_Path=c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 "-DWindowsSDK6.0A_Path=C:\Program Files\Microsoft SDKs\Windows\v6.0A" -Dteamcity.dotnet.coveragelauncher=C:\Dev\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\TeamCityRunners\JetBrains.dotTrace.TeamCity.CoverageRunner.exe -Djava.io.tmpdir=C:\Dev\TeamCity\BuildAgent\temp\buildTmp -Dteamcity.dotnet.nunitlauncher=C:\Dev\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe -Duser.name=build -Dant.task.extensions=jetbrains.buildServer.agent.ant.CompilerAntExtension,jetbrains.buildServer.agent.ant.EchoAntExtension,jetbrains.buildServer.agent.ant.JUnitFirstTestsToRunExtension,jetbrains.buildServer.coverage.AntCoverageAdapter,jetbrains.buildServer.testng.TestNGTaskExtension,jetbrains.buildServer.testng.TestNGFirstTestsToRunExtension, -DDotNetFramework3.5_Path=c:\WINDOWS\Microsoft.NET\Framework\v3.5 "-Dteamcity.version=4.0 (build 8080)" -DDotNetFramework3.0_Path=c:\WINDOWS\Microsoft.NET\Framework\v3.0 -Dteamcity.auth.password=XUmh4bJi4j8N5nMXb0th1AjJ3jx1dlMT -Dteamcity.build.checkoutDir=C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE -DDotNetFramework3.5= -Dteamcity.buildType.id=bt35 "-DMSTest.9.0=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" -Dteamcity.dotnet.nunitlauncher1.1=C:\Dev\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe -Duser.variant= "-DWindowsSDK6.0_Path=C:\Program Files\Microsoft SDKs\Windows\v6.0A" -Dagent.classpath=C:/Dev/TeamCity/BuildAgent/lib/common-api.jar;C:/Dev/TeamCity/BuildAgent/plugins/coveragePlugin/lib/coverageAgentRuntime.jar;C:/Dev/TeamCity/BuildAgent/lib/xmlrpc-2.0.1.jar;C:/Dev/TeamCity/BuildAgent/lib/commons-codec-1.3.jar;C:/Dev/TeamCity/BuildAgent/lib/server-logging.jar;C:/Dev/TeamCity/BuildAgent/plugins/antPlugin/lib/buildServerAntServerLogging.jar;C:/Dev/TeamCity/BuildAgent/plugins/testNGPlugin/lib/testNGAntExtension.jar;C:/Dev/TeamCity/BuildAgent/lib/xpp3_min-1.1.3.4.M.jar;C:/Dev/TeamCity/BuildAgent/plugins/coveragePlugin/lib/emma.jar;C:/Dev/TeamCity/BuildAgent/lib/xstream-1.2.1.jar -Dteamcity.dotnet.nunitlauncher.msbuild.task=C:\Dev\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll -DDotNetFramework3.5_x86_Path=c:\WINDOWS\Microsoft.NET\Framework\v3.5 -Didea.build.server.build.id=9993 -Dant.home=c:\Dev\TeamCity\BuildAgent\bin\..\plugins\ant -Dpath.separator=; -Dteamcity.build.properties.file=C:\Dev\TeamCity\BuildAgent\temp\agentTmp\teamcity.build6963.properties -Dteamcity.build.workingDir=C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE "-DVS2005_Path=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE" -DVS2003= -Dagent.name=rs-build-001 "-Demma.instrumentation.parameters=-ix -*Test*" -Dteamcity.dotnet.platform=C:\Dev\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe -DWindowsSDK6.0= -DDotNetFramework1.1= -Dbuild.number.format={build.vcs.number} -DWindowsSDK6.0A= -Duser.country=RU -Duser.timezone=Europe/Moscow -DDotNetFramework2.0_x86= -DVS2005= -Dfile.separator=\ -Dagent.work.dir=C:\Dev\TeamCity\BuildAgent\work "-DVS2008_Path=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE" -Dos.arch=x86 -Dbuild.vcs.number.http___devserver_81_svn_resto_trunk=21677 -DDotNetFramework3.0_x86_Path=c:\WINDOWS\Microsoft.NET\Framework\v3.0 -DDotNetFramework1.1_x86_Path=c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 -Dteamcity.build.changedFiles.file=C:\Dev\TeamCity\BuildAgent\temp\agentTmp\changedFiles6962.txt -DDotNetFramework1.1_x86= -DDotNetFramework2.0= -Dteamcity.build.tempDir=C:\Dev\TeamCity\BuildAgent\temp\buildTmp -Dbuild.vcs.number=21677 -Dbuild.vcs.number.1=21677 -Demma.report.html.out.encoding=UTF-8 "-Dos.name=Windows XP" -Dreport.html.out.file=coverage/index.html -Dteamcity.dotnet.nunitaddin=C:\Dev\TeamCity\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit -Didea.build.agent.port=9090 -DDotNetFramework3.5_x86= "-DVS2003_Path=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE" -Dteamcity.auth.userId=TeamCityBuildId=9993 -Dagent.flow=514322451804426 -Dteamcity.agent.cpuBenchmark=265 "-Duser.home=C:\Documents and Settings\build" -DVS2008= -classpath C:\Dev\TeamCity\BuildAgent\plugins\ant\lib\ant-launcher.jar org.apache.tools.ant.launch.Launcher -lib ${agent.work.dir}/../plugins/coveragePlugin/lib/emma.jar -lib C:/Dev/TeamCity/BuildAgent/lib/runtime-util.jar;C:/Dev/TeamCity/BuildAgent/plugins/antPlugin/lib/buildServerAntRuntime.jar -listener jetbrains.buildServer.agent.ant.AgentBuildListener -buildfile C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE\BuildScripts\build.xml clean server-run-tests-all
Buildfile: C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE\BuildScripts\build.xml
[echo] Building Resto, default edition, v 21677.1233739493511
[delete] Deleting directory C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE\BuildScripts\RestoAnt\build\classes
[mkdir] Created dir: C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE\BuildScripts\RestoAnt\build\classes
[javac] Compiling 3 source files to C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE\BuildScripts\RestoAnt\build\classes
EMMA: processing instrumentation path ...
EMMA: instrumentation path processed in 157 ms
EMMA: [4 class(es) instrumented, 0 resource(s) copied]
EMMA: metadata merged into [C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE\coverage.em] {in 0 ms}

BUILD FAILED
C:\Dev\TeamCity\BuildAgent\work\SERVER_TESTCOVERAGE\BuildScripts\build.xml:423: taskdef A class needed by class resto.ant.MergeWebXML cannot be found: com/vladium/emma/rt/RT

Total time: 3 seconds
[12:24:59]: Process exit code: 1
[12:25:00]: Artifacts path coverage.txt not found
[12:25:00]: Artifacts path coverage not found
[12:25:00]: Artifacts path coverage.ec not found





Attachment(s):
RMS_Server_Test_Coverage_21677.log
0
Comment actions Permalink

Hello,

   This problem is described (with possible solution) at http://www.jetbrains.net/confluence/display/TCD4/Code+Coverage page.
   Please take a look (look for section about NoClassDefFound).
 
   Hope, this helps,
   KIR

0
Comment actions Permalink

Hello,

  I'd appreciate if you file an issue to our tracker at http://jetbrains.net/tracker and attach your ipr/iml/.idea project files + generated integrationBuild.* files.

  Thanks,
  KIR

0

Please sign in to leave a comment.