Error while starting a GAE/GWT project: Unable to restore the previous TimeZone - google-app-engine

When I try to run a GWT App Engine project using the Eclipse plugin, I get the following error:
Initializing App Engine server
[ERROR] Unable to start App Engine server
java.lang.RuntimeException: Unable to restore the previous TimeZone
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:228)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:164)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: java.lang.NoSuchFieldException: defaultZoneTL
at java.lang.Class.getDeclaredField(Class.java:1899)
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:222)
... 6 more
[ERROR] shell failed in doStartupServer method
Unable to start embedded HTTP server
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:102)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)

Chris Cashwell provided the correct answer. But for people like myself who are relatively new to Eclipse, here are more explicit instructions (which I came across here):
Right-click project directory in Project Explorer window
Select Run As > Run Configurations...
Go to Arguments tab
In VM Arguments textbox, add one of the following parameters mentioned by Chris:
-Dappengine.user.timezone.impl=UTC (this worked in my case)
-Dappengine.user.timezone=UTC
Click Apply then Run
In my case, this was done specifically in the context of a PlayN project I am working on, so I was right-clicking the HTML folder. In the end, my VM arguments looked something like this:
-Xmx512m -javaagent:/long/path/to/appengine-agent.jar -Dappengine.user.timezone.impl=UTC

See this bug report. For me, it was fixed by downgrading the JDK from 1.7.0_03 -> 1.7.0_02. Other things that have been purported to work are adding -Dappengine.user.timezone=UTC (or in some cases -Dappengine.user.timezone.impl=UTC) to the JVM flags.

i got this error, and found port already in use in the console.
I closed eclipse and killed javaw.exe. Then everything worked fine.

Related

Apex replay debugger is throwing Java 8 is required to run

I am following this trail and I have completed all the steps correctly. Even I able to download the debug logs.
But Problem occurs when I am trying to run the following command
> SFDX: Launch Apex Replay Debugger with Current File
It shows the below error.
But, the thing is, I have jdk-12.0.1 installed on my PC. After that, I have installed the Java 8 also and thus jdk-1.8.0_181 is also installed.
My Java Home setting in VS code is following
I have also restarted my PC, But no luck. It is throwing the same error.
How to solve this ?
You have to set the path as 'C://Program Files//Java//jdk1.8.0_181' and then restart the vs code
In case any Mac users needed help:
I installed Java 11 and then ran this code:
/usr/libexec/java_home -v 11 to find the exact directory and then pasted it in the user settings you have marked with a red rectangle. Then I restarted VS code and it worked.
Edit: Looked at your screenshots...
You did this: C:\Program Files\Java\jdk1.8.0_181
You wanted this: C:/Program Files/Java/jdk1.8.0_181
From the Trailhead unit you linked:

Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index

