Error Running GWT on Eclipse - eclipse

i had a problem running Internationalization code (GWT teck. on Eclipse) and had the following console result
Jul 16, 2014 9:45:11 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
[WARN] Server class 'org.eclipse.jetty.servlet.listener.ELContextCleaner' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/Dev/eclipse-standard-kepler-SR2-win32-x86_64/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.6.0/gwt-2.6.0/gwt-dev.jar' to the web app classpath for this session
Searching online found out something about creating new key
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Prefs
if So then how to create this KEY??
and what exactly causes this problem??

These are WARN lines, so they shouldn't cause any compilation or runtime problem and your project should eventually compile and run.
It seems some code in your server wants to store something using the java.util.prefs api and it is failing because your preferences repository has some problems (maybe permissions, or it is full, etc) or the class using it is storing something wrong.
The GWT compiler, stores some info in your java preferences as well, but it does it in compile time, so if it failed you should see a different line, see CheckForUpdates class.
Other WARN lines in your logs are normal in dev-mode.

Related

Unable to start aplication server from Intershop Studio

After upgrading Intershop project from version 7.10.29.2 to 7.10.38.9-LTS (using Responsive Starter Store 32.2.3) application server can't be started from Intershop Studio any more.
I noticed that the server launch configuration classpath for tools.jar points to the wrong place (${IS_HOME}/engine/jdk/lib/tools.jar instead %JAVA_HOME%/lib/tools.jar) but I was unable to change the classpath permanently - all changes in classpath configuration are ignored without any warning or error after applying them.
Jun 13, 2022 10:16:21 AM org.apache.tomcat.util.scan.StandardJarScanner processURLs
WARNING: Failed to scan [file:/C:/DEV/intershop-ci/sources/projects/webshop/build/server/local/engine/jdk/lib/tools.jar] from classloader hierarchy
java.io.FileNotFoundException: C:\DEV\intershop-ci\sources\projects\webshop\build\server\local\engine\jdk\lib\tools.jar (The system cannot find the path specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:228)
at java.util.zip.ZipFile.(ZipFile.java:157)
It could be related to the selected Version field in the "Server and Developer Home" configuration. You can find that preference dialog in Window->Preferences->Intershop Studio

Intellij 15.0.5 issue with SBT and Scala project

I am trying to set up IntelliJ for my Scala development after hearing how much better it is compared to alternatives. But I can't seem to run anything. The problems I'm facing are as follows:
As soon as the project is created, the console shows SBT failures
My build.sbt file shows red wiggles (compile time errors)
The confusing part is that opening the "SBT Console" view from within the IDE works fine.
The error trace is something along the lines of:
[info] Loading project definition from D:\workspaces\intellij\scala\untitled\project
java.io.IOException: The filename, directory name or volume label syntax is incorrect
[error] (*:update) java.io.IOException: The filename, directory name or volume label syntax is incorrect
Would anyone please know what can cause this? I have tried deleting the project and creating a new one but the problem still persists.
UPDATE
Just had a look at .sbt\boot\update.log and something seems fishy. Is it just me or the sbt.ivy.home is completely borked?
impossible to define new type: class not found: org.apache.ivy.osgi.obr.OBRResolver in [] nor Ivy classloader
impossible to define glob matcher: org.apache.ivy.plugins.matcher.GlobPatternMatcher was not found.
setting 'jline.esc.timeout' to '0'
setting 'sbt.ivy.home' to 'D:\software\installed\sbt\.ivy2 -Divy.home=D:\software\installed\sbt\.ivy2'
setting 'java.runtime.name' to 'Java(TM) SE Runtime Environment'
I have finally managed to hunt down the root cause. The errors were due to rogue environment variables set in my profile related to SBT (specifically SBT_OPTS). Once I deleted all of them and started with a clean slate, things started working on expected.

GWT Maven : Module 'xxx' may need to be (re)compiled

