I wonder if I was asking in the wrong place. I jus...
# lucee
a
I wonder if I was asking in the wrong place. I just spotted some code that I know worked in Lucee 5 failing in Lucee 6.
Copy code
awsCredentials = CreateObject("java", "com.amazonaws.auth.BasicAWSCredentials").init(AWSUser, AWSKey);
PROTECTED.SESClient = CreateObject("java", "com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient").init(awsCredentials);
Was working, but now the second -- not the first, the second -- line fails with...
Copy code
No matching Constructor for com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient(com.amazonaws.auth.BasicAWSCredentials) found
This seems weird to me because it's not that Lucee can't see the AWS SDK -- if that was the problem, I couldn't made the credential object. The problem is that the constructor can't seem to resolve the inheritance properly and I have no idea what I could've done to this poor system to cause that.
m
without looking into it, my best guess would be that Lucee 6 provides a different version of that library where that specific class differs. first thing i would do is simply dump
awsCredentials
, then you may see the origin of that class in the dump.
looking into it a bit, i see that “AmazonSimpleEmailServiceClient” is provided by “aws-java-sdk-ses” and “BasicAWSCredentials” by “aws-java-sdk-core”, so not the same libary, just one depends on the other. So i see 2 potencial issues: 1. this constructor is deprecated (https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/simpleemail/AmazonSimpleEmailServiceClient.html#AmazonSimp[…]edentials-), maybe you have updated the version to a version where it got removed.
a
Yeah, I'm starting to see that too, except I didn't think I had upgraded. Am trying to chase down what it thinks it's doing. Or what somebody did.
Thanks!
m
2. you load 2 different versions of that library and because of that they conflict with each other
but all this is guessing without more info
if you think you have made no chnages to the enviroment, only updated Lucee, feel free to raise a ticket and i will look into it asap.
but to not forget to give details on how the libraries are provided, that is essential
a
I'm not confident that's true yet, but thank you.
m
a
It's s3readBinary doing it.
As soon as I touch that call, the server can't resolve a bunch of aws 1.x classes anymore. I dunno how or why yet.
m
@Asher Densmore-Lynn s3readBinary loads the library via OSGi, that should not affect general classloading outside OSGi I will run some tests based on your input, are you using Lucee 6.2? i’m asking because Lucee 6.2 added support for Maven, what potencially could have an influence on this.
a
I tried upgrading to 6.2 and it showed the same behavior.
I'm putting together a local Docker right now to test things and make a formal test cases and repros, but here's what I've got for now. • Lucee (5.2, 5.3, 6.1, 6.2) is Largely Compatible with the AWS JDK 1 I've been using. Eveyrthing, up until I started touching things, worked great. • No Lucee was able to understand the Java thing I was trying to do, which presumably involved some kind of unfavorable understanding of class-loaders and inheritance based on the errors returned. • Touching s3readbinary would instantly make the classloading situation far worse, and things that were working a minute ago will no longer work, ever, until the server is restarted.
The s3readbinary thing happens in 6.1 but not the current up-to-the-minute 6.2.0.109-SNAPSHOT, so that's nice. Filing a repro bug on the other issue now.