java.lang.IllegalArgumentException: already added: Lorg/w3c/dom/UserDataHandler; - titanium

I try to integrate my module(for Android) to titanium app.
I Integrade it and after i added in tiapp.xml:
<modules>
<module platform="android" version="1">com.android.manager</module>
</modules>
I get error:
[ERROR] System Error while compiling Android classes.dex
[ERROR]
[ERROR] UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] java.lang.IllegalArgumentException: already added: Lorg/w3c/dom/UserDataHandler;
[ERROR] at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
[ERROR] at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
[ERROR] at com.android.dx.command.dexer.Main.processClass(Main.java:486)
[ERROR] at com.android.dx.command.dexer.Main.processFileBytes(Main.java:455)
[ERROR] at com.android.dx.command.dexer.Main.access$400(Main.java:67)
[ERROR] at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:394)
[ERROR] at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
[ERROR] at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
[ERROR] at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
[ERROR] at com.android.dx.command.dexer.Main.processOne(Main.java:418)
[ERROR] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:329)
[ERROR] at com.android.dx.command.dexer.Main.run(Main.java:206)
[ERROR] at com.android.dx.command.dexer.Main.main(Main.java:174)
[ERROR] at com.android.dx.command.Main.main(Main.java:91)
[ERROR] 1 error; aborting

the main problem was, that the name in: {code} #Kroll.module(name="SensorManager", id="com.android.manager") the id was not the same it was: com.android.manager.Name......

Related

Cannot get any scalajs-bundler samples to work