Problem: Keep getting "module 'xxx' may need to be (re)compiled".
Steps:
Importing a sample GWT-Maven project into eclipse ("MobileWebApp" - from the GWT SDK).
GWT|compile the project.
Running in production mode (without the codesvr parameter, i.e. using "localhost:8888/MobileWebApp.html").
Notes:
I am fairly new to both GWT and Maven.
I read GWT module may need to be (re)compiled REDUX.
Dev mode does work (I am able to debug the application).
Detailed Steps:
Copying the "MobileWebApp" folder from the "samples" folder inside the GWT SDK (version 2.5.1) to my eclipse workspace.
Importing the project: File->Import->Existing Maven Projects (pointing to the "MobileWebApp" folder where the pom.xml exists.
Configuring the project following these steps: https://developers.google.com/eclipse/docs/faq?hl=iw#gwt_with_maven
At this point I am able to run the app as "Web Application" and debug it.
Running GWT|Compile: The nocache.js stuff is being placed in the target folder.
Now, when i try to run the app in production mode I am getting the (re)compile error.
Logs:
"DataNucleus Enhancer (version 1.1.4) : Enhancement of classes
DataNucleus Enhancer completed with success for 0 classes. Timings : input=713 ms, enhance=0 ms,
total=713 ms. Consult the log for full details
DataNucleus Enhancer completed and no classes were enhanced. Consult the log for full details"
"Compiling module com.google.gwt.sample.mobilewebapp.MobileWebApp
Validating units:
Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Compiling 6 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compiling permutation 5...
Compile of permutations succeeded
Linking into D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\mobilewebapp
Invoking Linker AppCacheLinker
Be sure your landing page's tag declares a manifest:
Link succeeded
Compilation succeeded -- 152.077s"
"Initializing App Engine server
06/07/2013 20:12:33 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
06/07/2013 20:12:33 com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\WEB-INF/appengine-web.xml
06/07/2013 20:12:33 com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed D:\workspace\eclipse\MobileWebApp\target\MobileWebApp-1.0-SNAPSHOT\WEB-INF/web.xml
06/07/2013 20:12:34 com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
06/07/2013 20:12:36 com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector#0.0.0.0:8888
06/07/2013 20:12:36 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at localhost:8888/
06/07/2013 20:12:36 com.google.appengine.tools.development.DevAppServerImpl start
INFO: The admin console is running at localhost:8888/_ah/admin
Linking modules
Bootstrap link for command-line module 'com.google.gwt.sample.mobilewebapp.MobileWebApp'
Linking module 'mobilewebapp'
Invoking Linker AppCacheLinker
DevMode warning: Clobbering appcache.nocache.manifest to allow debugging. Recompile before deploying your app!
Be sure your landing page's tag declares a manifest:
06/07/2013 20:13:38 com.google.apphosting.utils.jetty.AppEngineAuthentication$AppEngineAuthenticator authenticate
INFO: Got /MobileWebApp.html but no one was logged in, redirecting."
Pom.xml: https://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/mobilewebapp/
Thanks ahead.
Answering my own question:
1) from command: "mvn gwt:run".
2) Google|GWT compile.
P.S. As much as I am happy figuring that out (after agonizing couple of days) I would still like to know the reasons of why I have to - first lunch the app then compile it. Very strange - in my humble opinion.
offtopic: This sample app was supposed to be "offline executable" (from mobile, at the very least) - so how exactly do I test it? I tried (after running the app once or twice from mobile device, so that it will be cached) to switch to airplane mode and navigating to the app (just like he demonstrated) but, obviously(?), the server is not reachable.. Do I need to enable something specific for it to work? (my mobile device is Google-Nexus-4)
Multiple steps:
Update Project properties -> deployment Assembly using Deploy GWT maven project with eclipse deploys webapp directory instead of target/project directory
mvn clean package
mvn gwt:compile
In eclipse, click on 'GWT Compile Project' -> Advacned -> Remove '-war src/main/webapp' argument and hit compile.
Output should be like this -
Linking into target/project-1.0-SNAPSHOT/ModuleName
Now the deployment should work fine.

