Scala SBT: AssertionError on build - scala

I am using SBT (0.7.4) with Scala(2.7.7) to build my Scala project and sometimes I get following error when building the project.
So far the only remedy seems to retry it or do a clean on the SBT shell which adds delay in build process. No definite pattern of occurrence of the error has emerged but it happens quite a lot when I am using triggered execution of test cases: ~test
Please note the code base has no error. If I do a clean and build again without any source code change build gives no error. Sometimes, build works without even cleaning code base.
java.lang.AssertionError: assertion failed: List(class Old, class Old)
at scala.Predef$.assert(Predef.scala:92)
at scala.tools.nsc.symtab.Symbols$Symbol.suchThat(Symbols.scala:820)
at scala.tools.nsc.symtab.Symbols$Symbol.linkedClassOfModule(Symbols.scala:962)
at xsbt.Analyzer$Compat$.linkedClass(Analyzer.scala:225)
at xsbt.Analyzer$AnalyzerPhase$$anonfun$run$1$$anonfun$apply$7.apply(Analyzer.scala:96)
at xsbt.Analyzer$AnalyzerPhase$$anonfun$run$1$$anonfun$apply$7.apply(Analyzer.scala:85)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.collection.mutable.FlatHashTable$$anon$1.foreach(FlatHashTable.scala:113)
at scala.Iterable$class.foreach(Iterable.scala:256)
at scala.collection.mutable.HashSet.foreach(HashSet.scala:31)
at xsbt.Analyzer$AnalyzerPhase$$anonfun$run$1.apply(Analyzer.scala:85)
at xsbt.Analyzer$AnalyzerPhase$$anonfun$run$1.apply(Analyzer.scala:37)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
at xsbt.Analyzer$AnalyzerPhase.run(Analyzer.scala:37)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
at scala.tools.nsc.Global$Run.compile(Global.scala:667)
at xsbt.CompilerInterface.run(CompilerInterface.scala:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at xsbt.AnalyzingCompiler.call(AnalyzingCompiler.scala:40)
at xsbt.AnalyzingCompiler.apply(AnalyzingCompiler.scala:18)
at sbt.Compile.processScala(Compile.scala:76)
at sbt.CompilerCore$$anonfun$1.apply(Compile.scala:27)
at sbt.CompilerCore$$anonfun$1.apply(Compile.scala:27)
at sbt.CompilerCore$$anonfun$process$1$1.apply(Compile.scala:22)
at sbt.CompilerCore$$anonfun$process$1$1.apply(Compile.scala:22)
at sbt.CompilerCore$$anonfun$doCompile$3.apply(Compile.scala:45)
at sbt.CompilerCore$$anonfun$doCompile$3.apply(Compile.scala:42)
at scala.Option.orElse(Option.scala:102)
at sbt.CompilerCore.doCompile(Compile.scala:41)
at sbt.CompilerCore.apply(Compile.scala:29)
at sbt.AbstractCompileConditional.run$1(Conditional.scala:341)
at sbt.AbstractCompileConditional$$anonfun$3.apply(Conditional.scala:344)
at sbt.AbstractCompileConditional$$anonfun$3.apply(Conditional.scala:344)
at sbt.classfile.Analyze$.apply(Analyze.scala:110)
at sbt.AbstractCompileConditional.execute(Conditional.scala:344)
at sbt.Conditional$class.run(Conditional.scala:43)
at sbt.AbstractCompileConditional.run(Conditional.scala:231)
at sbt.BasicScalaProject.sbt$BasicScalaProject$$doCompile(DefaultProject.scala:259)
at sbt.BasicScalaProject$$anonfun$compileAction$1.apply(DefaultProject.scala:273)
at sbt.BasicScalaProject$$anonfun$compileAction$1.apply(DefaultProject.scala:273)
at sbt.TaskManager$Task.invoke(TaskManager.scala:62)
at sbt.impl.RunTask.doRun$1(RunTask.scala:77)
at sbt.impl.RunTask.runTask(RunTask.scala:85)
at sbt.impl.RunTask.sbt$impl$RunTask$$runIfNotRoot(RunTask.scala:60)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:48)
at sbt.impl.RunTask$$anonfun$runTasksExceptRoot$2.apply(RunTask.scala:48)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:131)
at sbt.Distributor$Run$Worker$$anonfun$2.apply(ParallelRunner.scala:131)
at sbt.Control$.trapUnit(Control.scala:19)
at sbt.Distributor$Run$Worker.run(ParallelRunner.scala:131)

Related

Error trying to execute feature files in Katalon Studio v6.3.3 - NoClassDefFoundError