If I download a clone of the scalajs-bundler project and navigate to any of the sbt-test projects I cannot get any of them to work - for example the facade project.
When I enter the sbt command I get the following error:
[error] java.lang.RuntimeException: 'plugin.version' environment variable not set
Full stack trace is:
[error] java.lang.RuntimeException: 'plugin.version' environment variable is not set
[error] at scala.sys.package$.error(package.scala:26)
[error] at $0813db5cafe4ec2bbe2c$.$anonfun$$sbtdef$1(/home/des/workspace/scalajs-bundler-master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/facade/project/plugins.sbt:3)
[error] at scala.collection.MapLike.getOrElse(MapLike.scala:127)
[error] at scala.collection.MapLike.getOrElse$(MapLike.scala:125)
[error] at scala.collection.AbstractMap.getOrElse(Map.scala:59)
[error] at $0813db5cafe4ec2bbe2c$.$sbtdef(/home/des/workspace/scalajs-bundler-master/sbt-scalajs-bundler/src/sbt-test/sbt-scalajs-bundler/facade/project/plugins.sbt:3)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] at sbt.compiler.Eval$.getValue(Eval.scala:578)
[error] at sbt.compiler.Eval.$anonfun$eval$1(Eval.scala:129)
[error] at sbt.internal.EvaluateConfigurations$.$anonfun$evaluateDslEntry$1(EvaluateConfigurations.scala:249)
[error] at sbt.internal.EvaluateConfigurations$.$anonfun$evaluateSbtFile$6(EvaluateConfigurations.scala:172)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
[error] at scala.collection.immutable.List.foreach(List.scala:388)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:233)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
[error] at scala.collection.immutable.List.map(List.scala:294)
[error] at sbt.internal.EvaluateConfigurations$.$anonfun$evaluateSbtFile$4(EvaluateConfigurations.scala:172)
[error] at sbt.internal.Load$.loadSettingsFile$1(Load.scala:1137)
[error] at sbt.internal.Load$.$anonfun$discoverProjects$2(Load.scala:1144)
[error] at scala.collection.MapLike.getOrElse(MapLike.scala:127)
[error] at scala.collection.MapLike.getOrElse$(MapLike.scala:125)
[error] at scala.collection.AbstractMap.getOrElse(Map.scala:59)
[error] at sbt.internal.Load$.memoLoadSettingsFile$1(Load.scala:1143)
[error] at sbt.internal.Load$.$anonfun$discoverProjects$4(Load.scala:1151)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
[error] at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:58)
[error] at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:51)
[error] at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:233)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
[error] at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[error] at sbt.internal.Load$.loadFiles$1(Load.scala:1151)
[error] at sbt.internal.Load$.discoverProjects(Load.scala:1165)
[error] at sbt.internal.Load$.discover$1(Load.scala:862)
[error] at sbt.internal.Load$.loadTransitive(Load.scala:937)
[error] at sbt.internal.Load$.loadProjects$1(Load.scala:726)
[error] at sbt.internal.Load$.$anonfun$loadUnit$11(Load.scala:729)
[error] at sbt.internal.Load$.timed(Load.scala:1395)
[error] at sbt.internal.Load$.$anonfun$loadUnit$1(Load.scala:729)
[error] at sbt.internal.Load$.timed(Load.scala:1395)
[error] at sbt.internal.Load$.loadUnit(Load.scala:688)
[error] at sbt.internal.Load$.$anonfun$builtinLoader$4(Load.scala:484)
[error] at sbt.internal.BuildLoader$.$anonfun$componentLoader$5(BuildLoader.scala:176)
[error] at sbt.internal.BuildLoader.apply(BuildLoader.scala:241)
[error] at sbt.internal.Load$.loadURI$1(Load.scala:546)
[error] at sbt.internal.Load$.loadAll(Load.scala:562)
[error] at sbt.internal.Load$.loadURI(Load.scala:492)
[error] at sbt.internal.Load$.load(Load.scala:471)
[error] at sbt.internal.Load$.$anonfun$apply$1(Load.scala:251)
[error] at sbt.internal.Load$.timed(Load.scala:1395)
[error] at sbt.internal.Load$.apply(Load.scala:251)
[error] at sbt.internal.Load$.buildPluginDefinition(Load.scala:1312)
[error] at sbt.internal.Load$.buildPlugins(Load.scala:1242)
[error] at sbt.internal.Load$.plugins(Load.scala:1225)
[error] at sbt.internal.Load$.$anonfun$loadUnit$2(Load.scala:694)
[error] at sbt.internal.Load$.timed(Load.scala:1395)
[error] at sbt.internal.Load$.$anonfun$loadUnit$1(Load.scala:694)
[error] at sbt.internal.Load$.timed(Load.scala:1395)
[error] at sbt.internal.Load$.loadUnit(Load.scala:688)
[error] at sbt.internal.Load$.$anonfun$builtinLoader$4(Load.scala:484)
[error] at sbt.internal.BuildLoader$.$anonfun$componentLoader$5(BuildLoader.scala:176)
[error] at sbt.internal.BuildLoader.apply(BuildLoader.scala:241)
[error] at sbt.internal.Load$.loadURI$1(Load.scala:546)
[error] at sbt.internal.Load$.loadAll(Load.scala:562)
[error] at sbt.internal.Load$.loadURI(Load.scala:492)
[error] at sbt.internal.Load$.load(Load.scala:471)
[error] at sbt.internal.Load$.$anonfun$apply$1(Load.scala:251)
[error] at sbt.internal.Load$.timed(Load.scala:1395)
[error] at sbt.internal.Load$.apply(Load.scala:251)
[error] at sbt.internal.Load$.defaultLoad(Load.scala:69)
[error] at sbt.BuiltinCommands$.liftedTree1$1(Main.scala:829)
[error] at sbt.BuiltinCommands$.doLoadProject(Main.scala:829)
[error] at sbt.BuiltinCommands$.$anonfun$loadProjectImpl$2(Main.scala:800)
[error] at sbt.Command$.$anonfun$applyEffect$4(Command.scala:142)
[error] at sbt.Command$.$anonfun$applyEffect$2(Command.scala:137)
[error] at sbt.Command$.process(Command.scala:181)
[error] at sbt.MainLoop$.processCommand(MainLoop.scala:151)
[error] at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:139)
[error] at sbt.State$$anon$1.runCmd$1(State.scala:246)
[error] at sbt.State$$anon$1.process(State.scala:250)
[error] at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:139)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.MainLoop$.next(MainLoop.scala:139)
[error] at sbt.MainLoop$.run(MainLoop.scala:132)
[error] at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:110)
[error] at sbt.io.Using.apply(Using.scala:22)
[error] at sbt.MainLoop$.runWithNewLog(MainLoop.scala:104)
[error] at sbt.MainLoop$.runAndClearLast(MainLoop.scala:59)
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:44)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error] at sbt.StandardMain$.runManaged(Main.scala:138)
[error] at sbt.xMain.run(Main.scala:89)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:56)
[error] at xsbt.boot.Boot$.main(Boot.scala:18)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] 'plugin.version' environment variable is not set
The tests rely on sbt-scripted to be executed. See the instructions in the contributing file.

unable to compile Maven ,not creating testng file & throws [ERROR]Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin

I am getting this error while executing maven trying to fix this code for 5 days non of the solution working
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test
(default-test) on project com.learn.selenium: Execution default-test
of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test
failed: There was an error in the forked process
[ERROR] org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
[ERROR] at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:325)
[ERROR] at org.testng.TestNG.run(TestNG.java:1036)
[ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
[ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
[ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
[ERROR] Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
[ERROR] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
[ERROR] at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
[ERROR] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
[ERROR] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
[ERROR] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
[ERROR] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
[ERROR] at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
[ERROR] at org.testng.xml.XMLParser.parse(XMLParser.java:39)
[ERROR] at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:16)
[ERROR] at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:9)
[ERROR] at org.testng.xml.Parser.parse(Parser.java:172)
[ERROR] at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:305)
[ERROR] ... 7 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Where is pom.xml?
Ok,fine
solve it using -U option along with mvn command as
mvn clean install -U
hope it helps.