Android Studio 3.4.
Project SDK (Android API 19 Platform).
Not using FindBugs or SpotBugs.
Every attempt to build, I get this error:
Information:9/05/2019 4:02 PM - Compilation completed with 1 error and 0 warnings in 1 s 763 ms
Error:Internal error: (java.lang.ClassNotFoundException) com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
java.lang.ClassNotFoundException: com.google.wireless.android.sdk.stats.IntellijIndexingStats$Index
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.intellij.util.indexing.counters.IndexCounters.<clinit>(IndexCounters.java:34)
at com.intellij.util.indexing.impl.MapReduceIndex.<init>(MapReduceIndex.java:86)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex$CompilerMapReduceIndex.<init>(CompilerReferenceIndex.java:214)
at org.jetbrains.jps.backwardRefs.index.CompilerReferenceIndex.<init>(CompilerReferenceIndex.java:73)
at org.jetbrains.jps.backwardRefs.JavaCompilerBackwardReferenceIndex.<init>(JavaCompilerBackwardReferenceIndex.java:12)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexWriter.initialize(JavaBackwardReferenceIndexWriter.java:74)
at org.jetbrains.jps.backwardRefs.JavaBackwardReferenceIndexBuilder.buildStarted(JavaBackwardReferenceIndexBuilder.java:40)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:358)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:135)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:229)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Solved for me, finally, after months. Note that I have never used FindBugs or SpotBugs, although most posts related to this error mention it.
The solution is to change the compiler from javac to Eclipse. I followed the picture here (don't worry if you don't read Chinese; you won't need to; the picture just makes it clear how to change the compiler).
I have no idea why this works and would highly appreciate informed commentary.
I am facing the same issue with android studio 3.4 and 3.4.1 as well but this work fine with android studio 2.3.3 and 3.0 as well.
Bug seems to be in Android Studio 3.4.x so I downloaded beta version of Android Studio 3.5 and error is gone.
You can download preview version from here :
https://developer.android.com/studio/preview/index.html
Partial and temporary fix.
I downgraded Android Studio to 2.3.3 (!) and it worked. I will need to track down what is hard-linking the project to this particular version and fix that, but I need to ship a fix now for the issue at hand.
I get this error message in a Flutter project, when I try to build the project (menu Build/Make Module) whith Android Studio 3.4.2. But I don't get the error when I run the app (menu Run/Run). Running the app does build the project correctly. It seems that menu Build/Make module does not build the app correctly...
So, the solution for me is to run the app, not build it ;-)
Solution
I was able to fix this problem by deleting the system subfolder in Android Studio's configuration folder. No user data is lost and the build starts working again!
Android Studio configuration folder can be found under this locations (for more information see this question):
Linux / MacOSX: /home/USERNAME/.AndroidStudio
Windows: C:/Users/USERNAME/.AndroidStudio
Note that the name of the configuration folder can vary based on the version: it could be .AndroidStudio3.5, .AndroidStudioBeta or others.
Cause
This problem is most probably caused by some corrupted/invalid gradle build files in your project, that cause the system-wide Android Studio configuration to break. So if the problem shows up again after using the solution above, remove cache and build files generated by gradle by following these steps:
./gradlew clean (Linux/MacOS) or .\gradlew.bat clean (Windows): this should work, as it should clean all files generated by gradle.
If you are in a git repository try to remove all untracked files (but please note that this could delete files you want to keep... be sure to commit them first!)
Manually delete build folders, in case the above steps did not work.

KNIME Command Line Execution - ClassNotFoundException

I'd like to schedule a KNIME workflow. The workflow does its job very good as long as I start it from the KNIME GUI application. When I execute the same workflow via command line, java complains that com.microsoft.sqlserver.jdbc.SQLServerDriver
could not be found (ClassNotFoundException).
I invoke it via:
"D:\Progamme\KNIME\knime.exe" -nosplash -application -consoleLog org.knime.product.KNIME_BATCH_APPLICATION -preferences="absolutepathto\preferences.epf" -workflowDir="absolutepathto\workflow"
Since the error message signals missing content in the java CLASSPATH I also tried to add the parameters
-vmargs -classpath .;"absolutepathto/sqljdbc42.jar"
But still I earn a java slap, pointing to the same error...
I also tried to run the command from within the knime.exe's directory and I also tried to add the JAR file to Preferences -> Java -> Build Path -> Classpath Variable / User Libraries (referenced via the -preference argument). But that had no effect.
Did anybody face the same problems? Maybe with other third party JARs?
It is all about a Database connector that is configured like this:
Does the integrated security maybe force a misleading error?
System spec: KNIME 3.2.2 on Windows Server 2008 R2
Update - extract from preferences file
/configuration/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
/configuration/org.eclipse.ui.ide/MAX_RECENT_WORKSPACES=10
/configuration/org.eclipse.ui.ide/RECENT_WORKSPACES=<list of some workspaces>
/configuration/org.eclipse.ui.ide/RECENT_WORKSPACES_PROTOCOL=3
/configuration/org.eclipse.ui.ide/SHOW_RECENT_WORKSPACES=false
/configuration/org.eclipse.ui.ide/SHOW_WORKSPACE_SELECTION_DIALOG=true
Is there maybe a problem due to the fact that it is a shared KNIME instance among several users and the command line execution does not know which workspace has to be chosen? Is the workspace somehow needed and why?
Partial Solution:
I finally managed it but I don't know exactly why it works now. What I did was to load a fresh portable version of KNIME and ran the same commands only changing the executable path to the new portable version. Before that I started the portable version once to set the workspace directory and register the database driver in preferences dialog and .ini file, nothing else, same configuration so far as the shared KNIME instance. What I am really wondering abpout is that from now on the commands are also working with the shared KNIME instance. I really don't know what caused the change that let KNIME find the driver class.
Info
Because I encountered a few more problems within shared environment in KNIME command line mode, that led to undeterministic execution results, I wrote a little .NET library. This gives me more flexibility/control over the workflow execution (which returncodes and error messages occured and so on). You can find it here if you're interested: KnimeNet
I took a very minimal approach:
cd "C:\Program Files\KNIME"
.\knime -nosplash -noexit -consoleLog -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile="D:\Work\Knime Workflows\Output\CMD_Test.knwf" -preferences="D:\Work\Knime Workflows\Output\CMD_Test.epf"

