Appcelerator Titanium app can't compile with Streethawk push module - push-notification

I am creating app which should use Streethawk push module, but when I try to compile it, than it freezes on running dexer.
When I try to compile app with module: com.streethawk.shanalytics it compiles perfectly, but if I will add com.streethawk.shpush than it will freeze on:
Running dexer: /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java "-Xmx1024M" "-XX:-UseGCOverheadLimit" with a long list of modules.
If I check Activity Monitor I will see it is using 100% of CPU power so it seems that it gets into some kind of a loop during the process.
After about half an hour it throws an error:
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL ERROR:
[ERROR] : java.lang.OutOfMemoryError: Java heap space
[ERROR] : at java.util.Arrays.copyOfRange(Arrays.java:2694)
[ERROR] : at java.lang.String.<init>(String.java:203)
[ERROR] : at com.android.dx.rop.cst.CstString.utf8BytesToString(CstString.java:158)
[ERROR] : at com.android.dx.rop.cst.CstString.<init>(CstString.java:200)
[ERROR] : at com.android.dx.cf.cst.ConstantPoolParser.parseUtf8(ConstantPoolParser.java:371)
[ERROR] : at com.android.dx.cf.cst.ConstantPoolParser.parse0(ConstantPoolParser.java:262)
[ERROR] : at com.android.dx.cf.cst.ConstantPoolParser.parse(ConstantPoolParser.java:150)
[ERROR] : at com.android.dx.cf.cst.ConstantPoolParser.parseIfNecessary(ConstantPoolParser.java:124)
[ERROR] : at com.android.dx.cf.cst.ConstantPoolParser.getPool(ConstantPoolParser.java:115)
[ERROR] : at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:482)
[ERROR] : at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
[ERROR] : at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
[ERROR] : at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
[ERROR] : at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
[ERROR] : at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
[ERROR] : at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
[ERROR] : at com.android.dx.command.dexer.Main.processClass(Main.java:749)
[ERROR] : at com.android.dx.command.dexer.Main.processFileBytes(Main.java:718)
[ERROR] : at com.android.dx.command.dexer.Main.access$1200(Main.java:85)
[ERROR] : at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1645)
[ERROR] : at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
[ERROR] : at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
[ERROR] : at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
[ERROR] : at com.android.dx.command.dexer.Main.processOne(Main.java:672)
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
[ERROR] : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
[ERROR] : at com.android.dx.command.dexer.Main.run(Main.java:277)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:245)
[ERROR] : at com.android.dx.command.Main.main(Main.java:106)
Any help welcomed. Thanks in advance.

Unfortunately this is Streethawk's fault. I've created ticket on there support board and after 2 weeks I got an answer:
"I am sorry to inform that we don't have enough resources at the moment to attend and resolve the titanium issue. My sincere apologies for the inconvenience caused."
So if you plan to use their module on Android than it is not possible now.

Related

Don't know where a SBT dependency comes from

