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.
Related
I am developing a JEE project using Eclipse JEE (2019-09), Maven, Wildfly 17, JSF, PrimeFaces 7.0 running on Ubuntu 18.04.
My project used to compile, deploy and run on the WildFly 17 server until today. However, because I recieved strange errors when debugging, I installed an earlier Eclipse IDE to try to run my project on it.
After installing the older version of Eclipse (2019-03) in its own dedicated workspace, I got this error message when deploying my application to WildFly:
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class
I then switched back to my initial Eclipse JEE (2019-09) Version, but then I kept recieving the same error message upon deploying.
I' ve searched the internet and found these two similar problems:
Error getting reflective information for class
Wildfly: Error getting reflective information for class
but actually not a solution to my problem.
Could somebody please help?
The problem was that the Maven jar- dependencies were not added to the WEB-INF/lib path.
Actually, in the deployed .war file the folder WEB-INF/lib was completely missing.
I fixed the problem by right-mouse click on my project in Eclipse, then "Properties", then "Deployment Assembly".
I added the missing entry "Maven Dependencies" as follows:
1.) BEFORE MY FIX:
2.) AFTER MY FIX:
I have written code in Eclipse Juno, but my webapp is not working when I view it in the browser. The browser opens, but after that there is no action.
Eclipse's console isn't showing any errors, but after adding the Apache Poi jar file, it is showing following error:
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Currently, I am using Mozila Firefox 33.0.1. I tried to run the code with different Selenium jars like 2.44, 2.45 and 2.46.
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.
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.
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.