WLP :: Worklight :: Can't install runtime

I'm using Worklight 6.2 server edition and I can't deploy a working runtime (of other environments) on my server.
I'm using webpshere liberty profile v8.5.5 and when I deploy the runtime via GUI it says success and on server.xml I can see the new configuration for the app.
However when I go to the worklightconsole I don't see my runtime to upload the app.
On messages.log there is a error regarding JMX connection.
The quoted error is
Failed to obtain JMX connection to access an MBean. There might be a JMX configuration error: No JMX connector is configured
I'm refering this because I've seen some post on SO saying that these issues might be connected. However I have the restConnector-1.0 on my WLP features.
Reference: No runtime on my Worklight 6.2 Console after installing analytics
On messages.log there is some other things that I found interesting, like the correct start of the runtime I've deployed
[11/12/14 5:50:45:177 CST] 00000012 com.worklight.server.bundle.project.JeeProjectActivator I FWLST0002I: ========= Project /HelloWorld started. The project WAR file version is 6.2.0.00.20140922-2259,running on server version 6.2.0.00.20140613-0730. [project HelloWorld]
and two erros while starting my server
[11/12/14 5:50:49:911 CST] 00000012 SystemErr R 24 WorklightPU WARN [Scheduled Executor-thread-1] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'WorklightPU', root URL [file:/opt/IBM/WebSphere/Liberty/usr/shared/resources/worklight/lib/worklight-jee-library.jar]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
Second error:
java.lang.RuntimeException: Timeout while waiting for the management service to start up
I don't know what these are but I think it might be related to my problem and this errors eventually appear when I start my server.
Does anyone have any tips for troubleshooting this issue?
Thanks in advance.
This is a known issue from Websphere.
There is a APAR to fix that, a workaround is to restart the server with the --clean option to force a refresh onto the shared libraries.
http://www-01.ibm.com/support/docview.wss?uid=swg1PI17830

Google app engine error, don't know where to start looking

I'm receiving this error when I attempt to start an app using google app engine :
Loading modules
com.bookmark.Mobile_bookmark
[ERROR] Unable to find 'com/bookmark/Mobile_bookmark.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] shell failed in doStartup method
I don't have a file called Mobile_bookmark.gwt.xml. My project name is mobile-bookmark
Why is this error occuring ?
If it's looking for Mobile_bookmark.gwt.xml (the wrong file), I'd check how you are starting the server.
For example, under Eclipse, I'd check run configurations --> arguments to see if "Mobile_bookmark" got into there. (you can get to run configurations by selecting the little triangle next to either the green debug or run button you use to start it --- or RUN (menu in eclipse) -- run configurations -- select your project)
Change the file name to whatever *.gwt.xml file you do have. I suspect it's mobile-bookmark.gwt.xml.
Look under /src/yourpath/yourproject/
Your layout is probably like:
/src/yourpath/yourproject/*.gwt.xml
/src/yourpath/yourproject/client
/src/yourpath/yourproject/server

Resources