I am in the process of upgrading a ton of dependencies to get rid of any known vulnerabilities. One of which was an old zookeeper version as a transient dependency.
So using gradle I substituted the version with the latest zookeeper
substitute module('org.apache.zookeeper:zookeeper') with module('org.apache.zookeeper:zookeeper:3.6.1')
However of course it wasn't that easy and I got this error upon startup
2020-05-08 12:03:53,509 [ERROR] (main) org.apache.curator.x.discovery.details.ServiceDiscoveryImpl - Could not register instances - will try again later
org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /applications/...
From what I can tell this is because curator(also a transient dependency) is not compatible with that zookeeper version.
After looking here http://curator.apache.org/zk-compatibility.html I take it that curator is not compatible with zk 3.6.x
and so I settled on this which I assumed would work
substitute module('org.apache.zookeeper:zookeeper') with module('org.apache.zookeeper:zookeeper:3.5.7')
substitute module('org.apache.curator:curator-recipes') with module('org.apache.curator:curator-recipes:4.3.0')
substitute module('org.apache.curator:curator-x-discovery') with module('org.apache.curator:curator-x-discovery:4.3.0')
But it doesn't. I get the same UnimplementedException as before even though they should be compatible?
So am I missing something obvious as to why it won't work?
For the sake of it I've run this for both zookeeper and cura
./gradlew -q dependencyInsight -p ./ --dependency zookeeper
and all the versions are correct (4.3.0 for everything cura related and 3.5.7 for zk)
UPDATE:
So I am not sure if this is just chasing smoke or not, but I found some errors in regards to dropwizard
I was running with this dependency
io.dropwizard:dropwizard-core:2.0.9
that will give the UnimplementedException previously mentioned.
however I saw that curator was also implementing dropwizard but on a different version:
https://github.com/apache/curator/blob/apache-curator-4.3.0/pom.xml#L88
So I downgraded my dropwizard to 1.3.7 which gave me some other errors:
2020-05-11 12:46:39,776 [WARN ] (main) org.eclipse.jetty.server.handler.ContextHandler.ROOT - unavailable
java.lang.ArrayStoreException: org.glassfish.jersey.internal.ServiceFinderBinder
and after investigating it looks like dropwizard is using an older version of jersey, so I upgraded that
substitute module('org.glassfish.jersey.ext:jersey-metainf-services') with module('org.glassfish.jersey.ext:jersey-metainf-services:2.30')
substitute module('org.glassfish.jersey.ext:jersey-bean-validation') with module('org.glassfish.jersey.ext:jersey-bean-validation:2.30')
and now I am back to the original UnimplementedException problem.
So not sure if any of that was relevant or not
I don't really feel like the exception aligns with it, but could the issue be my jersey version?
https://github.com/apache/curator/blob/apache-curator-4.3.0/pom.xml#L72
I am using jersey 2.30
Related
I have just updated java on my archlinux server and now it mess up my tomcat projects.
I want to downgrade java from 11.0.17.u1 to 11.0.13.u8
I looked at my var/cache/pacman/pkg folder and it seems like my old package are still there
jre11-openjdk-11.0.13.u8-1-x86_64.pkg.tar.zst
jre11-openjdk-headless-11.0.13.u8-1-x86_64.pkg.tar.zst
I am trying to run this command to force the installation of this java version :
sudo pacman -U jre11-openjdk-11.0.13.u8-1-x86_64.pkg.tar.zst
But it does not let me and I get this message :
loading packages...
warning: downgrading package jre11-openjdk (11.0.17.u1-1 => 11.0.13.u8-1)
resolving dependencies...
warning: cannot resolve "jre11-openjdk-headless=11.0.13.u8-1", a dependency of "jre11-openjdk"
:: The following package cannot be upgraded due to unresolvable dependencies:
jre11-openjdk
What can I do to force the downgrade?
Further infos:
This is the error I am getting since I updated the JVM
09-Jan-2023 15:46:44.910 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [docs]
java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
The tomcat servers I have not restarted yet (which are still running under the old jvm are doing just fine.
I found this topic here :
ClassCastException when stopping Tomcat 10 inside Eclipse
The solution that is brought is to upgrade the tomcat version. I am in an emergency situation where I don't have the time to update all my tomcat servers right now.
I’m currently seeing an issue with my Java 8/Kotlin unit tests while executing them with Maven. This started happening after upgrading to MacOS Monterey. The tests run fine through IntelliJ.
One thing the tests have in common is, that they open ports/start a service.
In one instance, I’m trying to start a Redis test server on localhost and in a different one I’m opening a random port on localhost (via a wire mock rule).
Has anybody seen this issue before, it seems to solely affect Monterey - I assume I have to somehow grant Maven more permissions?!
Any help is appreciated.
Edit: Here some more info.
Error message (using redis.embedded.RedisServer):
[ERROR] Errors:
[ERROR] RedisCacheServiceTest » RedisConnection Unable to connect to Redis server: 127...
Code piece for this:
redisServer = RedisServer(REDIS_PORT)
redisServer.start()
val config = Config().apply {
useSingleServer().address = "redis://127.0.0.1:$REDIS_PORT"
}
redissonClient = Redisson.create(config)
and a failed assertion on the other (runs fine on other MacOS versions):
response.statusCode().is2xxSuccessful -> false
Code piece:
#Rule
#JvmField
var rule = WireMockRule(Options.DYNAMIC_PORT)
lateinit var uri: URI
Maven version: 3.8.3
Testing framework: jUnit5 (Jupiter)
Looks like this self-resolved by reinstalling Maven through brew. However, it also updated from 3.8.3 to 3.8.5 - so not entirely sure whether it was the upgrade or the reinstall. Regardless, it's fixed, yay!
When running the activator ui on a my mac it crashes and reports the following error.
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:224)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:301)
at java.util.logging.Logger.log(Logger.java:616)
at java.util.logging.Logger.doLog(Logger.java:641)
at java.util.logging.Logger.logp(Logger.java:757)
at org.jboss.netty.logging.JdkLogger.debug(JdkLogger.java:36)
at org.jboss.netty.logging.InternalLoggerFactory$1.debug(InternalLoggerFactory.java:80)
at org.jboss.netty.channel.socket.nio.SelectorUtil.<clinit>(SelectorUtil.java:57)
at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.getMaxThreads(NioServerSocketChannelFactory.java:248)
at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<init>(NioServerSocketChannelFactory.java:115)
at play.core.server.NettyServer.play$core$server$NettyServer$$newBootstrap(NettyServer.scala:47)
at play.core.server.NettyServer$$anonfun$8.apply(NettyServer.scala:127)
at play.core.server.NettyServer$$anonfun$8.apply(NettyServer.scala:126)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer.<init>(NettyServer.scala:126)
at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:280)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:275)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:275)
at activator.UIMain$$anonfun$run$1.apply$mcV$sp(UIMain.scala:110)
at activator.UIMain$$anonfun$run$1.apply(UIMain.scala:110)
at activator.UIMain$$anonfun$run$1.apply(UIMain.scala:110)
at activator.UIMain.withContextClassloader(UIMain.scala:221)
at activator.UIMain.run(UIMain.scala:110)
at activator.UIMain.run(UIMain.scala:87)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.NoSuchMethodError org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
I did a complete fresh install of the type safe activator. I deleted the .activator, .sbt., .ivy, and .ivy2. I tried a brew install with no luck. The projects run correctly with the normal activator run command but I cannot get the ui to work. I did some more research and some have reported that proxies could be the issue but I have no proxies setup. Thanks for the help.
It looks like you somehow have slf4j configured as the implementation of java.util.logging and then a different slf4j is on the classpath, or something like that.
Here are some docs on how java.util.logging gets configured:
http://docs.oracle.com/javase/7/docs/api/java/util/logging/LogManager.html
I might check environment variables (JAVA_OPTS ? SBT_OPTS ?) and maybe poke around for mentions of slf4j in some file in JAVA_HOME.
Just a guess really...
I was trying to upgrade my cassandra 1.2.13 to cassandra 2.0.5 but I was having some issues. I was follwing the instructions here:
https://github.com/apache/cassandra/blob/trunk/NEWS.txt
it says:
2.0.5
=====
...
Upgrading
---------
- If your cluster began on a version before 1.2, check that your secondary
index SSTables are on version 'ic' before upgrading. If not, run
'nodetool upgradesstables' if on 1.2.14 or later, or run 'nodetool
upgradesstables ks cf' with the keyspace and secondary index named
explicitly otherwise...
So since I have not initialized anything (any tables/kspaces and stuff) that matters I did:
nodetool upgradesstables
However when I do that command the following error is thrown at me:
objc[88756]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
I tried googling that error but was still unsure how to proceed. Does someone know how to fix this without screwing up java environment?
I have a MAC OS X 10.9.1
it's a bug in JDK 1.7.0_45. you must upgrade your jdk.
see also Class JavaLaunchHelper is implemented in both. One of the two will be used. Which one is undefined
I'm trying to develop a hivemq authentication plugin.
I have followed the hivemq guide for creating a project, and I am not doing anything in the plugin itself. I return true immediately.
mosquitto_sub -t hey
When I try to connect with mosquitto_sub using the command above, I get the error below.
INFO - Started HiveMQ 1.4.2 in 1528ms
ERROR - An unexpecteed error occured:
java.lang.IllegalStateException: illegal state during login of client mosq_sub_12248_ahmetce
at com.dcsquare.hivemq.handler.protocol.ConnectMessageHandler.logStatus(ConnectMessageHandler.java:176)
at com.dcsquare.hivemq.handler.protocol.ConnectMessageHandler.processSuccessfulLogin(ConnectMessageHandler.java:114)
This is the code I'm testing with: http://pastie.org/8555786#22-23
Has anyone had a similar error?
This is a regression in the 1.4.x HiveMQ line and is fixed in all HiveMQ versions > 1.4.3. The solution is to upgrade the HiveMQ version to a more recent one. (At the time of this writing, 1.4.3 is the most recent stable version, but hotfix versions are available.)