Google app Engine Application error - google-app-engine

I am trying to run the guestbook application https://developers.google.com/appengine/docs/java/gettingstarted/creating but getting error:
Error screenshot at the url http://goo.gl/rw0dnR
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: connect failed: Connection timed out
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:741]
I tried it on Eclipse. In Eclipse I click Run menu and then "Debug As"->"Web application". The error popup says:
Problem Occurred: 'Launching Guestbook' has encountered a
problem.Cannot connect to VM. (Cannot connect to VM
com.sun.jdi.connect.TransportTimeoutException)
Could anyone help me troubleshhot.
The code is:
package guestbook;
import java.io.IOException;
import javax.servlet.http.*;
public class GuestbookServlet extends HttpServlet {
#Override
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
resp.setContentType("text/plain");
resp.getWriter().println("Hello, world");
}
}

The code looks fine and it evidently compiles without error. The problem appears to be rather low down in the run time environment of Eclipse, the AppEngine development environment or the Jetty web application server.
I suggest uninstalling and re-installing Eclipse and the AppEngine SDK, or better still try with another computer.
Is another process listening on port 8888? On Windows use netstat -an at a command prompt to check.
You could try another port number. In Eclipse select Run, Debug Configurations..., your project name, Server. Change from 8888 and try again.
To prove that Eclipse is not the problem, temporarily use a fresh copy in a spare directory. Get it from from Eclipse Downloads, selecting "Eclipse IDE for Java EE Developers" and the appropriate 32 bit or 64 bit version. Add both the Google Plugin for Eclipse and App Engine Java SDK using the Eclipse Help -> Install new software... options, working with https://dl.google.com/eclipse/plugin/4.3 as the available software site.

Related

Cannot use chectl auth:login or server:shutdown

I am attempting to restart my local eclipse che server after editing some configuration. I attempted to run chectl server:stop, but got this error:
» Error: E_SHUTDOWN_CHE_SERVER_FAIL - Failed to shutdown Eclipse Che server. Login context is not set. Please login
» first.
So I attempted to login with chectl auth:login, but was again presented with an error:
Using https://che-che.169.254.109.208.nip.io/api server API URL to log in
Error: Command failed with exit code 1: oc status
error: you do not have rights to view project "default" specified in your config or the project doesn't exist
I've looked through the documentation, and couldn't find how to create a "default" project
I used chectl server:deploy --platform=docker-desktop to start my server.
I have tried other methods of deploying che, but it only worked when using Docker desktop without helm.
I am using Windows 10 home, and deploying it using Docker desktop (Engine v19.03.13) and kubernetes version v1.19.3.
Edit: I have filed a bug report on github: https://github.com/eclipse/che/issues/18355

Why do I receive a Service Unavailable message after running the project GWT?

I am creating a GWT project from the GWT Material official website using maven. I am following the tutorial offered by the site: http://gwtmaterialdesign.github.io/gwt-material-demo/#gettingstarted . Im getting this in the view page:
HTTP ERROR: 503
Problem accessing /index.html. Reason:
Service Unavailable
Powered by Jetty://
I tried all the solution proposed here but I failed to view the project homepage.
There is no error in the eclipse console. but when inspecting the home page im getting this error:
Voice Instead ready.
content.js:29 Object
favicon.ico Failed to load resource: the server responded with a status of 503 (Service Unavailable)
enter code here
after running the project
in the window Developement Mode in the Jetty console next to Developement Mode
i have problem with Jetty. i don't know
What is jetty and what it allows to do? Im getting this error :
`00:00:16,662 [WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload#3772b95a{/,file:/C:/Users/Mm/eclipse-workspace/com-gwtmaterial-tutorial/target/com-gwtmaterial-tutorial-1.0-SNAPSHOT/,STARTING}{C:\Users\Mm\eclipse-workspace\com-gwtmaterial-tutorial\target\com-gwtmaterial-tutorial-1.0-SNAPSHOT}
<pre>java.util.zip.ZipException: invalid entry size (expected 4178 but got 10926 bytes)
at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:384)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:196)
at java.util.jar.JarInputStream.read(JarInputStream.java:207)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:140)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:118)
at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:142)
at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:179)
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:915)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:831)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)</pre>`
I solved it by following the next step:
1- Close Eclipse.
2- Go to user directory and delete the .m2 directory.
3- Open Elipse.
4- Right click on the project -> Run as -> maven install

