facebook

MyEclipse 2015 deploy to Tomcat problems

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 15 posts - 1 through 15 (of 28 total)
  • Author
    Posts
  • #351269 Reply

    How can I deploy to an external Tomcat installation without having MyEclipse 2015 changing/adding configuration files??

    Before MyEclipse 2015 a deployment simply copied the resources of my project to the Tomcat installation (without adding changing configuration files)

    MyEclipse 2015 is changing the server.xml, adding context.xml files etc. Even choosing “Use custom location (does not modify Tomcat installation)” modifies the Tomcat installation…

    I have already a fully configured Tomcat (with virtual hosts and custom context.xml files per project). MyEclipse 2015 is conflicting with my setup (because of copying/changing the configuration I get duplicate contexts).

    Is it possible to go back to the simpler deployment mechanism of MyEclipse 2014 or is there a workaround to make it behave in the old way?

    Thanks,

    Teun Hoogendoorn

    #351295 Reply

    Teun,

    With MyEclipse 2015, our server connectors are updated to the WTP framework, which now offer additional control & configurability. Once you create a server in MyEclipse 2015, all the server configuration files are copied to MyEclipse workspace and then the server uses those configuration files which are from MyEclipse workspace, but not from the external Tomcat installation directory. You can see all the server related configuration files under Servers view > Tomcat 7.0 server > Configuration files.

    As the configuration files for servers are always taken from MyEclipse workspace, you can either modify all the config files under Tomcat installation directory and then create a new server in MyEclipse 2015 (which will copy the modified configuration files to workspace) or Create a new server in MyEclipse and then modify the server configuration files under Server view > Tomcat > Configuration files. (You can also edit those files from Package Explorer view > Servers > Tomcat 7.0).

    If you don’t want the config files of the tomcat installation directory to be modified, you need to either select ‘Use Custom Location’ or ‘Use Workspace metadata’ options under ‘Server Locations’ section from the Tomcat 7.0 Overview page (Double click on Tomcat 7.0 server in servers view to see the overview page).

    I’ve tried selecting the ‘Use Custom Location’ option in the Tomcat overview page, then modified the server.xml file (from Servers view > Tomcat 7.0 > Configuration files) and then started the server. The server.xml changes are not modified under Tomcat installation.

    If you are still seeing issues, please copy paste your MyEclipse Build Id from Help > About MyEclipse Enterprise Workbench. Also, please share the exact steps you followed, so that we could try and replicate the problem at our end.

    Let us know how it works for you.

    #351297 Reply

    Pradeep,

    Thanks for your response.

    I’ve used the “Use Custom Location” property, but it is not working.

    Used location: //C:/development/Tomcat/apache-tomcat-7.0.47
    I have to use the // prefix otherwise the location is not accepted (why?) My workspace
    and my Tomcat installation are not on the same drive (so relative paths are not an option).

    Deploy path: webapps

    The moment I add a web module “MultiTrader” (and it is published) the server.xml file on is changed.

    It is adding: <Context docBase=”MultiTrader” path=”/MultiTrader” reloadable=”false” source=”org.eclipse.jst.jee.server:MultiTrader”/>

    Thanks,

    Teun Hoogendoorn

    #351298 Reply

    MyEclipse Enterprise Workbench

    Version: 2015 CI
    Build id: 13.0.0-20140820

    #351322 Reply

    Teun,

    Thanks for the details provided.

    Used location: //C:/development/Tomcat/apache-tomcat-7.0.47
    I have to use the // prefix otherwise the location is not accepted (why?) My workspace
    and my Tomcat installation are not on the same drive (so relative paths are not an option).

    ‘Use custom location’ mode doesn’t allow you to select the Tomcat installation directory as the server path, since it is effectively the same as selecting the ‘Use Tomcat installation’ mode.

    What actually happens after selecting the ‘server path’ which is essentially the value of the catalina.base property is, it creates a conf folder and other folders (which get created if they don’t exist) and then the configuration files are copied to that conf folder, under catalina.base. So, in your case, as the server path is tomcat installation directory, it is overwriting the existing files under conf folder.

    I suggest you to change the ‘Server path’ such that it is not pointed to Tomcat installation directory and then deploy an application to check if the server.xml file under Tomcat installation/conf folder is modified.

    Hope this helps and let us know how it works for you.

    #351324 Reply

    Pradeep,

    Thanks for your response.

    I’ve got a working solution now.

    I’ve set the server path to “/C:\temp” (MyEclipse is filling this folder with the configuration files and folders).
    I’ve set the deploy path to “/C:\development\Tomcat\apache-tomcat-7.0.47\webapps” (MyEclipse deploys only the module(s) to the custom Tomcat installation).

    Teun Hoogendoorn

    #351326 Reply

    Teun,

    Glad that you got it working.
    Let us know if you see any issues with MyEclipse.

    #351328 Reply

    I did one extra configuration I forgot to mention.

    In the launch configuration I changed -Dcatalina.base to:

    -Dcatalina.base=C:\development\Tomcat\apache-tomcat-7.0.47

    Otherwise C:\temp is used as Catalina base.

    #351349 Reply

    Teun,

    When you select ‘Use Custom Location’ mode, the -Dcatalina.base value is set to the value entered in ‘Server Path’. So, there is no point is changing the -Dcatalina.base value again in Launch configuration > Arguments tag. In your case, you can continue working even if the -Dcatalina.base is set to ‘C:\temp’ in Launch Configuration.

    Hope this helps and let us know if you see any issues with MyEclipse.

    #351351 Reply

    Pradeep,

    I did this to start Tomcat correctly from MyEclipse. Otherwise it started with the settings MyEclipe placed in C:\temp.

    I simply do not want the configuration files to be deployed by MyEclipse. So I changed the server path to a temp dir (because I cannot stop MyEclipse from deploying the configuration files). The webapp dir points to my tomcat installation (and I’ve corrected the catalina.base to my Tomcat installation to start Tomcat from MyEclipse correctly).

    This solution it’s pretty much the same as deployment behaved in MyEclipse 2014 and before.

    Teun Hoogendoorn

    #351390 Reply

    Teun,

    Thanks for the detailed explanation. This is a workaround for you to use the Tomcat installation config files rather than the workspace created config files.

    Our dev team is looking at the feasibility for adding the feature to access the tomcat installation config files directly, instead of copying the config files and using them.

    Let us know if you see any issues or have any questions on MyEclipse.

    #352422 Reply

    Roland Schweitzer
    Participant

    @support-pradeep wrote:

    Teun,

    Our dev team is looking at the feasibility for adding the feature to access the tomcat installation config files directly, instead of copying the config files and using them.

    Being able to deploy into an existing tomcat without having myeclipse make assumptions about and modifications to my server configuration is a critical use case for me.

    Has this issue been raised with the dev team? Is in on the feature list for a near-future release?

    I am currently using:

    Version: 2015 CI
    Build id: 13.0.0-20141008

    #352433 Reply

    roland_schw,

    An ER has been filed with the dev team. I’m afraid this ER is not yet prioritized.

    As mentioned by Teun in this post, the workaround would be to select ‘Use Custom location’, change the Server path to some temp location (for ex: C:\temp), point the Deploy path to the external Tomcat webapps folder, modify the -Dcatalina.base (under Launch configuration > Arguments tab) to external Tomcat server location.

    Let us know how the workaround works for you.

    #352438 Reply

    Roland Schweitzer
    Participant

    @support-pradeep wrote:

    roland_schw,

    An ER has been filed with the dev team. I’m afraid this ER is not yet prioritized.

    Let us know how the workaround works for you.

    Yes, the workaround works for me. Just adding my voice so that you know that a less kludgey way to accomplish this is a feature that is important to me.

    Thanks,
    Roland

    #352479 Reply

    Roland,

    Glad that you got the workaround working.

    Our dev team is working on this feature. I will keep you posted once this feature is available.

    Let us know if you see any issues with MyEclipse.

Viewing 15 posts - 1 through 15 (of 28 total)
Reply To: MyEclipse 2015 deploy to Tomcat problems

You must be logged in to post in the forum log in