Runtime error with "GWT 2.4 - expenses sample"

I am using Eclipse Indigo for Java EE (and I have installed the m2e plugin).
I have a runtime error when launching the "expense" sample given with GWT 2.4. I launch it, the app load, then draw the interface and after the console give this error :
Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Successfully processed D:\DL\000-code2012\0-ALL-SRC\6-Expenses\src\main\webapp\WEB-INF/appengine-web.xml
Successfully processed D:\DL\000-code2012\0-ALL-SRC\6-Expenses\src\main\webapp\WEB-INF/web.xml
The server is running at http://localhost:8888/
log4j:WARN No appenders could be found for logger (org.hibernate.validator.util.Version).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Sat May 05 12:03:40 BOT 2012 com.google.gwt.sample.expenses.client.ExpensesShell
SEVERE: One or more exceptions caught, see full set in UmbrellaException#getCauses
com.google.web.bindery.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:299)
at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$4.onTransportSuccess(AbstractRequestContext.java:951)
at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
etc......
Firstly, to compile successfully the projet I had to quick fix 2 errors in the POM.xml (it was impossible to download files from 2 repositories...so I had to ignore them).
Then, if it is because I have not the "buildhelper" plugin for maven, I just can not found it (I tried it with Maven > Discovery > Catalog)...
I also configured correctly (I suppose) the java compiler for the annotation processing.
Finally, when I clean or compile the project I have a this error (A problem occured) :
Cannot run program "C:\glassfish3\jdk7\bin\javaw.exe" (in directory "D:\DL\000-code2012\0-ALL-SRC\6-Expenses"): CreateProcess error=206, filename or extension too long
Cannot run program "C:\glassfish3\jdk7\bin\javaw.exe" (in directory "D:\DL\000-code2012\0-ALL-SRC\6-Expenses"): CreateProcess error=206, filename or extension too long
It is written twice when I click on "Details"
Could somebody has a solution for this problem ?
Thank you.

Vaadin GWT compilation fails: nocache.js file not found

Whenever i compile my widgetset using the eclipse compilation tool (plugin) and maven install. The tomcat server cannot find this file even though it's placed right under my VAADIN/themes/widgetsets folder?
The error i get isnt very helpful:
Feb 20, 2012 7:20:47 PM com.vaadin.terminal.gwt.server.AbstractApplicationServlet serveStaticResourcesInVAADIN
INFO: Requested resource [VAADIN/widgetsets/org.bixin.dugsi.web.DugsiManagerWidgetset.gwt.xml/org.bixin.dugsi.web.DugsiManagerWidgetset.gwt.xml.nocache.js] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
EDIT:
if anyone else noticed this, the file nocache.js is located in VAADIN/widgetsets/org.bixin.dugsi.web.DugsiManagerWidgetset but the server is looking in
VAADIN/widgetsets/org.bixin.dugsi.web.DugsiManagerWidgetset.gwt.xml/
it added .gwt.xml to file directory for some reason? how can i fix this
How can i refresh tomcat within eclipse?
Have you checked that the .gwt.xml postfix is not in your web.xml. It should be:
<init-param>
<description>Application widgetset</description>
<param-name>widgetset</param-name>
<param-value>org.bixin.dugsi.web.DugsiManagerWidgetset</param-value>
</init-param>
You can see detailed Vaadin compilation command on the first few lines of console output by enabling "verbose compilation output" on Properties -> Vaadin section. Your file may be located in wrong place other than specified in verbose compilation command.
Also, your related file may be located in a directory which has space characters. This may be an error for the compiler.
Error may be caused of another unrelated item too. Probably you can find the real cause by examining verbose compilation output.