In the process of trying to build an android web service using Spring under Eclipse IDE, I need to create a Dynamic Web Project using Maven. The problem I am facing is an error " Loading descriptor for project has encountered a problem. I don't know how to solve this. Any input on that?
If you get the following exception:
Loading descriptor for project has encountered a problem. [...]
Nullpointerexception
right after creating a project, then there are 2 possible causes (or at least that how it was for me, when I had this issue).
1) A web.xml file is missing in your WebContent/WEB-INF folder or was not created during project creation. (in the last window you have to check option "Generate web.xml deployment descriptor" in eclipse, otherwise eclipse won't generate that file)
If your project is already created, you can still add a web.xml file into your WEB-INF directory. Depending on your servlet version (e.g. 2.5) you have to use a different template which can be found on the net.
2) Your Eclipse does not have all the necessary plugins for Dynamic Web projects.
You need to go to Help >> Install new Software
Select the site which corresponds to your eclipse version. (e.g. Kepler - http://download.eclipse.org/releases/kepler )
Install:
JST Server UI
JST Web UI
JST Server Adapters
JST Server Adapters Extension
WST Server Adapters.
You may also need:
Eclipse Java EE Developer tools
Eclipse Java Web Developer tools
Java Server Faces tools or JSF tools
Eclipse faceted Project Framework
Eclipse faceted Project Framework JDT Enablement
install Java EE web developer tools from Help >> "Install new Software".
check in project properties "Project Facets" should have proper check boxes enabled eg Dynamic Web Project etc.
I know this is late but may be useful for others.
In web.xml there may be some attribute repated in web-app tag.
In my case xmlns="http://java.sun.com/xml/ns/javaee" attribute in repeated in tag web-app.
Install Eclipse Java Development tools from Help >> "Install new Software".
Related
I believe this is specific question regarding Vaadin so if anyone who has an experience with Vaadin can help it will be great.
I am new with Vaadin framework. I worked more then 25 years as Oracle Developer and also wrote some Java programs.
My company is actually migrating Oracle Forms application to Java. As a user User interface layer we are using Vaadin and HTML5
I have installed Eclipse IDE for Java Developers Version: 2021-03 (4.19.0) on my Oracle Vbox virtual machine ( Ubuntu 18.04.3 LTS)
Also I have added tomcat 8 server to my Eclipse workspace.
Actually I am trying to create my first project based on this document https://vaadin.com/docs/v7/framework/getting-started/getting-started-first-project but I am already facing some issues :)
I have selected Vaadin 7 project for a new project .
select Maven Archetype ==> Single module Application
window => specified Archetype parameters and clicked finished
After I have selected the project and Run As Maven Install and also compiled Vaadin themes.
Here are the issues I am having:
When I compare my project hierarchy with https://vaadin.com/docs/v8/framework/getting-started/getting-started-first-project/#figure.getting-started.first-project.exploring I don't see JavaScript resources. It's important because my first task will be adding JavasScript to my application.
When I am running the project as explained in the document:
"Starting your application is as easy as selecting myproject from the Project Explorer and then Run › Debug As › . Eclipse then opens the application in built-in web browser"
When I select run and Debug the Debug on Server option is not available ( only Java application , Maven Build etc)
So I have tried another option: right click on Tomcat Server => Add or remove and I got the message: there are no resources that can be added or removed from the server
Also tried : Properties -> Projects Facets and check Dynamic Web Module but this doesn't help either
When I am trying to run the project I am getting the message "The selection did not contain any resources that can run on a server"
fre
org.eclipse.wst.common.project.facet.core.xml
I have also created the new Vaadin 10+ project with a "Base Starter for Vaadin" added Tomcat 8.0 Server ( maybe I should use Tomcat 9) and
Getting the message "the selection cannot be run on any server" when trying to run the project.
Any help will be highly appreciated
Note that Vaadin 7 is no longer a publicly supported version. If you are starting a new project, you may want to start with the latest LTS version 14.
If you have a Spring Boot-based app (default), you can run it either with mvn spring-boot:run Maven goal or by right-clicking the Application.java file and running it.
This documentation page outlines the steps for importing and running a Vaadin app in Eclipse: https://vaadin.com/docs/v14/guide/start/eclipse
I'm doing some tests with the last Eclipse developer builds, the Oxygen RC3. I know it's only a RC product, but in the milestones there was no problem with the Axis2 runtime. Here and now the Axis Runtime it's not present.
When I try to run the wizard and create the Web Service, I just don't see the option to set Axis2 runtime, just the Axis runtime.
Also I tried to install the plugins moving them into the dropins folder, running Eclipse with the -console option from the command line (following the Apache instructions) and when I check in the console with the command ss axis2 it says "Framework is launched.", and also I get 2 bundles installed:
Unfortunately, when I try to start them I got the message: BundleException: Could no resolve module: org.apache.axis2.eclipse.service.plugin [107X] Unresolved requirement: Import-Package: javax.xml.stream; version="1.0.0"
I tried installing them on the plugins folder, not working.
Also, I follow other guides surfing the net unsuccessfully.
What can I do? Thanks in advance!
Well, after some research, I get the solution! Axis2 Tools and CXF Web Services come with Eclipse Java EE Developer Tools Project, so I suppossed that will be the package that includes Axis2.
So I just search on Google that package in the Eclipse Marketplace (this link), and drag the Install button into the Eclipse SDK. I check and install the Axis2 Tools, CXF Web Services, and required packages.
After restar Eclipse, magic has done.
I have the Axis2 Runtime Settings:
The Axis2 Code Generator and Axis2 Service Archiver wizards:
And, finally, I have the Web Service runtime Apache Axis2 inside the Web Service Client wizard:
I have maven based project with following structure:
main_project
module_webproject
module_java_proj_1
module_java_proj_2
module_java_proj_3
... ...
Everything compiles and packages fine with command line maven goals execution. I need to setup this project into eclipse environment for developers with tomcat deployment. Anyone know setup instructions?
Also, i am looking into tomcat hot deploy for debugging capabilities.
I have tried mvn eclipse:eclipse, this does only creation of .project and .classpath files. But projects directories are not treated as java or web projects.
Answer from following forum some what helps...
[Running Maven project on Tomcat from Eclipse
There can be a few reasons why you don't see the project in the Add/Remove projects dialog for Tomcat. Verify the following:
You have m2e installed (http://eclipse.org/m2e/download/)
You have m2e-wtp installed (http://www.eclipse.org/m2e-wtp/download/)
Your Maven project imported as a Dynamic Web Application. Look for a Deployment Descriptor entry when you expand the project, it should be somewhere in the first few entries. It is the second one down for me on Eclipse Juno. Not there? It's probably not a web app. Go back and verify 1 & 2, then remove and re-import your project.
Make sure that your web application is not too new for the version of Tomcat that you are using. Right-click the project and go to Properties > Project Facets. Look for Dynamic Web Module and check the version. If this version is too new for your Tomcat version, Eclipse won't let you add it. For instance, your Dynamic Web Module version is 3.0 and you're using Tomcat 6.
Im new to Eclipse. I use Tomcat as my run time server, but every time I modified the jsp pages, Eclipse was still displaying the older one. Just wondering how to redeploy the application so the changes can be reflected.
Eclipse: Eclipse IDE for Java EE Developers 1.2.1.20090918-0703
Tomcat: Tomcat 6.0
Thanks
Doubleclick the server instance in question in the Servers view to open its configuration. Now, in the right top you should see a section called Publishing. Open it to verify and configure autopublishing settings.
Eclipse should do that automatically for you.
Otherwise, on the Servers view (Menu Window->Show View->Servers), you can right click on your Tomcat instance and hit "Publish" or "Restart"
Make sure you have the "JST Server Adapters" ("Web, XML and Java EE Development category") feature installed.
Eclipse's publishing functionality requries the project to be a "web project", and in some cases requires additional configurations.
Go to Windows > Preferences > Server > Runtime environments and add your tomcat
Either try using publishing, or (better I think) use the FileSync plugin. There you can tell which folders from your project should be copied (live) to what directory on your machine (the tomcat/webapps/yourapp). With a little more effort the filesync configuration can be made machine independent (only using one parameter as TOMCAT_ROOT), in case you want to check-in the project to a repository where others will use it.
Get the Tomcat plugin. It was nice because you can install Tomcat on your system and then associate your web app with that instance of Tomcat. The plugin will let you stop/start Tomcat and define a server such that when you do a build it knows how to deploy the changes. There may be some newer plugin but the Tomcat plugin worked for me and was fairly simple to install and use. Here is a page from IBM on using Eclipse and Tomcat. Inside that page it points you to the following: http://www.ibm.com/developerworks/opensource/library/os-eclipse-tomcat/
I am having some trouble getting Spring and Tomcat up and running and recognized by eclipse. I have looked around on google with no luck. Specifically, I am having trouble having eclipse recognize tomcat (I am running linux, and when I browse to the relevant jar file in the runtime environments configuration, eclipse wont allow me to select it). Could somebody please point me to (or describe here) how to get Spring and Tomcat working properly in eclipse and possible provide a "Hello World" example so I can test my first Spring application? Thank you very much.
Have a look at the Spring Tools Suite - essentially Eclipse with Spring specific extensions.
You must have WTP (Web Tools Platform). It is bundled in the Java EE version of Eclipse
Go to Window -> Preferences -> Server -> Runtime environment and click "add"
Choose and setup your server following the wizard
When finished, Go to Window > Show view > Other and locate Servers
It will appear in the bottom panel. Now you can double-click it to set some options of your preference
Right click your project > Debug > Debug on server (The project must be a "web project")
It's generally this. There might be some troubles in the last step, but use google or the link given by Chris for that.
Not familiar with Spring, but here's a link that helped me get Tomcat up and running in Eclipse:
http://www.windofkeltia.com/j2ee/wtp-tutorial.html
you can try eclipse web tools platform for doing this.
You can go to your project then choose
Debug As --> Debug On Server
I think the server adapter for tomcat is installed by default.
You can download the Java EE Distribution Of Eclipse to have this functionality out of the box.