Anyone experiencing Error code -46 on Java SDK 1.20 - philips-hue

Latest Java SDK (1.20) seems to throw NoSuchMethodError when trying to autheticate with the accesspoint using onAuthenticationRequired() ; Once the exception is thrown then all subsequent attempt to connect to the bridge will result in " Error - Code 46 Message bridge not responding"
Anyone experiencing this behaviour, code is executed on
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.8) (6b27-1.12.8)
OpenJDK Zero VM (build 20.0-b12, mixed mode)
Exception in thread "Thread-25" java.lang.NoSuchMethodError: java.lang.Integer.compare(II)I
at com.philips.lighting.hue.sdk.fbp.PHBridgeVersionManager$1.compare(PHBridgeVersionManager.java:83)
at com.philips.lighting.hue.sdk.fbp.PHBridgeVersionManager$1.compare(PHBridgeVersionManager.java:1)
at java.util.Arrays.mergeSort(Arrays.java:1283)
at java.util.Arrays.mergeSort(Arrays.java:1294)
at java.util.Arrays.sort(Arrays.java:1223)
at java.util.Collections.sort(Collections.java:176)
at com.philips.lighting.hue.sdk.fbp.PHBridgeVersionManager.setFallbackBridgeVersion(PHBridgeVersionManager.java:130)
at com.philips.lighting.hue.sdk.fbp.PHBridgeVersionManager.setBridgeVersion(PHBridgeVersionManager.java:365)
at com.philips.lighting.hue.sdk.connection.impl.PHBridgeInternal.processResponse(PHBridgeInternal.java:450)
at com.philips.lighting.hue.sdk.connection.impl.PHBridgeInternal$1.run(PHBridgeInternal.java:122)

Integer.compare was introduced in Java 7 and you're clearly using Java 6 based on the error message.
Try using Java 7 or Java 8.

Related

What causes this fatal error in the Amazon Corretto JVM?

When running my application on the Amazon Corretto JVM I encountered the following error. What does this mean?
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fcde9765caa, pid=1, tid=144
#
# JRE version: OpenJDK Runtime Environment Corretto-11.0.18.10.1 (11.0.18+10) (build 11.0.18+10-LTS)
# Java VM: OpenJDK 64-Bit Server VM Corretto-11.0.18.10.1 (11.0.18+10-LTS, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xc03caa] ObjectSampleCheckpoint::add_to_leakp_set(Method const*, unsigned long)+0x7a
When reporting a JVM crash, always include hs_err.log dump produced by the JVM. A short error message is not enough to provide a definitive conclusion.
In your case, however, the reason is most likely the JVM bug JDK-8236743.
Upgrade to JDK 17+ where the issue is already fixed or disable OldObjectSample events in your JFR recording.

Getting Invalid Yaml exception after we upgraded java version

We have updated the java minor version and Cassandra version as given below.
Older Java version "1.8.0_144"
Newer Java version "1.8.0_261"
Older Cassandra version : 2.1.16
Newer Cassandra version : 3.11.2
Now we are getting below exception :
INFO [main] 2020-08-19 10:55:09,364 YamlConfigurationLoader.java:89 - Configuration
location: file:/etc/cassandra/default.conf/cassandra.yaml
Exception (org.apache.cassandra.exceptions.ConfigurationException) encountered during startup: Invalid yaml: file:/etc/cassandra/default.conf/cassandra.yaml
Error: null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=java.lang.reflect.InvocationTargetException; in 'reader', line 1, column 1:
cluster_name: VV Cluster
We did not change "cassandra.yaml". Same yaml is working on other nodes running on older versions.
Sometimes the issue is not with YAML. As suggested in this Datastax post, you can run a tool utlility like cassandra-stress which bypass the parser. This may help in identifying the real reason of failure.
Sometime it happens that YAML exception eats up the main issue and it appears as invalid yaml exception.

Error messages when deploying a web application in Weblogic 12.1.3

