AWS SNS issue while creating Topic - amazon-sns

When I try to create a AWS SNS topic, I am getting the error
Exception in thread "main" java.lang.NoSuchFieldError: ALLOW_FINAL_FIELDS_AS_MUTATORS"
The library details are:
aws-java-sdk-1.11.117
jackson-annotations-2.9.0.pr2
jackson-core-2.9.0.pr2
jackson-databind-2.9.0.pr2
As suggested in other posts, I tried by changing the jackson library to 2.6 also but of no use.

The issue is with the conflicted library 'com.fasterxml.jackson.databind' which is added in the library path.

Related

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.FirebaseApp$IdTokenListenersCountChangedListener"

I have updated today Firestore dependency to the latest 19.0.0 version and I get this error:
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.FirebaseApp$IdTokenListenersCountChangedListener" on path: DexPathList[[zip file "/data/app/com.example.firebase-luwVSIdRPV8je9Y9uLU7Vw==/base.apk".
When trying to use:
db.collectionGroup("landmarks").whereEqualTo("type", "museum").get()
How to solve this?
I got the same problem as you. In the firebase release notes May 07, 2019 it says; "If you use Firebase Authentication, update to firebase-auth v17.0.0 or later to ensure functionality alignment with other updated Firebase libraries." So, I changed my firebase auth dependency to the latest version, which means;
com.google.firebase:firebase-auth:17.0.0
and it fixed up my problem. I hope it helps. Best of luck! :)
Also you can check the release notes from here
I got the same problem and I was using com.firebaseui:firebase-ui-auth:4.3.1. I added the dependency com.google.firebase:firebase-auth:18.0.0 and it fixed the problem. It seems like a firebase auth dependency with version equal to or above version 17.0.0 will fix the problem.
Update all the dependencies to the latest version. Sync the project.. delete all the firebase import in every java file and re import..Then rebuild the project
If you are using firebase storage or firebase database, and you got this error- then you have to change your dependency.
Change dependency version above or equal to 17, like below-
implementation 'com.google.firebase:firebase-storage:17.0.0'
implementation 'com.google.firebase:firebase-auth:17.0.0'

Spring Boot Jetty not supported on GAE, but causes my tests to fail when removed?

I am building out an API using Spring Boot, which is being deployed to Google App Engine with Travis CI.
I started my code from Google's Starter Project (https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/appengine-standard-java8/springboot-appengine-standard), which doesn't use the spring-boot-starter-jetty dependency. As such, my project also did not not require it, and everything was deploying fine.
That was until I decided to add a test that uses Spring's TestRestTemplate.getForEntity() method to hit a basic endpoint I could assert on, just to give me some peace of mind that the endpoint could be reached end-to-end. However, I got the following error when running the test locally:
java.lang.IllegalStateException: Failed to load ApplicationContext
[stacktrace]
Caused by: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
[stacktrace]
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
Looking around, it became apparent that I should add the spring-boot-starter-jetty, and the test started passing! Everything looked fine.
However, after committing and deploying to GAE, I now get a 500 Error when trying to hit the endpoint.
I did some digging in Stackdriver, and this is the error that's thrown:
java.lang.RuntimeException: javax.servlet.ServletException: Not running on Jetty, JSR-356 support unavailable
I presume that JSR-356 support is required by spring-boot-starter-jetty, which I presume GAE doesn't support, hence the error. I have reported this upstream here: https://issuetracker.google.com/issues/79235250
Is there a way I can add the dependency without JSR-356 support, or is there another way I can get some form of HTTP End-To-End test to pass?
You can view my source code here: https://github.com/bytelucas/nohold - the test in question is HTTPRequestTest.java.
Looks like Spring boot defaults the starter jetty to 9.1, can you try overriding the default to earlier versions of jetty by adding it (in POM) which uses JSR-353 to see if that fixes the issue instead.

Getting exception when instantiating AlternatorDBClientV2

