I'm working with Rapidclipse and created a project. I'm always testing my project by running the servlet on a tomcat server. It always work for me until recently. Rapidclipse hang up and i had to close it with the task manager. After i started it again i couldn't start ste servlet anymore. There is always this error message:
I'm desperate! Anyone has a solution for this problem?
Just a rough idea, based on less information you provided.
Did you work with RC4?
If yes, did you try to run a Maven update?
If not, select you project root in RC4. right click, select maven and update project.
Select force update of snapshot releases.
Or, second hint: check you navigation targets.
Related
I removed tomcat server after going into windows-->preferences-->server-->run time environmentsenter image description here. after this its showing red cross on each project .and not running any project even after adding the server. but newly created projects are running without any error. how to fix this red cross error from every project
As mentioned by #howlger, you should clean up your project's Java Build Path so that you only build against one Java runtime.
Ok, so after removing that Tomcat Server Runtime, you were probably prompted to remove it from any projects that were referring to it. If so, this is how to get things working again.
When working with Java, you need a Java Runtime from which to get the classes to compile your own code against. When working with servlets and JSP files, you need to get the Servlet API from somewhere so you can compile against them, and WTP (which you're using) has you get them from an actual server--like Tomcat (ideally the same version of the server you're going to deploy to, so you have the same libraries and classes at development time that you have at runtime). By removing it from your preferences and project(s), they no longer have jar files with those classes to compile your own sources against, so the Java tools don't know what those types are.
That means that fixing the problem requires getting a server runtime back on the Java Build Path. Screenshots are valid for Eclipse IDE 2021-12 (WTP 3.24).
Make sure you have a valid runtime on the Server / Runtime Environments preference page. In this picture, I've let it download both Apache Tomcat 9 and 10 for me. Really, you must have something here to proceed.
Open the Java Build Path property page of your project and select the Classpath node. Unless you select that node, the buttons to Add a Library won't enable.
Select the Server Runtime type of Library from the list. Continue through the later pages in the dialog until you've selected the runtime you intended. Once finished, your Servlets will be recompiled the next time a build happens.
I found the solution for this. To solve this issue just right click on project name and go to properties and then click on project facets. After that, click on runtimes and tick on Apache tomcat and and JRE and then apply. Done.
I just installed a brand new eclipse mars and Spring Tool Suite 3.7.1. And I started with an empty workspace.
I create a gradle project as below:
But it seems to take forever to Create Gradle project.. as below:
Even I force to exit eclipse, it remains there and block the eclipse from exiting. As below:
I have to kill it with task manager.
Why is it so difficult to create a simple gradle project?
ADD 1
Just see this, it seems working.
https://www.timroes.de/2013/09/12/speed-up-gradle/
It takes a long time the first time because all the dependencies are being downloaded to local cache as part of the project setup. Just be patient it should complete eventually (unless there's something preventing gradle from accessing the internet).
The second project you create should be a lot faster as all the dependencies will already be locally cached.
If it already took too much time during the build. Then probably everything got downloaded. Just try switching off the internet during import. That worked for me...
I've upgraded my Grails and on every project ( already created or new ) I have red exclamation mark. Projects are working fine.
I tried to fix it with Groovy-->Fix Compiler Mismatch Problem, with refresh dependence and Project-->Clean but without avail.
I thought that it could be problem with build path but I don't know how to fix it, so if anyone could help...
I have seen this loads of times doing this sort of stuff, the first thing to do is do a grails command wizard and clean
or grails clean
The try doing a
grails refresh dependencies
If you have actually upgraded grails over all and just copied your application folder into the new ggts (grails install) then a few things you need to do:
Create a new project under your new grails/ggts - take a look at applications.properties:
edit current applications.properties :
app.grails.version=2.3.7
Ensure the application version matches what you have in your newly created app under upgrade..
Then open grails-app/conf/BuildConfig.groovy for the new project under new upgrade and check closely the configuration. Infact copy entire BuildConfig.groovy over to your existing project and add any additional plugins you have in your project to the new BuildConfig.groovy
Then retry grails clean grails refresh depenedencies
This should fix issues.
Its most probably due to missing link to grails plugin. You can always delete those red exclamation marks by opening "Problem" view (GGTS -> Windows > Show View -> Others -> General -> Problems) and delete all errors if don't want to see them.
This is doable if you are not running your grails server from GGTS.
-SA
I created a new PlayN project from the 1.2 archetype using the command line given in the GettingStarted wiki page. I then imported this Maven Project into Eclipse, just bringing in the core, java, and html modules. If I right-click the Java project, I can choose my main class, and a window pops up with the background image shown. Note that I've done no real programming yet: I'm just using the default project configuration.
Next, I used GWT-compile through Eclipse on the HTML project, and I got no errors. When I run it as a Web application by using the provided URL (without removing the "?gwt.codesvr=127.0.0.1:9997" bit), the application runs fine aside the Eclipse Console gives a warning about being in Development Mode. (Specifically, "You are running in GWT Development Mode. For optimal performance you may want to use an alternative method.")
However, if I run the application the recommended way, by removing the gwt.codesvr parameter, then I keep getting a dialog box saying "GWT module 'testproject' may need to be (re)compiled."
After reading How do I run a maven/eclipse/GWT/playN app in production mode?, I tried doing mvn test -Ptest-html
and then pointing my browser at http://localhost:8080, but it gives the same error.
Am I doing something wrong?
(EDIT: I have no idea if this next point is significant or not, but I'll share it anyway. When I try to create a project from Eclipse, the newest PlayN archetype I can see is 1.0.3, even after telling Eclipse to update the Maven index. I'm running Eclipse Indigo.)
I guess you are running PlayN 1.0.3.
There is a bug in 1.0.3:
So you need to do the following:
Run GWT-Compile
Run the web application and get the error message: "GWT module 'testproject' may need to be (re)compiled."
Run again GWT-compile, while the Web-Application is running
Reload your browser with CTRL-F5
The important step is step 3.
Note:
You can update to PlayN 1.2 to get rid of the error. For this you have to change the file playn-showcase/pom.xml.
Change the line
<version>1.0.3</version>
to
<version>1.2</version>
I get stuck with m2eclipse and maven. After adding some dependency (hibernate 3.4, but I guess that doesn't really matter) eclipse got stuck with a message like in the title. Removing the dependency from pom file didn't help either. Restarting eclipse, checking out this as a clean project from repo neither. Alwyas gets stuck on refreshing. :/
What can get (m2)eclipse stuck on refreshing the project? All ideas welcome.
Workspace resolution can really slow the dependency resolution down. Maven needs to partially calculate each project to determine the dependency hierarchy, the time taken to do this increases rapidly as the number of related projects increases. To limit this, close projects you're not working on or uncheck the option to resolve workspace projects (so Maven will resolve the dependencies from the local repository, this means you need to install the projects after each update though).
If that doesn't help, try one of these:
Are your Maven settings correct? It may be that the preferences are not pointing to your platform install so Maven is downloading the dependencies to your user home in the background - this can take ages. If so tweak those settings. Select Window->Preferences->Maven and check if it is using the embedded Maven or not.
If you are behind a proxy you will need to set the proxy settings in your preferences, though if the problem is intermittent it won't be that.
Sometimes the persisted container isn't updated, I've never been able to isolate exactly why. I've found that closing the project and reopening can prod the container back into life.