We are trying to deploy our application's .war file in Weblogic 12.1.3 but we get the following error messages:
Task 156 initiated: [Deployer:149026]deploy application sarp on sarp.
Task 156 failed: [Deployer:149026]deploy application sarp on sarp.
Target state: deploy failed on Server sarp
java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
at com.bea.objectweb.asm.ClassReader.<init>(Unknown Source)
at com.bea.objectweb.asm.ClassReader.<init>(Unknown Source)
at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:41)
at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:240)
at weblogic.application.utils.annotation.ClassfinderClassInfos.populateClassInfos(ClassfinderClassInfos.java:193)
at weblogic.application.utils.annotation.ClassfinderClassInfos.<init>(ClassfinderClassInfos.java:44)
at weblogic.servlet.internal.War.initializeClassInfosIfNecessary(War.java:446)
at weblogic.servlet.internal.War.getAnnotatedClasses(War.java:376)
at weblogic.servlet.internal.WebBaseModuleExtensionContext.getAnnotatedClasses(WebBaseModuleExtensionContext.java:63)
at weblogic.j2ee.managedbean.ManagedBeanModuleExtensionFactory.create(ManagedBeanModuleExtensionFactory.java:65)
at weblogic.application.internal.ExtensibleModuleWrapper.createModuleExtensions(ExtensibleModuleWrapper.java:264)
at weblogic.application.internal.ExtensibleModuleWrapper.initDrivenObjectArray(ExtensibleModuleWrapper.java:232)
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:107)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:175)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:170)
at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:80)
at weblogic.work.ContextWrap.run(ContextWrap.java:40)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Why are we getting this error? Any Suggestions?
Regards.
This error is because the version of JDK from your WLS is lower than bytecode is being deployed in your war file.
please check JDK of your WebLogic and your war file.
Weblogic 12.1.3 can use 7 or 8.
EDIT1: log4j2 is an example that has bundled bytecode of Java9 that, when is deployed in WebLogic 12.1.3 an exception is thrown (com.bea.objectweb.asm.ClassReader.<init>). The newest version (without modification) that can be deployed directly in WLS 12.1.3 is log4j 2.8.2.

Cannot deploy weblogic server application that contains log4j 2.9.x

I am not able to start application it gives below exception :
Java.lang.IllegalArgumentException
At com.bea.objectweb.asm.ClassReader.(Unknownsource)com.bea.objectweb.asm.ClassReader.(Unknown source)
Application got started after replacing below jars
Log4j-1.2-api-2.9.1.jar
Log4j-api-2.9.1.jar
Log4j-core-2.9.1.jar
Log4j-slf4j-impl-2.10.0.jar
With
Log4j-1.2-api-2.8.2.jar
Log4j-api-2.8.2jar
Log4j-core-2.8.2.jar
Log4j-slf4j-impl-2.8.2.jar
Since version 2.9.0 there are classes compiled in java 9.
One workaround is to remove them from log4j-api-2.x.y.jar

ClassNotFoundException for parquet on CentOS 7.3

I have been using spark-1.5.2 built with hadoop-1.0.4 along with spark-csv_2.10-1.4.0 and commons-csv:1.1(for reading data). I run naivebayes/randomforest algorithms in CentOS 6.7 and it is working fine. When I upgraded the OS to 7.3, I get the following exception :
Caused by: java.lang.ClassNotFoundException: Failed to load class for data source: parquet.
at org.apache.spark.sql.execution.datasources.ResolvedDataSource$.lookupDataSource(ResolvedDataSource.scala:67)
at org.apache.spark.sql.execution.datasources.ResolvedDataSource$.apply(ResolvedDataSource.scala:167)
at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:146)
at org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:137)
at org.apache.spark.sql.DataFrameWriter.parquet(DataFrameWriter.scala:304)
at org.apache.spark.mllib.classification.NaiveBayesModel$SaveLoadV2_0$.save(NaiveBayes.scala:206)
at org.apache.spark.mllib.classification.NaiveBayesModel.save(NaiveBayes.scala:169)
at com.zlabs.ml.core.algo.classification.naivebayes.NaiveBayesClassificationImpl.createModel(NaiveBayesClassificationImpl.java:111)
... 10 more
This exception happens when I save the model. Training is completed successfully.
Is there anyone else facing this issue ? Are there any OS level package dependencies for spark?

Resources