I have a SBT project with many dependencies.
It complains it cannot download a dependency.
I have not listed explicitly. It could be a transitive dependency.
The commands dependencyList or dependencyTree doesn't list it, whereas the update task fails. I'm quite used to use these tasks for guessing things.
> update
[info] Updating
[info] Resolved dependencies
[warn]
[warn] Note: Unresolved dependencies path:
[error] stack trace is suppressed; run last servision / update for the full output
[error] (servision / update) sbt.librarymanagement.ResolveException: Error downloading javax.media:jai_codec:1.1.3
[error] Not found
[error] Not found
[error] not found: /home/.ivy2/localjavax.media/jai_codec/1.1.3/ivys/ivy.xml
[error] not found: https://repo1.maven.org/maven2/javax/media/jai_codec/1.1.3/jai_codec-1.1.3.pom
[error] not found: https://ec.europa.eu/cefdigital/artifact/content/groups/public/javax/media/jai_codec/1.1.3/jai_codec-1.1.3.pom
[error] download error: Caught javax.net.ssl.SSLHandshakeException (No subject alternative DNS name matching nexus.osgeo.org found.) while downloading https://nexus.osgeo.org/repository/Geoserver-releases/javax/media/jai_codec/1.1.3/jai_codec-1.1.3.pom
[error] not found: http://maven.geo-solutions.it/javax/media/jai_codec/1.1.3/jai_codec-1.1.3.pom
[error] not found: http://jbig2-imageio.googlecode.com/svn/maven-repository/javax/media/jai_codec/1.1.3/jai_codec-1.1.3.pom
[error] not found: http://www.billylieurance.net/maven2/javax/media/jai_codec/1.1.3/jai_codec-1.1.3.pom
[error] No fallback URL found
I've tried to list the dependency with a from clause, but it doesn't work either.
The whatDependsOn command doesn't recognize the dependency.
n> whatDependsOn javax.media jai_core
[error] Expected whitespace character
[error] Expected 'commons-pool'
[error] Expected 'commons-beanutils'
[error] Expected 'xml-apis'
[error] Expected 'oro'
[error] Expected 'org.postgresql'
[error] Expected 'org.checkerframework'
[error] Expected 'commons-digester'
[error] Expected 'commons-codec'
[error] Expected 'commons-betwixt'
[error] Expected 'commons-collections'
[error] Expected 'commons-logging'
[error] Expected 'ddlutils'
[error] Expected 'commons-dbcp'
[error] Expected 'net.postgis'
[error] Expected 'commons-lang'
[error] Expected 'org.slf4j'
[error] Expected 'io.circe'
[error] Expected 'org.typelevel'
[error] Expected 'com.chuusai'
[error] Expected 'todovision'
[error] Expected 'jakarta-regexp'
[error] Expected 'javax.servlet'
[error] Expected 'javax.activation'
[error] Expected 'javax.xml.bind'
[error] Expected 'javax.measure'
[error] whatDependsOn javax.media jai_core
This worksaround doesn't work either (I've placed previously the offending .jar in lib/):
projectDependencies += "javax.media" % "jai_core" % "1.1.3" from s"file://${baseDirectory.value}/lib/jai_core-1.1.3.jar"
This one does work:
projectDependencies += "javax.media" % "jai_codec" % "1.1.3" from "https://mywebserver.com/jai_codec-1.1.3.jar"
but it makes me upload the .jar to a web server.
I think this is a bug in SBT or Coursier.

deduplicate: different file contents found in the following

I'm trying to build a project in SBT after I added a dependency on "org.apache" to the submodule.zookeeper" % "zookeeper" % "3.7.0" and catching a flurry of errors:
[error] (assembly) deduplicate: different file contents found in the following:
[error] C:\Users\****\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar:org/apache/log4j/Appender.class
[error] C:\Users\****\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\log4j\log4j\1.2.17\log4j-1.2.17.jar:org/apache/log4j/Appender.class
[error] deduplicate: different file contents found in the following:
[error] C:\Users\****\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar:org/apache/log4j/AppenderSkeleton.class
[error] C:\Users\****\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\log4j\log4j\1.2.17\log4j-1.2.17.jar:org/apache/log4j/AppenderSkeleton.class
[error] deduplicate: different file contents found in the following:
[error] C:\Users\****\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar:org/apache/log4j/BasicConfigurator.class
[error] C:\Users\****\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\log4j\log4j\1.2.17\log4j-1.2.17.jar:org/apache/log4j/BasicConfigurator.class
[error] deduplicate: different file contents found in the following:
[error] C:\Users\****\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar:org/apache/log4j/Category.class
[error] C:\Users\****\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\log4j\log4j\1.2.17\log4j-1.2.17.jar:org/apache/log4j/Category.class
How can this be fixed?
I tried to do this
"org.apache.zookeeper" % "zookeeper" % "3.7.0" exclude("org.slf4j", "slf4j-log4j12") exclude("log4j", "log4j")
, but it didn't help...

Azure resource manager template

