Jar Dependencies and jar clashes using AWS SDK 1.11.105 - amazon-web-services

We are facing some problem regarding jar dependencies and jar clashes while working with AWS java SDK 1.10.105.
We are seeing that in the AWS SDK httpClient 4.5.2 version is used, while we are using 4.5.0 version in our project. It is also coming for httpcore 4.4.4 jar also. What will be the solution? We are not even sure that whether we are facing this error for the jar clashes, we think AWS SDK is independent of all external jars. Please help.
The error we are facing:
java.lang.ClassNotFoundException: org.apache.http.impl.client.HttpClients
After using same jar version of AWS SDK, now we are facing this error.We are using jodaTime 2.8.1(Same of SDK)
java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.auth.internal.AWS4SignerUtils
java.lang.NoSuchMethodError: org.joda.time.format.DateTimeFormatter.withZoneUTC()Lorg/joda/time/format/DateTimeFormatter;

Please check the dependencies:
-
com.fasterxml.jackson
jackson-modified
2.5.4
-
org.apache.commons
commons-csv
1.1
-
commons-logging
commons-logging
1.1.1
-
com.googlecode.json-simple
json-simple
1.1.1
-
log4j
log4j
1.2.16
compile
-
com.fasterxml.jackson.core
jackson-databind
2.6.6
-
com.fasterxml.jackson.core
jackson-databind
2.6.6

Related

Django deployment error deango.core.exceptions.ImproperlyConfigured

Hey i have an django application which is working fine locally but its not working when it is hosted on a web showing below error
django.core.exceptions.ImproperlyConfigured: Error loading pyodbc module: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/site/wwwroot/antenv/lib/python3.7/site-packages/pyodbc.cpython-37m-x86_64-linux-gnu.so)
Did i miss anything at the time of hosting?
Assuming you got this issue during deployment via DevOps pipeline, you could specify an exact version of python in the UsePythonVersion (including minor version) task.
Supported python versions, you could check the software of the agent image:
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#software
Also, you could try the solution in the following case, by adding deadsnakes repo, installing 3.7 and symlink python to python3.7:
https://github.com/actions/virtual-environments/issues/2634#issuecomment-775808754

Issues after Elasticsearch 1.3.2 upgrade

After upgrade to ES 1.3.2 I'm facing the following issues:
1) On startup got error:
[2014-08-26 11:10:20,285][ERROR][bootstrap ] {1.3.2}: Initialization Failed ...
1) NoSuchMethodError[org.elasticsearch.discovery.zen.ZenDiscovery.(Lorg/elasticsearch/common/settings/Settings;Lorg/elasticsearch/cluster/ClusterName;Lorg/elasticsearch/threadpool/ThreadPool;Lorg/elasticsearch/transport/TransportService;Lorg/elasticsearch/cluster/ClusterService;Lorg/elasticsearch/node/settings/NodeSettingsService;Lorg/elasticsearch/cluster/node/DiscoveryNodeService;Lorg/elasticsearch/discovery/zen/ping/ZenPingService;Lorg/elasticsearch/Version;)V]2) IllegalStateException[This is a proxy used to support circular references involving constructors. The object we're proxying is not constructed yet. Please wait until after injection has completed to use this object.]
2) when I attempt to upgrade the cloud-aws plugin to version 2.3.0 (compatible with ES 1.3) I get:
`Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/plugins/PluginManager : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.elasticsearch.plugins.PluginManager. Program will exit.`
Java version is:
java version "1.7.0_45"
OpenJDK Runtime Environment (amzn-2.4.3.2.32.amzn1-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
Same issue faced with ES versions 1.3.1 and 1.3.0
Surprisingly ES v1.3.2 works fine on java version "1.7.0_25"
The issue is resolved. The issue comes when compilation happens with a different java version and at runtime a different version of java is found. When we looked at the Java -version, it was pointing at 1.7 where as java_home was pointing to 1.6. We also checked command "java which" which was pointing to 1.7. When we checked the script of elastic search, it gives precedence to "JAVA_HOME" and then looks for "java which". Installed JDK 1.7(earlier only JRE 1.7) was installed, uninstalled 1.6 using command
yum install java-1.7.0-openjdk
yum remove install openjdk-6-jre
yum remove java-1.6.0-openjdk
and the issue is resolved..!! :)

