|ECP RAP demo in Tomcat [message #1258520]
||Thu, 27 February 2014 13:16
| Neil Mackenzie
Registered: December 2013
I encountered a few problems before successfully getting the ECP RAP demo deployed and running as a .war file on tomcat, so I thought I would document here what I found to save time for anyone else doing the same. |
1.) I am using eclipse kepler , and tomcat 7.0.52 (I couldn't get this working with tomcat 8 )
2.) I have been using the ecp source code checked out from git, I have been using the release_1.2.0 branch
3.) I used "WAR products 0.3" from the kepler eclipse distribution, I installed this into my IDE.
First select the supplied ECP RAP target, and compile the code. Some of the ecp projects that are not needed for RAP will not compile, this is fine.
create a new plugin project. click on this new project.
From eclipse choose new->other->plugin developement -> WAR Product configuration.
In the wizard that appears you can choose "use existing launch configuraton" and choose the launch configuration for ECP RAP demo which is at currently called ecpDevelopementDemo. supply a file name where asked and click finish,
The .warproduct file opens,
edit the web.xml file if you wish to have better debugging.
I like to uncomment the -console section in the Web.XML so that I can use the output window of tomcat as an osgi console (note that you wont see this output window if yous tart tomcat as a service, but I believe there are other ways to access the osgi console)
on the opened .warproduct file click "eclipse war product export wizard" and choose a name and location for your war file.
At this point you may well see an error about cycles,for example:
A cycle was detected when generating the classpath org.eclipse.emf.ecp.core_126.96.36.199402271226,
This is because certain test plugin fragments exist,which the war product believes introduce dependancy cycles. So I close all used projects that end in .test,and try again, and then I don't see any of these cycle errors. I did try using a seperate war products distribution that claims to get around the cycles errors but this didnt make any difference.
You can then deploy this war file to Tomcat.
Note that the plugins get stored in tomcats "work" directory and they get cached there even when the tomcat server is stopped and started. THese plugins in the work directory are started when tomcat starts, so you should be careful to delete the contents of the work directory before deploying the war file if you change the list of plugins that you want to be active.
Note that custom .viewmodel files (which allow custom layouts of model elements) don't seem to get included in the war file. I haven't found a way around this yet.
If you have installed the JST server components into your IDE, you can also run tomcat easily in debug mode from your IDE.
[Updated on: Thu, 27 February 2014 14:03]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02074 seconds