Yesterday I launched our first AWS Elasticache Redis instance, but haven't been able to use it yet via a JAVA API (Although the HTTP API seems quite straightforward to use)
I've tried first using the libraries available by including the following in the pom.xml file:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.11.86</version>
</dependency>
Then I realized I must just need:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-elasticache</artifactId>
<version>1.11.86</version>
</dependency>
But there's also available:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>elasticache-java-cluster-client</artifactId>
<version>1.1.1</version>
</dependency>
And I've found the Javadoc at:
http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/elasticache/AmazonElastiCacheClient.html
But haven't able to really put/get data from the cache, as I haven't found any actual instructions on the libraries, could anyone please point me in the correct direction?
aws-java-sdk-elasticache is only for managing your Elasticache resources through the AWS API. Not for connecting and manipulating data inside the Elasticache server.
I think elasticache-java-cluster-client is only for Memcached clusters. Are you using Memcached or Redis?
If you are using Redis you should use a Java Redis client like Jedis.
Related
What are the differences between the below-secret manager dependencies and when to use what?
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>secretsmanager</artifactId>
<version>${aws-api.version-2}</version>
</dependency>
and
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-secretsmanager</artifactId>
<version>1.11.549</version>
</dependency>
The AWS Java SDK that uses the software.amazon.awssdk package name is Version 2 of the AWS SDK for Java.
The one that uses the com.amazonaws package name is Version 1 of the AWS SDK for Java.
It seems Amazon released a new version for DynamoDbLocal today (10/08/2022) with an empty jar file into thir specific repository. https://s3-us-west-2.amazonaws.com/dynamodb-local/release
If you use the recommended dependency from their documentation:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>DynamoDBLocal</artifactId>
<version>[1.12,2.0)</version>
</dependency>
... then your build will mysteriously fail from today, becasue maven will load the latest available version below 2.0.
Change your dependency to the latest working version:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>DynamoDBLocal</artifactId>
<version>1.18.0</version>
</dependency>
We're migrating an application from JBoss AS 5.1 to JBoss AS 7.4 (EAP 6.3). In there, we consume an RPC encoded web service.
We had used the Sun XML RPC lib to autogenerate Java source from the WSDL, which was awfully old even back then, and some SAAJ version related conflicts occurred which were just so resolvable in the JBoss environment. So we ruled out using the Sun RPC lib in the JBoss 7 environment.
It was suggested to us to use Axis 1.4 to generate classes from the WSDL. However, it is also ancient (2006), so I'm afraid we'd just end up with a similar conflict as with Sun RPC.
So I'm wondering whether anyone has sucessfully deployed classes autogenerated from Axis 1.4 in JBoss 7 (on Java 7) and whether they encountered library conflicts?
It worked. I had to add these artifacts:
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.5</version>
</dependency>
which didn't cause any conflicts in JBoss EAP 6.3. I was kinda expecting a SAAJ conflict, but it appears to serve as a client for the webservice, Axis doesn't need SAAJ (or it's content to use the SAAJ it finds in the platform)
I'm implementing a custom Mediator for wso2esb-4.7.0. Obviously as my classes will be running within the context of wso2esb, I expect them to utilise the same deps.
wso2esb has, for whatever curious reason, been deployed with custom builds of its dependencies. Eg. They expect you to point at their custom mvn repostiory and use artefacts suffixed with "-wso2vn" Eg. axis2-kernel/1.6.1-wso2v9
This has worked for most of the dependencies which get shared with the wso release, however wso2esb uses its own logging artefact with its own versions of sl4j and commons-logging:
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>logging</artifactId>
<version>4.1.0</version>
</dependency>
The problem is that this doesn't exist in their mvn repo, which contains the pom files but not the jar:
http://dist.wso2.org/maven2/org/wso2/carbon/logging/4.1.0/
I'm going to use the non-wso2 specific versions of those jars for now, but will need to resolve this for deployment.
Suggestions welcome.
AFAIK the above dependency is the aggregate module of the logging related dependencies used in WSO2 carbon products. Therefore it will have a pom file only.
Use the following dependency for your requirement.
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.logging</artifactId>
<version>4.1.0</version>
</dependency>
The maven repo link can be found here.
I get this on a lot of Maven dependencies, though current source of pain is Spring.
I'll set a Spring version and include it like so:
<spring-version>3.0.0.RELEASE</spring-version>
<!-- Spring framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring-version}</version>
</dependency>
Which works as expected.
I am however having problems setting my dependency on spring-ws-core for web services. The latest I can find in any repo is 2.0.0-M1.
http://mvnrepository.com/artifact/org.springframework.ws/spring-ws-core
Any clues on what I need to include in my maven POM to get Spring 3 web services to work :)
Well, 2.0.0-M1 is simply the latest version of spring-ws-core.
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>2.0.0-M1</version>
</dependency>
And actually, the current stable version is 1.5.9.
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>1.5.9</version>
</dependency>
Okay,
don't know too much about maven. But spring source have a repository which has maven access at:-
http://www.springsource.com/repository/app/bundle/version/detail?name=org.springframework.web&version=3.0.2.RELEASE
Looks like the maven stuff is
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.0.2.RELEASE</version>
</dependency>
But, again, i use ivy not maven!
Edit:
Oh and instructions for adding maven repository stuff are in the faq at http://www.springsource.com/repository/app/faq#q8.