We're using Eclipse 3.4.1 with SpringSource dm Server 1.0. There are two Targeted Runtimes defined (Project / Properties / Targeted Runtimes).
The one we setup is called
SpringSource dm Server (Runtime) v1.0
There is one pre-defined called
SpringSource v1.0
We find that, even though we select SpringSource dm Server (Runtime) v1.0, Eclipse seems to frequently change the Targeted Runtime back to SpringSource v1.0.
Yes, we click Apply and OK on the properties screen.
Anyone seen that before? Any idea how to fix it?
EDIT
Here are images of our Targeted Runtimes and Run Configuration screens.
Targeted Runtime http://johannsen.us/SO/TargetedRuntime.png
Run Config http://johannsen.us/SO/RunConfig.png
Changing the target runtime will not change where your run configuration points.
You need to go into your Run/Debug configuration and change the execution environment there to point to the desired target.
Personally, I think this behaviour is confusing. I recommend filing a bug against Eclipse to make this easier to use.
The problem was that the POM file specified a name of SpringSource v1.0, while the Eclipse runtime environment only had a server defined with the name SpringSource dm Server (Runtime) - which is the default name suggested by Eclipse when creating the server.
Defining a server with a name of SpringSource v1.0, matching what is stated in the POM, resolved the issue.
Related
I downloaded Eclipse. When I tried to create a new Dynamic web project I got this error:
This answer is different from this.
I installed Eclipse JEE, and I am trying to create a Dynamic Web Project.
It's probably because you are not specifying any Target Runtime and the default configuration probably is on an older version.
You can try to configure a new Runtime Environment like below and select it to create your project after with it.
Then you select your server (the example is done with Tomcat but other servers should be similar):
Then select the JRE associated to your runtime:
And finish by creating your Target runtime and use it, it should solve the problem:
Hope it helped!
PS:
You can also configure your Target runtime in Windows->Preferencces->Server->Runtime Environments
I am following hello world application of Amazon Web Services Simple Workflow Service. According to description #Activities annotation should have been able to generate two classes GreeterActivitiesClient and GreeterActivitiesClientImpl. But these classes has not been generated.
I have Enable annotation processing in project properties. I am using Eclipse Mars with Jdk 1.8. I have also installed AWS toolkit for eclipse, aspectj.
Can someone see where the problem is?
Some versions of Eclipse, (notably Mars and Neon), may fail to fetch the latest artifacts due to a bug in old versions of the Oomph plugin. To work around this issue:
Make sure that you’re using https://aws.amazon.com/eclipse/site.xml as the AWS Toolkit for Eclipse update site.
Delete the ~/.eclipse/org.eclipse.oomph.p2/cache/ directory to remove cached content.
Install the latest version of Oomph (Eclipse Installer).
Reference: Set up the Toolkit
I'm using Eclipse 4.4 Java EE with maven. I need to work with some methods that are marked as restricted. So I configured the required access restriction rules in eclipse. An everything's working.
But then I run Maven/Update Project and after that all the previously configured rules are gone. So the question is: how to tell maven about the rules?
If the methods are restricted due to the Java execution environment that Maven configures on your project (e.g. you want to use Java 7 methods while the project is configured for a Java 6 execution environment), then you should configure the Maven compiler plugin in the POM to use the Java version that you want to use (e.g. via the maven.compiler.source and maven.compiler.target) properties.
I've just installed Eclipse Indigo for EE and Java EE 6 SDK/JRE from Sun. I need all those to compile a 3rd party Java project using the "javax.*" classes. What I cannot understand how to reach those classes?
How can I import or otherwise connect to "javax.*" classes inside Eclipse?
They're in the Java EE implementation. In other words, they're in the application server. For example, Glassfish, JBoss AS, Tomcat, etc.
In Eclipse, just integrate the target server in Servers view and associate the dynamic web project with it. You can select it during dynamic web project creation wizard:
or afterwards via Targeted Runtimes in project's properties:
Once associated the project with the application server, Eclipse will do all the necessary magic to make those classes available during compiletime. To verify it, the associated server should be listed as Library in project's Build Path property:
Note once again, you don't need to change/fiddle anything in there! If you did some attempts beforehand while shooting in the dark in order to "fix" this problem, then you should make sure that you've undone it all, or things may still go wrong.
See also:
How do I import the javax.servlet API in my Eclipse project?
Make sure you have all the settings in preferences set. Go to 'Window' -> 'Preferences' and then check the 'Installed JREs', point it to your newest and greatest jre within downloaded jdk. If that doesn't work, download jdk and eclipse Java EE again and start from scratch. Also make sure you have a java and javac added to your PATH (either on Linux or Windows)
I have an existing, fully functional Spring web application based on Spring 2.5.6 - developed using SpringSource Tool Suite 2.1.0.SR1.
Because I'd like to use REST I decided to upgrade to Spring 3.0.0.M4. After editing the dependencies in pom.xml and changing my code to reflect the API changes in Spring 3.0 I tried to publish my web app to a local server (SpringSource tc - a Tomcat derivate).
The result is an almost empty web app folder and therefore a non-functional app. The app's folder only contains WEB-INF/lib with all libraries required by the Maven dependencies.
After realising that something's broken, I created a new Spring MVC project (based on the default 2.5.6) and published it to the same server. No problems. I tried to adapt my project's files (.settings/*, .project, .classpath, .springBeans), but this didn't change anything.
I'm pretty lost right now. My guess is that STS doesn't handle 3.0 apps correctly. Any suggestions?
PS: I don't want to revert to 2.5 if it's not absolutely necessary. I don't need STS and tc so I don't have a problem using other tools, but it worked fine so far.
I run into this all the time using Eclipse Galileo and m2eclipse 0.9.8 and Tomcat with WTP. I think it is m2eclipse that is the culprit. The problem seems worse after switching from Ganymede. The work around is to run mvn to create the war and then copy the war contents from "target" to WTP's "wtpwebapps" directory. You can conveniently find this horribly long path by double clicking the server in the Servers view, and choosing "Open Launch Configuration" from there click on Arguments(?) tab I think and copy the catalina.home java property that is defined as an argument there.
The problem vanished with newer versions of STS. Additionally my development environment changed a bit since I posted this question, so I can't really tell what caused the problem.
For me, it looked like a weird hiccup inside STS.
Spring Tool Suite 2.1.0 claims partial support for Spring 3.0, though not for the REST features. According to the release, future releases will add full support. From the release statement:
Features
Support for milestones of Spring 3.0 including XML editing and validation, support for #Configuration and #Bean annotations
Future
Complete Spring 3.0 support including tools for developing RESTful web applications
Try deploying your app to embedded jetty. 'mvn jetty:run' with help you confirm if that there's nothing wrong with your build (that all the right manifests and deps are in place)