Unable to import a giter project in IntellliJ

I have created starter projects from the following link - https://www.playframework.com/documentation/2.6.x/Tutorials
Now I want to import these projects in IntelliJ.I am trying to follow the instructions from this link but I get this error. What is the mistake? I tried importing by first selecting the complete directory and later by selecting only build.sbt . IntelliJ versiokn is 2016.3.4
https://www.jetbrains.com/help/idea/getting-started-with-play-2-x.html#import_project
Error
Error while importing SBT project: ...
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:29)
[error] at sbt.StandardMain$.runManaged(Main.scala:104)
[error] at sbt.xMain.run(Main.scala:71)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[error] Not a valid key: dump-structure (similar: buildStructure)
[error] */*:dump-structure
[error] ^
[INFO] [12/22/2017 05:46:39.234] [Thread-5] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0
See complete log in C:\Users\Manu\.IntelliJIdea2016.3\system\log\sbt.last.log Consult IDE log for more details (Help | Show Log)

convert a DataFrame into a string in scala

I am trying to download the Hive jar in sbt and I am getting the following error. Have anyone encountered this?
please let me know what is the correct hive version I need to create a GenericUDF class
This is my SBT file
name := "Test"
version := "0.1"
scalaVersion := "2.11.8"
libraryDependencies += "org.apache.hive" % "hive-exec" % "1.2.1"
The below is the error message I am getting
Error:Error while importing SBT project:<br/>...<br/><pre>[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:118)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error] at sbt.std.Transform$$anon$4.work(System.scala:64)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:266)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (*:update) sbt.librarymanagement.ResolveException: unresolved dependency: org.pentaho#pentaho-aggdesigner-algorithm;5.1.5-jhyde: not found
[error] (*:ssExtractDependencies) sbt.librarymanagement.ResolveException: unresolved dependency: org.pentaho#pentaho-aggdesigner-algorithm;5.1.5-jhyde: not found
[error] Total time: 20 s, completed Oct 11, 2017 4:27:03 PM</pre><br/>See complete log in file:/Users/spachari/Library/Logs/IdeaIC2017.2/sbt.last.log
Please try using below SBT, it should help.
name := "Test"
version := "0.1"
scalaVersion := "2.11.8" libraryDependencies ++= Seq("org.apache.hive" % "hive-exec" % "1.2.1").map(_.exclude("org.pentaho", "pentaho-aggdesigner-algorithm"))

Titanium Module not working (Requires License ?)

I am new to titanium (alloy). I am trying to use a Barcode Scanner module (Redlaser). I am getting the following error while trying to start scanning
[ERROR] : StatusManager: Problem reading license file
[ERROR] : StatusManager: java.io.FileNotFoundException: RedLaser_License.xml
Do all the modules required licenses (XML) to run ?
When I view for the scanner comes up, it does not show anything - just a black screen.
Entire Error:
[ERROR] : StatusManager: Problem reading license file
[ERROR] : StatusManager: java.io.FileNotFoundException: RedLaser_License.xml
[ERROR] : StatusManager: at android.content.res.AssetManager.openAsset(Native Method)
[ERROR] : StatusManager: at android.content.res.AssetManager.open(AssetManager.java:316)
[ERROR] : StatusManager: at android.content.res.AssetManager.open(AssetManager.java:290)
[ERROR] : StatusManager: at RLSDK.c.a(RLSDK_:692)
[ERROR] : StatusManager: at RLSDK.c.a(RLSDK_:168)
[ERROR] : StatusManager: at com.ebay.redlasersdk.BarcodeScanActivity.onCreate(RLSDK_:256)
[ERROR] : StatusManager: at ti.redlaser.ScannerActivity.onCreate(ScannerActivity.java:64)
[ERROR] : StatusManager: at android.app.Activity.performCreate(Activity.java:5248)
[ERROR] : StatusManager: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
[ERROR] : StatusManager: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
[ERROR] : StatusManager: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
[ERROR] : StatusManager: at android.app.ActivityThread.access$800(ActivityThread.java:139)
[ERROR] : StatusManager: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
[ERROR] : StatusManager: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : StatusManager: at android.os.Looper.loop(Looper.java:136)
[ERROR] : StatusManager: at android.app.ActivityThread.main(ActivityThread.java:5086)
[ERROR] : StatusManager: at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] : StatusManager: at java.lang.reflect.Method.invoke(Method.java:515)
[ERROR] : StatusManager: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
[ERROR] : StatusManager: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
[ERROR] : StatusManager: at dalvik.system.NativeStart.main(Native Method)
Nope. In this case, you need register at RedLaser Developer Portal
For iOS RedLaser_License.xml must be at Resources folder, in the other hand, for Android the license file must be at platform/android/bin/assets directory where platform are at the same level of Resources folder.
For more information: Documentation RedLaser Module
I hope my answer helps you :)