WSO2 ESB 4.6.0 classpath issue: httpclient classes cannot be found

On WSO2ESB 4.6.0, I want to deploy a service that depends on redmine-java-api version 1.23. When I look at maven dependencies of the library, I see it requires httpclient 4.2. Although, I put httpclient jar in $ESB_HOME/repository/components/lib folder, I get the exception:
java.lang.ClassNotFoundException: org.apache.http.impl.conn.PoolingClientConnectionManager.
Inside the jar, there is a package named org.apache.http.impl.conn and that package contains the class definition of PoolingClientConnectionManager.
I cannot figure out the problem. What could be the possible solution?
I am not sure about the exact solution. But there is httpclient jar file that is shipped with WSO2ESB by default. I think, it is httpclient 4.1.X jar that does not contain the "PoolingClientConnectionManager" class. In OSGI run time, this jar file may set as the dependency for redmine-java-api (not your httplclient 4.2) However you can get some idea... by starting the WSO2ESB with OSGI console.
sh wso2server.sh -DosgiConsole
Using OSGI console, you check what are the jar files that "org.apache.http.impl.conn" package has been exposed to the OSGI run time of the WSO2ESB. And also it would list down the all the bundles which use the given package. Please use following command.
packages org.apache.http.impl.conn
Have you import the package in MANIFEST.INF file of the bundle ?

lein-ring plugin throws exception

I am trying to use lein-ring plugin. After having installed the plugin any attempt to issue a a lein ring command yields a
java.lang.ClassNotFoundException: javax.xml.stream.XMLInputFactory
I am using leiningen 1.7.1 and java version 1.5.
The XML streaming API wasn't included in the standard JRE until Java 6. You've got a few options:
Upgrade to Java 6+
Download the JSR173 API here
Add [javax.xml/jsr173 "1.0"] to your Leiningen dependencies

camel-example-cxf Not Deployed in ServiceMix 4.4.2

I was trying to run the camel-example-cxf example project which I downloaded from Camel website. (downloaded apache-camel-2.10.2)
I built the project using the pom.xml & the build was successful.
However when I tried to deploy it in servicemix (apache-servicemix-4.4.2) I am getting the following error.
karaf#root> ERROR: Bundle org.apache.camel.camel-example-cxf [43] Error starting file:/C:/apache-servicemix-4.4.2/deploy
/camel-example-cxf-2.10.2.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.camel.camel-example-cxf [43]: Unable to resolve 43.0: missing requirement [43.0] package; (&(package=org.apache.activemq.broker)(version>=5.7.0)(!(version>=6.0.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle org.apache.camel.camel-example-cxf [43]: Unable to resolve 43.0: missing requirement [43.0] package; (&(package=org.apache.activemq.broker)(version>=5.7.0)(!(version>=6.0.0)))
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3446)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1163)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:619)
Please help
Apache ServiceMix 4.4.2 does not support Camel 2.10. You need to use the Camel version that it's shipped with, which is Camel 2.8.
Apache ServiceMix 4.5.0 will ship with Camel 2.10 and ActiveMQ 5.7. This release is in the works currently.
I had the same issue (but with activemq jar) and found that while running maven build i was using a different version than what servicemix had. you can find the version of jar file that are used by servicemix by using "exports" command (type export on servicemix command line) and you would come to know the version. if that is different than what you used for maven build then you would get that error. You have two option then
1. install different bundle in servicemix (with same version as used for maven build)
2. change the pom.xml to build maven build.