Every time I attempt to execute a feature file the below error is thrown. It doesn't matter if it's a new feature file or an existing one. My colleagues are able to execute the exact same tests on their computers. This only occurs when trying to run feature file tests. I'm able to execute other types of tests with Katalon studio. I've tried versions 6.3.2 and 6.3.3 and received the same results. Has anyone seen this before? Based on the error I think it's failing prior to even getting to execute the code within the feature files but I'm at a loss.
09-09-2019 02:56:05 PM Verification
Elapsed time: 1.000s
Verification FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: java.lang.NoClassDefFoundError: Integer
at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:40)
at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:82)
at cucumber.runner.Runner.<init>(Runner.java:36)
at cucumber.runtime.Runtime.<init>(Runtime.java:65)
at cucumber.runtime.Runtime.<init>(Runtime.java:46)
at cucumber.runtime.Runtime.<init>(Runtime.java:42)
at cucumber.api.cli.Main.run(Main.java:34)
at cucumber.api.cli.Main$run.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy:76)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:46)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile$0.callStatic(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:101)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile.call(Unknown Source)
at WSVerification1568055365381.run(WSVerification1568055365381:2)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.WSVerificationExecutor.runScript(WSVerificationExecutor.java:146)
at com.kms.katalon.core.main.WSVerificationExecutor.doExecute(WSVerificationExecutor.java:140)
at com.kms.katalon.core.main.WSVerificationExecutor.processExecutionPhase(WSVerificationExecutor.java:123)
at com.kms.katalon.core.main.WSVerificationExecutor.accessMainPhase(WSVerificationExecutor.java:115)
at com.kms.katalon.core.main.WSVerificationExecutor.execute(WSVerificationExecutor.java:103)
at com.kms.katalon.core.main.TestCaseMain.runFeatureFile(TestCaseMain.java:144)
at com.kms.katalon.core.main.TestCaseMain$runFeatureFile$0.call(Unknown Source)
at TempTempCase1568055363653.run(TempTempCase1568055363653.groovy:21)
Caused by: java.lang.ClassNotFoundException: Integer
... 27 more
)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:50)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:70)
at com.kms.katalon.core.keyword.internal.KeywordMain$runKeyword.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:46)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile$0.callStatic(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords.runFeatureFile(CucumberBuiltinKeywords.groovy:101)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$runFeatureFile.call(Unknown Source)
at WSVerification1568055365381.run(WSVerification1568055365381:2)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.WSVerificationExecutor.runScript(WSVerificationExecutor.java:146)
at com.kms.katalon.core.main.WSVerificationExecutor.doExecute(WSVerificationExecutor.java:140)
at com.kms.katalon.core.main.WSVerificationExecutor.processExecutionPhase(WSVerificationExecutor.java:123)
at com.kms.katalon.core.main.WSVerificationExecutor.accessMainPhase(WSVerificationExecutor.java:115)
at com.kms.katalon.core.main.WSVerificationExecutor.execute(WSVerificationExecutor.java:103)
at com.kms.katalon.core.main.TestCaseMain.runFeatureFile(TestCaseMain.java:144)
at com.kms.katalon.core.main.TestCaseMain$runFeatureFile$0.call(Unknown Source)
at TempTempCase1568055363653.run(TempTempCase1568055363653.groovy:21)
Caused by: java.lang.NoClassDefFoundError: Integer
at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:40)
at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:82)
at cucumber.runner.Runner.<init>(Runner.java:36)
at cucumber.runtime.Runtime.<init>(Runtime.java:65)
at cucumber.runtime.Runtime.<init>(Runtime.java:46)
at cucumber.runtime.Runtime.<init>(Runtime.java:42)
at cucumber.api.cli.Main.run(Main.java:34)
at cucumber.api.cli.Main$run.call(Unknown Source)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy:76)
at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy)
at com.kms.katalon.core.keyword.internal.KeywordMain.runKeyword(KeywordMain.groovy:68)
... 16 more
Caused by: java.lang.ClassNotFoundException: Integer
... 27 more
Well, this isn't an answer as to what happened but I deleted the local source code I was using and pulled it back down into a separate location and now I'm able to run the tests. Maybe something got corrupted in the original clone from the repo. Anyway, all is well now.

Fill internet form with eclipse sikuli selenium

I try to automate simple process to fill an internet form. I use the Eclipse environment with Sikuli and Selenium for this purpose. I follow the following tutorial. https://www.youtube.com/watch?v=8y41vKeGM9U. It seems there is no error in the code but I have the following error on the console. would you teach me the reason please ?
Best regards,
error] RobotDesktop: checkMousePosition: should be L(2560,360)#S(1) [1920,0 1280x720]
but after move is L(2347,240)#S(1)[1920,0 1280x720]
Possible cause in case you did not touch the mouse while script was running:
Mouse actions are blocked generally or by the frontmost application.
You might try to run the SikuliX stuff as admin.
[error] RobotDesktop: checkMousePosition: should be L(542,775)#S(0)[0,0 1920x1080]
but after move is L(1920,719)#S(1)[1920,0 1280x720]
Possible cause in case you did not touch the mouse while script was running:
Mouse actions are blocked generally or by the frontmost application.
You might try to run the SikuliX stuff as admin.
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Function
at FillForm.main(FillForm.java:26)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more

