I am developing an application which uses MWS (Amazon market web services). What I have done import java libraries given by Amazon Configuration application with respect seller or Merchant credential. But when I run application the following error occur at run time. I put my best to get rid off but never find any helpful answer.
AndroidRuntime:
FATAL EXCEPTION: main Process: com.example.aun.sample java.lang.NoSuchMethodError: No direct method (Ljava/lang/String;ILorg/apache/http/conn/scheme/SchemeSocketFactory;)V in class Lorg/apache/http/conn/scheme/Scheme; or its super classes (declaration of 'org.apache.http.conn.scheme.Scheme' appears in /system/framework/ext.jar) org.apache.http.impl.conn.SchemeRegistryFactory.createDefault(SchemeRegistryFactory.java:47) org.apache.http.impl.conn.PoolingClientConnectionManager.(PoolingClientConnectionManager.java:93) com.example.aun.sample.MwsConnection1.getConnectionManager(MwsConnection1.java:260) com.example.aun.sample.MwsConnection1.freeze(MwsConnection1.java:227) com.example.aun.sample.MwsConnection1.newCall(MwsConnection1.java com.example.aun.sample.MwsConnection1.call(MwsConnection1.java:398) com.example.aun.sample.MarketplaceWebServiceProductsClient1.getServiceStatus(MarketplaceWebServiceProductsClient1.java:168) com.example.aun.sample.GetServiceStatus.invokeGetServiceStatus(GetServiceStatus.java:22) com.example.aun.sample.MainActivity.onCreate(MainActivity.java:44) android.app.Activity.performCreate(Activity.java:6092) android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112) android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468) android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595) android.app.ActivityThread.access$800(ActivityThread.java:178) android.app.ActivityThread$H.handleMessage(ActivityThread.java:14 android.os.Handler.dispatchMessage(Handler.java:111) android.os.Looper.loop(Looper.java:194) android.app.ActivityThread.main(ActivityThread.java:5631) java.lang.reflect.Method.invoke(Native Method) java.lang.reflect.Method.invoke(Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteIni) com.android.internal.os.ZygoteInit.main(ZygoteInit)
Your log is missing the name of the missing method. I'm guessing it is "init", but anyways, it seems your build process is broken.
See this almost identical error: NoSuchMethodError: org.apache.http.conn.scheme.Scheme.<init>(Ljava/lang/String;ILorg/apache/http/conn/scheme/SchemeSocketFactory;)V
Related
I am working in Feature store creation with the help of AWS Data wrangler - a feature of AWS Sagemaker Studio. When I try to run the data wrangler job (for ingestion data into feature store), I am encountering the following error.
"ClientError: API error (404): manifest for XXXXXXXXXXXX.dkr.ecr.ap-south-1.amazonaws.com/sagemaker-data-wrangler-container:1.30.2 not found: manifest unknown: Requested image not found"
Some updations are made in Sagemaker studio I guess and this may be beacuse of that is what I am thinking. But not sure what exactly the error means and how it could be resolved. Reason I am saying this is, even the job which ran properly yesterday is failing today. Can anyone please help me with this?
We are currently migrating our App Engine from Java 8 to Java 11 using the bundled services (https://cloud.google.com/blog/products/serverless/support-for-app-engine-services-in-second-generation-runtimes).
We made it as far as that the application seems to be running as expected - BE, FE and Datastore all seem to work in our staging GCP project.
The following errors are showing up in our logs every 10 seconds, however:
Failed to query GCE metadata service
and then
java.io.IOException: com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:70)
at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:609)
at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:488)
at com.google.devtools.cdbg.debuglets.java.GceMetadataQuery.readResponse(Unknown Source)
at com.google.devtools.cdbg.debuglets.java.GceMetadataQuery.queryMetadataAttribute(Unknown Source)
at com.google.devtools.cdbg.debuglets.java.GceMetadataQuery.getProjectId(Unknown Source)
at com.google.devtools.cdbg.debuglets.java.GcpHubClient.registerDebuggee(Unknown Source)
Caused by: com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager
at com.google.apphosting.api.ApiProxy$CallNotFoundException.foreignThread(ApiProxy.java:844)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:117)
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:54)
... 6 more
Edit:
The Cloud Debugger says "The debugger could not find a debug target for the application". The versions still relying on Java 8 work though, so what extra step is missing for the migration to set up the debugger correctly? As we're using the App Engine standard environment, that should be enabled by default (https://cloud.google.com/debugger/docs/setup/java#gae-standard).
Edit 2:
Looks like this could be a Google Cloud Debugger bug:
https://github.com/GoogleCloudPlatform/cloud-debug-java/issues/18
As per the App Engine documentation regarding issuing HTTP requests, if you use URL Fetch, it will cause requests to cloud client libraries (and that includes the Google Cloud Debugger Client for Java) to fail.
As wer are using the bundled services, we are still using an appengine-web.xml file.
We had the following line in there:
<url-stream-handler>urlfetch</url-stream-handler>
Removing that line fixed the issue for us.
I have used https://github.com/watson-developer-cloud/conversation-with-discovery code and deployed application in Bluemix, when I am testing the application conversation is working but discovery service is not working .
I have added OUT_OF_Scope intent with call_discovery action.
I am getting server is busy error when we give out scope question in chatbot.
below is the the log error , please help me to resolve this error.
Exception thrown by application class 'com.ibm.watson.apis.conversation_with_discovery.rest.ProxyResource.postMessage:192'
java.lang.NullPointerException
at com.ibm.watson.apis.conversation_with_discovery.rest.ProxyResource.pos
When I used the conversation-with-discovery I had the same problem, but I see within the Github the solution for this: Switch to the liberty-for-java_v3_7-20170118-2046 buildpack that doesn't have problems with the Java SDK.
Reference: IBM Developer
I am using javapns with Google App Engine. Everything was working fine until this morning. Now, it raises this exception:
java.lang.NoSuchMethodError: sun.security.ssl.SSLSocketImpl.receivedChangeCipherSpec()Z
at sun.security.ssl.Handshaker.receivedChangeCipherSpec(Handshaker.java:356)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:347)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:837)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1026)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1324)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:712)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at java.io.OutputStream.write(OutputStream.java:75)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:402)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:350)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:320)
at javapns.Push.sendPayload(Push.java:177)
at javapns.Push.payload(Push.java:149)
Any idea? I have seen the missing method in JDK7u but I think I am using JDK7. Not sure if this is related.
I contacted Google Support regarding this issue and got the following response:
This is a known issue that is already resolved.
They did not disclosure the root cause.
I was trying to use the BigTable client and ran into the same issue. It's due to the Google API using HTTP2 with TLS. The ALPN library used to support TLS modifies the bytecode on boot up and is tightly coupled with the version of the JRE/JDK you are running. Check the "Versions" table at http://www.eclipse.org/jetty/documentation/current/alpn-chapter.html to match the specific version of ALPN to your JRE and you should be good.
I'm using an opaque library which I'm not sure can work on appengine. I'm just testing out various classes to see what happens, and one particular method causes a AccessControlException to be thrown:
java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0)
There's no stack trace or any other information. Would this exception be thrown if the library tried to do something that appengine doesn't allow, like starting another thread, writing to a file, etc?
I deployed to the production servers and got a much more specific message:
Google App Engine does not support Runtime.removeShutdownHook
So, I guess the answer is "yes."
In case you haven't seen the App Engine class whitelist:
http://code.google.com/appengine/docs/java/jrewhitelist.html