Comments (9)
Resolved this error. The issue was with mocking.
Thanks!
from powertools-lambda-java.
Hi @gyoga99 I believe this is because of already referenced issue #50
Try using plugin as documented in issue.
<groupId>com.nickwongdev</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.12.1</version>
instead of
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.11</version>
This is also reference in our docs here https://awslabs.github.io/aws-lambda-powertools-java/#install, but I do see that we can probably improve the docs to make it more explicit for all the utilities installation instructions well.
Let me know if this fixes your issue?
from powertools-lambda-java.
Thanks @pankajagrawal16!
That issue got resolved now.
When I running my unit test class. I am seeing java.lang.NoClassDefFoundError
for SqsLargeMessageAspect.class
Dependencies added in pom.xml-
software.amazon.lambda
powertools-sqs
1.3.0
com.amazonaws
amazon-sqs-java-extended-client-lib
1.1.0
from powertools-lambda-java.
Thanks @pankajagrawal16!
That issue got resolved now.
When I running my unit test class. I am seeingjava.lang.NoClassDefFoundError
forSqsLargeMessageAspect.class
Dependencies added in pom.xml-software.amazon.lambda
powertools-sqs
1.3.0com.amazonaws
amazon-sqs-java-extended-client-lib
1.1.0
Hmm this is Strange, What does you pom.xml looks like? Possible to share here ?
from powertools-lambda-java.
I see this warning during mvn clean package
[INFO] Showing AJC message detail for messages of types: [error, warning, fail]
[WARNING] bad version number found in /.m2/repository/org/aspectj/aspectjrt/1.9.6/aspectjrt-1.9.6.jar expected 1.9.2 found 1.9.6
<unknown source file>:<no line information>
[WARNING] advice defined in software.amazon.lambda.powertools.sqs.internal.SqsMessageBatchProcessorAspect has not been applied [Xlint:adviceDidNotMatch]
/.m2/repository/software/amazon/lambda/powertools-sqs/1.3.0/powertools-sqs-1.3.0.jar!software/amazon/lambda/powertools/sqs/internal/SqsMessageBatchProcessorAspect.class:0
pom.xml entries related to SQS Large message processing.
<plugin>
<groupId>com.nickwongdev</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.12.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<complianceLevel>1.8</complianceLevel>
<aspectLibraries>
<aspectLibrary>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-sqs</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<dependency>
<groupId>software.amazon.lambda</groupId>
<artifactId>powertools-sqs</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>amazon-sqs-java-extended-client-lib</artifactId>
<version>1.1.0</version>
</dependency>
from powertools-lambda-java.
Hi @gyoga99
Did you manage to solve this? You pom entries looks correct. Also the warning that you are seeing is strange, coz this should have worked.
Since this warning seems to be coming from your unit test, can you try adding below test scoped dependency to your pom as well ?
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<scope>test</scope>
</dependency>
from powertools-lambda-java.
Hi @gyoga99
Did you manage to solve this?
from powertools-lambda-java.
Hi @gyoga99,
Wondering if the issue is solved now?
from powertools-lambda-java.
@pankajagrawal16 I have not tried this. Will try and update you.
from powertools-lambda-java.
Related Issues (20)
- RFC: Remove support for Java 8 in V2 HOT 7
- Feature enhancement (Logger): automatically intercept Runtime exceptions, and log information HOT 7
- Log level not restored at the end of execution HOT 2
- Support batch secrets retrieval in Parameters module HOT 6
- Maintenance: update jackson and aws-xray-recorder dependencies together HOT 4
- RFC: handle batch messages in parallel in batch module HOT 13
- v2: Example logging configuration needs to be updated HOT 3
- v2 - Params builders do not supply default TransformationManager HOT 1
- bug - v2 - end-to-end tests broken
- AbstractCustomResourceHandler - Unable to send response HOT 2
- LambdaEcsLayout seems to incorrectly serialize the service field HOT 7
- Add support for CRaC
- RFC: support for multi-endpoint HTTP handler Lambda functions HOT 9
- Docs: Add Powertools for AWS Lambda workshop to documentation
- Propagation of request information across thread boundaries HOT 2
- Propagate traces and log context to non-main threads HOT 4
- AppConfig "empty" response handling HOT 4
- Error upgrading aws-java-sdk-v2 monrepo HOT 7
- [Support Powertools for AWS Lambda (Java)]: <your organization name> HOT 1
- RFC: Support Micronaut and Spring Cloud Function (and more?) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powertools-lambda-java.