When I am trying to create a new instance of AlternatorDBClientV2 I am getting below exception.
java.lang.NoSuchMethodError: com.amazonaws.transform.JsonErrorUnmarshaller: method ()V not found
at com.michelboudreau.alternatorv2.AlternatorDBClientV2.init(AlternatorDBClientV2.java:106)
at com.michelboudreau.alternatorv2.AlternatorDBClientV2.(AlternatorDBClientV2.java:100)
at com.michelboudreau.alternatorv2.AlternatorDBClientV2.(AlternatorDBClientV2.java:95)
I am using 0.12.0 version of alternator.
any idea why this exception is occurring.
Thanks!!
I recently ran into this as well.
JsonErrorUnmarshaller is a class internal to Amazon's SDK, and if you take a look in the jar's source, they apparently changed the constructor to take some arguments recently.
That means that the line at https://github.com/mboudreau/Alternator/blob/master/src/main/java/com/michelboudreau/alternatorv2/AlternatorDBClientV2.java#L106 would fail, as it calls new JsonErrorUnmarshaller().
I'm afraid you might need to configure local DynamoDB. Alternator hasn't been updated in 2 years, there's going to be incompatibilities.

What is __meteor_bootstrap__?

I am just starting with Meteor and working on an existing project. I am running into an issue with one of the packages(observatory-apollo) that's has the following line:
__meteor_bootstrap__.app.use Observatory.logger #TLog.useragent
It is complaining that __meteor_bootstrap__.app is undefined.
What is __meteor_boostrap__ exactly? I can't seem to find a description of what it is but from threads, people seem to know how to use it. I can only see it defined in boot.js, but it doesn't really tell me much...
Meteor uses connect npm module under the hood for various reasons, to serve static files, for example. __meteor_bootstrap__.app was the reference to connect app instance.
Before it was __meteor_bootstrap__.app but it changed couple of releases ago and became WebApp.connectHandlers object and is part of WebApp package.
WebApp is a standard package of Meteor, core package for building webapps. You don't usually need to add explicitly as it is a dependency of standard-app-packages.
Example of usage the connectHandlers is to inject connect middlewares in the same way as you would use any connect middleware (or some express middlewares, express is built on top of connect):
WebApp.connectHandlers
.use(connect.query())
.use(this._config.requestParser(bodyParser))
You can look at meteor-router Atmosphere package and take it as an example: https://github.com/tmeasday/meteor-router/blob/master/lib/router_server.js
More about connect: https://npmjs.org/package/connect

How to solve "NullPointerException" with "Server.processing" error while we are using Flex Builder 3 and BlazeDS?

I am using Flex builder 3, BlazeDS, and Java with Spring and Hibernate framework. I using the remote object to load a string from spring's configuration files. But in testing, I found this fault event like this:
RPC Fault
faultString="java.lang.NullPointerException"
faultCode="Server.Processing"
faultDetail="null"
I have checked the configuration in remote-config.xml and services-config.xml. But it looks good. Some people have talked about this problem around the Internet and I think you can help me and them.
I am using these environment:
Flex Builder 3
BlazeDS 3.2.0
JBoss server
Full stacktrace:
[RPC Fault faultString="java.lang.NullPointerException" faultCode="Server.Processing" faultDetail="null"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:220]
at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53]
at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103]
at NetConnectionMessageResponder/statusHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:569]
at mx.messaging::MessageResponder/status()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:222]
The java.lang.NullPointerException indicates an error being thrown on the server. To debug this, active debug logging on BlazeDS in the services-config.xml file. You should see detailed debug information in the server console.
When using the BlazeDS/Spring integration take care that you will need to use a custom exception translator in order to obtain meaningful exceptions. Please read this document http://static.springsource.org/spring-flex/docs/1.0.x/reference/html/ch02s08.html
In your case the error is not related to some configuration problems, it seems that is thrown inside your java method. Use a debugger in order to diagnose properly.

Resources