With my ARM code I am trying to build multiple SQL VMs. However, I am hitting brick wall with the following error while tying to create network peering.
[ERROR] New-AzureRmResourceGroupDeployment : 08:40:20 - Error: Code=InvalidTemplate;
[ERROR] Message=Deployment template validation failed: 'The template resource
[ERROR] 'DI_SQLSERVER_VNETag5w7jqj6vp3a_TO_DI_DT_VN' for type
[ERROR] 'Microsoft.Network/virtualNetworks/virtualNetworkPeerings' at line '488' and
[ERROR] column '9' has incorrect segment lengths. A nested resource type must have
[ERROR] identical number of segments as its resource name. A root resource type must
[ERROR] have segment length one greater than its resource name. Please see
[ERROR] https://aka.ms/arm-template/#resources for usage details.'.
[ERROR]
[ERROR] At line:35 char:1
[ERROR] + New-AzureRmResourceGroupDeployment -ResourceGroupName $presourcegroup ...
[ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ERROR] + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeplo
[ERROR] yment], Exception
[ERROR] + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets
[ERROR] .Implementation.NewAzureResourceGroupDeploymentCmdlet
[ERROR]
[ERROR] New-AzureRmResourceGroupDeployment : The deployment validation failed
[ERROR] At line:35 char:1
[ERROR] + New-AzureRmResourceGroupDeployment -ResourceGroupName $presourcegroup ...
[ERROR] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ERROR] + CategoryInfo : CloseError: (:) [New-AzureRmResourceGroupDeploym
[ERROR] ent], InvalidOperationException
[ERROR] + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets
[ERROR] .Implementation.NewAzureResourceGroupDeploymentCmdlet
[ERROR]
Please see the link below for the code. Hope some can shed some light on the following arm template error.
https://drive.google.com/open?id=1Iltf_Qlg9GLPmOKTVDpP2KjrQcLvVZDg
Thanks
your peering name should be this: vnet_name/peering_name, because peering cannot exist on its own (and if you dont provide vnet name it has no way of figuring own what vnet this belongs to), its a sub resource of a vnet resource.

Error 405 PUT | How to publish to nexus through sbt?

