I am getting the following error:
[error] ignite - Got exception while starting (will rollback startup routine).
java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
at org.apache.curator.framework.listen.ListenerContainer.addListener(ListenerContainer.java:40)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.start(CuratorFrameworkImpl.java:256)
at org.apache.ignite.spi.discovery.tcp.ipfinder.zk.TcpDiscoveryZookeeperIpFinder.init(TcpDiscoveryZookeeperIpFinder.java:147)
at org.apache.ignite.spi.discovery.tcp.ipfinder.zk.TcpDiscoveryZookeeperIpFinder.registerAddresses(TcpDiscoveryZookeeperIpFinder.java:206)
at org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinderAdapter.initializeLocalAddresses(TcpDiscoveryIpFinderAdapter.java:61)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoveryImpl.registerLocalNodeAddress(TcpDiscoveryImpl.java:317)
at org.apache.ignite.spi.discovery.tcp.ServerImpl.spiStart(ServerImpl.java:343)
at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.spiStart(TcpDiscoverySpi.java:1846)
at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:297)
at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:882)
The project uses the Play Framework which depends on Guava 22.0 with Apache Ignite but the latest Apache Ignite version depends on Guava 16.0. I am using SBT, so Guava 16.0 is being evicted in favor of Guava 22.0. I am wondering, is there another way to resolve the dependency conflict so that ignite uses Guava 16.0 while the rest of the project uses Guava 22.0.
My current idea is to separate the Apache Ignite into a separate submodule and to use sbt-assembly to shade the guava 16 dependency into an unmanaged jar.
before shading the jar, try forcing the guava version to be 16.0, and see if play is compatible with that version.
to force a specific version, add to your build.sbt:
dependencyOverrides += "com.google.guava" % "guava" % "16.0"
The answer was to create a new sub-project inside the main one, where to store the Apache Ignite dependencies.The sub-project must be assembled to jar file with the shaded Guava dependency. Finally, to say on the main project that it depends on the previously created jar file.
Related
Since version 2.7.0 the spring-kafka library pulls the kotlin-stdlib jar.
This is pom version 2.6.9 not having such dependency: https://repo1.maven.org/maven2/org/springframework/kafka/spring-kafka/2.6.9/spring-kafka-2.6.9.pom
And this is pom version 2.7.0 with the new kotlin dependency: https://repo1.maven.org/maven2/org/springframework/kafka/spring-kafka/2.7.0/spring-kafka-2.7.0.pom
Since there are no .kt files in the main source code I think adding kotlin as a compile dependency is an error.
I also excluded it in my project without any issue.
I ask because the github project says to ask in SO when in doubt.
So is this dependency unnecessary and if not what's its purpose?
It is certainly not intentional, the only change I can see in the gradle build script is an update to the kotlin version.
There is no reference to kotlin-stdlib in build.gradle, only
testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
How can i use HPROF for the jars present in karaf's deploy ? .For jars HPROF is used as follows:
java -agentlib:hprof[=options] -jar MyApplication.jar
But how can i provide the hprof option for the jars present in karaf as the jars are started by karaf through their blueprint?
Set the DEFAULT_JAVA_OPTS=%JAVA_MODE% -Xrunhprof:cpu=samples,depth=10,thread=y,file=hprof.txt,cpu=times.The Dump file will be created now
I pulled down the sources and build/published it locally. I want to debug into sources jars. When I publish it locally, I clearly see it also publishes source jars.
[info] published securesocial-testkit_2.10 to local\ws.securesocial\securesocial-testkit_2.10\master-SNAPSHOT\srcs\securesocial-testkit_2.10-sources.jar
I don't know how to reference this jar.
Changing "ws.securesocial" %% "securesocial" % "master-SNAPSHOT" to "ws.securesocial" %% "securesocial" % "master-SNAPSHOT-sources" doesn't work.
Add withSources() to the dependency definition.
From Download Sources in the official documentation of sbt:
Downloading source and API documentation jars is usually handled by an
IDE plugin. These plugins use the updateClassifiers and
updateSbtClassifiers tasks, which produce an Update Report referencing
these jars.
To have sbt download the dependency's sources without using an IDE
plugin, add withSources() to the dependency definition. For API jars,
add withJavadoc(). For example:
libraryDependencies += "org.apache.felix" % "org.apache.felix.framework" % "1.8.0" withSources() withJavadoc()
Note that this is not transitive. Use the update-*classifiers tasks
for that.
You can also run sbt update-classifiers to download sources and javadoc jars for all project dependencies at once
For sbt 1.0, command is sbt updateClassifiers
For me, it worked better with
sbt ';reload plugins; updateClassifiers'
I am writing an Adobe AIR application that needs to build in a CI using maven and nexus. I tried to follow this article which is the most up to date article from the source, but I still don't understand these things:
Are the first and second pom.xml examples in the article in the same pom.xml file?
How do I get the Flex SDK dependencies on my CI?
It would be awesome if someone had a complete project setup and went through the whole thing.
This blog has some useful information on building Air applications with Maven 2.
As far as your numbered questions are concerned
Part 1: The two POMs in the tutorial are different. The first creates the swf package containing your application components. The second POM has a dependency on the swf package (note the dependency in the second POM for the artifactId Air in the first). The second POM defines processing to unpack the swf package (using the dependency plugin), then uses the exec plugin to invoke adt on the unpacked package contents.
The process described is therefore in two parts. The first POM packages the swf files so they are available in the repository. The second POM will retrieve any packages required from the Maven repository and invoke adt to compile them. So if you have multiple Air packages, the second POM can be modified to download the extra packages and compile them.
Part 2: Most of the dependencies you need are hosted in the Sonatype public repository, one notable exception seems to be the adt.jar. You can deploy the adt.jar to a Maven repository manager such as Nexus using the deploy plugin's deploy-file goal.
This would deploy the adt.jar to the repository with credentials matching the tutorial:
mvn deploy:deploy-file -Durl=http://path/to/repository -DrepositoryId=[some.id]
-Dfile=adt.jar -DgroupId=com.adobe.flex.compiler -DartifactId=adt
-Dversion=3.3.0.4852 -DgeneratePom=true -DgeneratePom.description="Flex ADT"
To reference the Nexus public repository, add a repository declaration to your settings.xml or pom.xml like this:
<repositories>
<repository>
<id>nexus-public</id>
<url>http://repository.sonatype.org/content/groups/public</url>
</repository>
</repositories>
I want to include GData Client, which doesn't use Maven, as a dependency into my Maven project. It ships as a bunch of JAR files.
Additionaly, I use Maven Shade Plugin to build an executable JAR without any external dependencies (with the default configuration, no renaming/including/excluding/transforming of dependencies).
How can I do that?
(Just adding the JARs as resources wouldn't work, since the Shade plugin must extract them).
you want to check the maven docs on installing 3rd party jars
Once installed into your local maven repository, shade should be able to use them like any other dependency.
See this answer if you don't want to install the JARs in your repository for whatever reason: Add a dependency in Maven