Codename one BrowserComponent crash

I have been developing an app that uses a payment gateway and I tried using a browserNavigation callback to execute some Java code when the return URL is loaded. My problem is that, the app crashes just before the for containing the browser component loads.
Below is the error it reports:
Exception "java.lang.ClassNotFoundException: com/intellij/codeInsight/editorActions/FoldingData"while constructing DataFlavor for: application/x-java-jvm-local-objectref; class=com.intellij.codeInsight.editorActions.FoldingData
Exception "java.lang.ClassNotFoundException: com/intellij/codeInsight/editorActions/FoldingData"while constructing DataFlavor for: application/x-java-jvm-local-objectref; class=com.intellij.codeInsight.editorActions.FoldingData
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x54c3249e, pid=28320, tid=31852
JRE version: Java(TM) SE Runtime Environment (8.0_40-b26) (build 1.8.0_40-b26)
Java VM: Java HotSpot(TM) Server VM (25.40-b25 mixed mode windows-x86 )
Problematic frame:
C [jfxwebkit.dll+0x5d249e]
Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
An error report file with more information is saved as:
C:\Users\MY_COMPUTER_NAME\IdeaProjects\My_APP_NAME\hs_err_pid28320.log
If you would like to submit a bug report, please visit:
http://bugreport.java.com/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
That's one of the many JavaFX bugs in the JVM and webkit support... You do however have a very old version of the VM. I recommend upgrading to the latest version of Java 8 as some of those crashes were resolved.

Remote implementation for app_identity_service.GetAccessToken failed at GAE PHP dev

Google App Engine SDK for PHP (at local environment) returns error on any try to use Google Cloud Storage. Error message is:
Fatal error: Uncaught exception 'google\appengine\runtime\RPCFailedError' with message 'Remote implementation for app_identity_service.GetAccessToken failed' in /media/data/home/vladimir/setup/gae/google_appengine/php/sdk/google/appengine/runtime/RemoteApiProxy.php on line 92
It exactly repeats the problem described here:
App engine update breaks CloudStorage in dev php env
Test code from the question above shows the same result.
I tried App Engine SDK for PHP versions 1.9.19, 1.9.20, 1.9.21 without success.
On Win10 this issue can be solved by generating an application-default credentials file:
D:\Workspace\Sourcecode>gcloud auth application-default login
Credentials saved to file: [C:\Users\Otje\AppData\Roaming\gcloud\application_default_credentials.json]
And then setting the environment in commandline:
D:\Workspace\Sourcecode>SET GOOGLE_APPLICATION_DEFAULT=C:\Users\Otje\AppData\Roaming\gcloud\application_default_credentials.json
Seems to me GAE on local just outputs limited error information when it can't find the right credentials to succesfully connect to remote endpoint.
It seems that it was GAE's server side issue. They fixed it. I discovered that it started to work as expected today without any changes applied by me.

jdbc connection fails while running the program from jar file

I've got an application, where I use a JDBC connection. When I run it from the Eclipse environment, there's no problem with anything, neither with connection.
But, when I pack it into executable jar file, and run it from command line, while calling the line
DriverManager.getConnection(url, user, password);
with correct credentials, the application gets frozen. (With wrong login attempt everything is ok - the SQLServerException is thrown).
I tried to create the jar file with different library choices, but the result is the same.
Can anyone help?
I use sqljdbc4.jar library
Constructor of my Database class:
public Database(String url, String user, String password) throws SQLException, ClassNotFoundException {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
System.out.println("forname");
connection = DriverManager.getConnection(url, user, password);
System.out.println("get connection");
}
After correct login no Exception is thrown and "get connection" string is not printed out (only "forname" string is printed)
Are you using Java 6 Update 29? If so Update to Java 6 Update 30 or higher (preferably the latest: Update 32). There was a bug in that Java version which caused the Microsoft SQL Server JDBC driver to hang.
"frozen"? Are you catching an Exception with an empty catch block?
I'll bet the JDBC driver JAR is in the CLASSPATH when you run in Eclipse but not when you run the executable JAR. Add the Class-Path to your JAR manifest and put all the JARs with your executable JAR. That should do it.

Resources