I'm testing the locally deployed Nexus using a Demo Project. I've created this repo: com.example on Nexus using create Repository. The URL of the repository on local Nexus is: http://localhost:8081/repository/com.example/.
The configuration in build.sbt goes like:
name := "data-models"
version := "0.1"
scalaVersion := "2.12.7"
organization := "com.example"
val snapshotsName = "Repository Snapshots"
val snapshotsUrl = new java.net.URL("http://localhost:8081/repository/com.example/")
val snapshotsPattern = "[organisation]/[module]/[revision]-SNAPSHOT/[artifact]-[revision](-[timestamp]).[ext]"
val snapshots = Resolver.url(snapshotsName, snapshotsUrl)(Patterns(snapshotsPattern))
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
publishTo := Some("Sonatype Nexus Repository Manager" at "http://localhost:8081/repository/com.example/")
The Credentials conf goes like:
realm=Sonatype Nexus Repository Manager
host=localhost:8081
user=admin
password=qwerty123#345ty
Then I try to run sbt publish.
I get this error:
[info] Loading project definition from /home/yash/IdeaProjects/data-models/project
[info] Loading settings for project data-models from build.sbt ...
[info] Set current project to data-models (in build file:/home/yash/IdeaProjects/data-models/)
[info] Packaging /home/yash/IdeaProjects/data-models/target/scala-2.12/data-models_2.12-0.1-sources.jar ...
[info] Updating ...
[info] Done packaging.
[info] Done updating.
[info] Wrote /home/yash/IdeaProjects/data-models/target/scala-2.12/data-models_2.12-0.1.pom
[info] Packaging /home/yash/IdeaProjects/data-models/target/scala-2.12/data-models_2.12-0.1.jar ...
[info] Done packaging.
[error] java.io.IOException: PUT operation to URL http://localhost:8081/com/example/data-models_2.12/0.1/data-models_2.12-0.1.pom failed with status code 405: HTTP method PUT is not supported by this URL
[error] at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:82)
[error] at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.upload(GigahorseUrlHandler.scala:191)
[error] at org.apache.ivy.util.url.URLHandlerDispatcher.upload(URLHandlerDispatcher.java:82)
[error] at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
[error] at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84)
[error] at sbt.internal.librarymanagement.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:366)
[error] at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
[error] at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put(ConvertResolver.scala:118)
[error] at sbt.internal.librarymanagement.ConvertResolver$ChecksumFriendlyURLResolver.put$(ConvertResolver.scala:105)
[error] at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.put(ConvertResolver.scala:165)
[error] at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5(IvyActions.scala:497)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$5$adapted(IvyActions.scala:496)
[error] at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:788)
[error] at scala.collection.Iterator.foreach(Iterator.scala:937)
[error] at scala.collection.Iterator.foreach$(Iterator.scala:937)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
[error] at scala.collection.IterableLike.foreach(IterableLike.scala:70)
[error] at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
[error] at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[error] at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:787)
[error] at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:496)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$3(IvyActions.scala:144)
[error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:157)
[error] at sbt.internal.librarymanagement.IvyActions$.withChecksums(IvyActions.scala:151)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1(IvyActions.scala:144)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$publish$1$adapted(IvyActions.scala:134)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error] at sbt.internal.librarymanagement.IvyActions$.publish(IvyActions.scala:134)
[error] at sbt.Classpaths$.$anonfun$publishTask$4(Defaults.scala:2411)
[error] at sbt.Classpaths$.$anonfun$publishTask$4$adapted(Defaults.scala:2411)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[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] (publish) java.io.IOException: PUT operation to URL http://localhost:8081/com/example/data-models_2.12/0.1/data-models_2.12-0.1.pom failed with status code 405: HTTP method PUT is not supported by this URL
I'm not able to understand what's wrong. Is it the correct way to do it?
What is the correct way?
Thanks in Advance.
Attaching a Screenshot of the Nexus repo.
I think I found the issue, actually I think it requires a SNAPSHOT type repo and a -snapshot keyword in the binary bundle which we want to deploy.
As soon as I configured it like:
name := "data-models"
version := "1.0.0-SNAPSHOT"
scalaVersion := "2.11.7"
organization := "com.example"
val snapshotsName = "Repository Snapshots"
val snapshotsUrl = new java.net.URL("http://localhost:8081/repository/example-snapshot/")
val snapshotsPattern = "[organisation]/[module]/[revision]-SNAPSHOT/[artifact]-[revision](-[timestamp]).[ext]"
val snapshots = Resolver.url(snapshotsName, snapshotsUrl)(Patterns(snapshotsPattern))
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
//credentials += Credentials("Sonatype Nexus Repository Manager", "localhost", "admin", "qwerty123#")
publishTo := Some("Sonatype Nexus Repository Manager" at "http://localhost:8081/repository/example-snapshot/")
It started to deploy.

java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.listeningDecorator

I am seeing the below exception when creating a Cassandra Cluster object using java client.
val cluster = Cluster.builder().
withProtocolVersion(ProtocolVersion.V3).
addContactPoint("127.0.0.1").
build()
The exceptions says com.google.common.util.concurrent.MoreExecutors.listeningDecorator method not found. But the library(guava) is added to the classPath.
[error] Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.listeningDecorator(Ljava/util/concurrent/ExecutorService;)Lcom/google/common/util/concurrent/ListeningExecutorService;
[error] at com.datastax.driver.core.Cluster.makeExecutor(Cluster.java:1100)
[error] at com.datastax.driver.core.Cluster.access$700(Cluster.java:62)
[error] at com.datastax.driver.core.Cluster$Manager.<init>(Cluster.java:1160)
[error] at com.datastax.driver.core.Cluster$Manager.<init>(Cluster.java:1110)
[error] at com.datastax.driver.core.Cluster.<init>(Cluster.java:118)
[error] at com.datastax.driver.core.Cluster.<init>(Cluster.java:105)
[error] at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:174)
[error] at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:1075)
show fullClasspath - contains guava
Attributed(/home/kiranraj/.ivy2/cache/com.google.guava/guava/bundles/guava-16.0.1.jar)
Update guava to the lastest version.
You can also check if is conflicting with any other JAR.

Resources