lein-ring plugin throws exception - clojure

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

Related

Jar Dependencies and jar clashes using AWS SDK 1.11.105

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

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 ?

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.

Can't create an Ember.js application using bpm

I am trying to follow the directions on this ud3323/bpm wiki page to create an Ember.js application using bpm. The very first command on this page (bpm init hello_world) is throwing an exception - "No such file or directory - C:/apps/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/execjs-1.2.13/lib/execjs/support/which.bat" (see the issue logged here - my comment is the second one). I checked the files under execjs directory - there is no file called which.bat. Note that I installed bpm using "gem install bpm". I don't know how to build ud3323's fork (don't know Ruby - I installed it just to try out bpm). Can anybody help me get past this issue?
Thanks in advance for your time.
Naresh,
I got some free time and found the issue. The current build of BPM requires the use of the gem execjs version 1.2.4. You probably have the latest version which is 1.3.0 or the latest from the 1.2.x branch.
What you need to do is install the correct version by running the command gem install execjs --version 1.2.4. After that BPM should work fine. I have it running on Windows7 64bit with a clean installation of Ruby 1.9.2.
Also for anyone else, I have detailed instructions of exactly what I did on this page: https://github.com/ud3323/bpm/wiki/Installing-with-Windows