Getting error while running scala test runner

Any idea on why am i getting this error while running a scala test,
java.lang.IllegalArgumentException: ERROR: -r has been deprecated for a very long time and is no longer supported, to prepare for reusing it for a different purpose in the near future. Please change all uses of -r to -C.
at org.scalatest.tools.ArgsParser$.checkArgsForValidity(ArgsParser.scala:41)
at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:857)
at org.scalatest.tools.Runner$.run(Runner.scala:850)
at org.scalatest.tools.Runner.run(Runner.scala)
at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.runScalaTest2(ScalaTestRunner.java:141)
at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.main(ScalaTestRunner.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Is this an issue with my dependancies got updated itself? Because this test was ran earlier without any issues.

Play framework 2: Error when trying to start application in production mode

OS: Windows 7 64bit
java version: 1.7.0_17
javac Version: 1.7.0_17
I'm new to Play Framework, basically wanted to get a feel of everything.
There's a sample application called java/helloworld. Haven't changed anything and went on using the "start" command.
[helloworld] $ start
(Starting server. Type Ctrl+D to exit logs, the server will remain in background
)
Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at java.lang.System.initializeSystemClass(Unknown Source)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range:
0
at java.lang.String.charAt(Unknown Source)
at java.io.Win32FileSystem.<init>(Unknown Source)
at java.io.WinNTFileSystem.<init>(Unknown Source)
at java.io.FileSystem.getFileSystem(Native Method)
at java.io.File.<clinit>(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at java.lang.System.initializeSystemClass(Unknown Source)
I don't think this is anything to do with Play. It seems like you have encountered this issue, which looks to be a JVM bug on your flavour of Windows.
To run the sample applications in production mode, you may have to proceed as follows:
Run the play stage command (outside the Play console, just on the command line). The stage task is described here
Add this JVM argument to the target\start script generated by the stage task, before then starting the application.
As a workaround add
-Dfile.separator=\/
parameter to play.bat and build.bat.

Can not deploy war file using Struts2 into Geronimo 2.2.1

I try to deploy struts2-showcase.war in Struts2-2.3.1-all.zip into Geronimo 2.2.1.
Geronimo responded the below errors:
011-12-30 15:31:53,294 WARN [TomcatModuleBuilder] Web application . does not contain a WEB-INF/geronimo-web.xml deployment plan. This may or may not be a problem, depending on whether you have things like resource references that need to be resolved. You can also give the deployer a separate deployment plan file on the command line.
Deployer operation failed: org/apache/struts/taglib/html/FormTag
java.lang.NoClassDefFoundError: org/apache/struts/taglib/html/FormTag
at java.lang.ClassLoader.defineClass1(Native Method)
2011-12-30 15:31:56,608 ERROR [Deployer] Deployment failed due to
java.lang.NoClassDefFoundError: org/apache/struts/taglib/html/FormTag
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.geronimo.kernel.classloader.JarFileClassLoader.access$200(JarFileClassLoader.java:52)
at org.apache.geronimo.kernel.classloader.JarFileClassLoader$6.run(JarFileClassLoader.java:302)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.geronimo.kernel.classloader.JarFileClassLoader.findClass(JarFileClassLoader.java:254)
at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:401)
at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:257)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.geronimo.jasper.deployment.JspModuleBuilderExtension.parseTldFile(JspModuleBuilderExtension.java:472)
at org.apache.geronimo.jasper.deployment.JspModuleBuilderExtension.getListenerClasses(JspModuleBuilderExtension.java:433)
at org.apache.geronimo.jasper.deployment.JspModuleBuilderExtension.createJspClassFinder(JspModuleBuilderExtension.java:189)
at org.apache.geronimo.jasper.deployment.JspModuleBuilderExtension.addGBeans(JspModuleBuilderExtension.java:158)
at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:513)
at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:652)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:257)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
at java.lang.Thread.run(Unknown Source)
Does anybody tell me what's wrong with Geronimo ?
I know Geronimo told me it can not find the class:
org/apache/struts/taglib/html/FormTag object.
But, the object is belongs to Struts1, and my war file use Struts2.
I checked struts2-showcase.war and confirmed that struts2-showcase.war never uses the above object.
Thanks anyway.
never worked with Geronimo but a quick look at the log saying that geronimo-web.xml in not there inside WEB-INF folder.
Check this thread as the person has same issue
How to deploy in Geronimo
Have you tried running web-app? Is It working or not, i am asking these question based on the content of stack trace you have posted