error: package org.jclouds.logging.slf4j.config does not exist ( the class SLF4JLoggingModule ) - maven

The import specified at the example http://www.jclouds.org/documentation/quickstart/openstack/ fails:
import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
...
Iterable<Module> modules = ImmutableSet.<Module> of(new SLF4JLoggingModule());
The dependencies were added following the instruccions at http://www.jclouds.org/documentation/userguide/installation-guide/:
pom.xml:
...
<dependencies>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-allcompute</artifactId>
<version>1.5.7</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-allblobstore</artifactId>
<version>1.5.7</version>
</dependency>
</dependencies>
...

SOLUTION
1) Add the dependency of the artifact jclouds-slf4j (http://mvnrepository.com/artifact/org.jclouds.driver/jclouds-slf4j/1.5.4)
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-slf4j</artifactId>
<version>1.5.4</version>
</dependency>
2) Rebuild the project
The pom.xml may look like this:
...
<dependencies>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-allcompute</artifactId>
<version>1.5.7</version>
</dependency>
<dependency>
<groupId>org.jclouds</groupId>
<artifactId>jclouds-allblobstore</artifactId>
<version>1.5.7</version>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<artifactId>jclouds-slf4j</artifactId>
<version>1.5.4</version>
</dependency>
</dependencies>
...

My bad. I wrote that doc.
The Get jclouds section on that page previously read
Follow the instructions for Getting the binaries using Apache Ant.
But only linked to the Installation guide at the top. It should have linked directly to the Getting the binaries using Apache Ant section which has the jclouds-slf4j driver in it.
I've added anchors to the Installation guide so you can link into individual sections now. Hope that helps clear it up.

Related

How to overwrite version of spring boot BOM

I have a problem with updating Log4j versions. In my pom.xml file I updated the version like this:
<properties>
// other stuff //
<org.apache.logging.log4j.version>2.16.0</org.apache.logging.log4j.version>
</properties>
But in the dependencies:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>{org.apache.logging.log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>{org.apache.logging.log4j.version}</version>
</dependency>
The versions throw an error that it's override to 2.11.1 from a BOM file. Where can I update my pom to import a 2.16.0 version BOM file?
I guess you can try this to override spring-boot bom.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-bom</artifactId>
<version>2.16.0</version>
<scope>import</scope>
<type>pom</type>
</dependency>
... other dependencies including spring-boot-dependencies
</dependencies>
</dependencyManagement>
NOT GOOD/no effect(maybe for log4j1):
<org.apache.logging.log4j.version>2.16.0</org.apache.logging.log4j.version>
Better
(for spring-boot-parent-based [2-2.6.1]/spring-dependeny-managed):
<log4j2.version>2.16.0</log4j2.version>
;)
Link
So both answers helped me out finding the solution for my problem. The problem was that in my dependency I didn't put a $ sign for my version tag. So with this line of code it works now: <version>${org.apache.logging.log4j.version}</version>

Maven: 1.7.4 openejb dependancy fails

Wanted to make use of openejb on top of tomcat v7 using maven instead of installing tomee. Referring to Apache documentation, 3 dependencies have to be added to the maven project.
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0-6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>openejb-core</artifactId>
<version>4.7.4</version>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>tomee</artifactId>
<version>1.7.4</version>
</dependency>
but the last depency generates following error: Missing artifact org.apache.openejb:tomee:jar:1.7.4
The correct artifactId being visible in:
http://mvnrepository.com/artifact/org.apache.openejb/apache-tomee/1.7.4
is apache-tomee and not tomee
so, replace the last depency by the following one and the problem will be solved:
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>apache-tomee</artifactId>
<version>1.7.4</version>
</dependency>

neo4j.test: "package org.neo4j.test does not exist" error in maven

I have small question: when I add dependency
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>1.8.1</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
to maven, I have error:
package org.neo4j.test does not exist
Why?
I didn't find "neo4j.test" in maven repository (http://search.maven.org/).
TIA.
Eugeny
If your actual code is underneath src/main/java, then the scope should not be test. Otherwise, please provide more details.
I don't use Maven but I copy the jar from http://m2.neo4j.org/content/groups/everything/org/neo4j/neo4j-kernel/1.8.1/neo4j-kernel-1.8.1-tests.jar
You need to use the classifier element:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-kernel</artifactId>
<version>1.8.1</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
Some read: http://maven.apache.org/pom.html#Maven_Coordinates

multiple SLF4J bindings Error with activemq-all-5.6.0.jar

When I upgrade to activemq-all-5.6.0
I get this error during server startup
SLF4J: Class path contains multiple SLF4J bindings
I don't have this issue when using activemq-all-5.5.1
On checking I do find that there StaticLoggerBinder.class in both activemq-all-5.6.0.jar and slf4j-log4j12-1.5.10.jar which is causing the issue
Please do help in debugging this issue
My pom.xml is as follows
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.10</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.5.10</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.10</version>
<scope>runtime</scope>
</dependency>
The active mq dependency is like this
Old Version 5.5.1 (This works)
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.5.1</version>
</dependency>
New Version 5.6.0 (This gives the error)
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.6.0</version>
</dependency>
Thanks in advance.
The ActiveMQ guys use the Maven Shade Plugin to create the activemq-all "ueber" jar. Somewhere between version 5.5.1 and 5.6.0 they added the org.slf4j:slf4j-log4j12 dependency - hence your problem.
Unfortunately because they used the shade plugin you can not use exclusions in your activemq-all dependency definition in your POM.
Instead you will need to completely replace the activemq-all dependency with all the required individual dependencies (except of course the org.sl4j-log4j12 one).
The following page details all the required dependencies:
http://activemq.apache.org/initial-configuration.html#InitialConfiguration-RequiredJARs
Alternatively the following is the list of all dependencies (required and optional) included in the activemq-all jar (taken from the configuration of the shade plugin in the activemq-all pom):
org.apache.activemq:activemq-camel
org.apache.activemq:activemq-core
org.apache.activemq:activemq-console
org.apache.activemq:activemq-jaas
org.apache.activemq:activemq-optional
org.apache.activemq:kahadb
org.apache.geronimo.specs:geronimo-jms_1.1_spec
org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec
org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec
org.apache.geronimo.specs:geronimo-annotation_1.0_spec
org.slf4j:slf4j-api
org.slf4j:slf4j-log4j12
log4j:log4j
Hope that helps.
I had the same problem while using Spring. What helped me was replacing the dependency of activemq-all with:
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-spring</artifactId>
<version>5.14.3</version>
</dependency>
Hope this will help anyone...

Where can I find spring-ldap 1.3.1-RELEASE maven repo

1.2.1 is available, i can get it by
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap</artifactId>
<version>1.2.1</version>
</dependency>
but I can't get the latest build. I have used
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap</artifactId>
<version>1.3.1.RELEASE</version>
</dependency>
I am interested in using the authenticate method of LdapTemplate.
It looks like now they want you to declare dependencies on individual modules.
However, the single module is still there, but you need to use classifier to access it:
<dependency>
<groupId>org.springframework.ldap</groupId>
<artifactId>spring-ldap</artifactId>
<version>1.3.1.RELEASE</version>
<classifier>all</classifier>
</dependency>
It is available in the below link
You can download it here

Resources