- This topic has 10 replies, 3 voices, and was last updated 9 years, 6 months ago by support-swapna.
-
AuthorPosts
-
thomasschenkerParticipantIn our company we are using several different tomcat7 instances to run our applications. We have one tomcat7 installation directory (catalina home) with the tomcat-jars (lib) and several tomcat7 node directories (catalina base) with the tomcat configuration (conf).
In MyEclipse2014 it was easy to configure these different tomcat7 nodes:
For each node we created simply a ‘MyEclipse Server’ run configuration and checked ‘Add as server’.
In ‘Arguments/VM arguments’ we added the -Dcatalina.home=… and -Dcatalina.base=… arguments.In MyEclipse2015 now these three steps are necessary:
1. Create a server runtime environment.
2. Define a server with the runtime environment.
3. Configure the launch configuration of the server with the -Dcatalina.home=… and -Dcatalina.base=… arguments.Problem:
MyEclipse2015 does not accept a Tomcat node directory (catalina base) when creating a tomcat7 server runtime environment.
We have to select the tomcat7 installation directory (catalina home).
If we now define a Server with this server runtime environment, the port numbers are taken from the configuration of the tomcat7 installation directory.
But these port numbers are of course not the port numbers we defined in each of the tomcat nodes (catalina base).
Starting a server works (using the -Dcatalina.home=… and -Dcatalina.base=… arguments of the launch configuration), but MyEclipse2015 reports the problem ‘Server was unable to start within 45 seconds’ because it uses the (wrong) default ports of the tomcat7 installation directory (catalina home) to monitor the tomcat!
Of course MyEclipse2015 also refuses to start more than one Server at the same time, because it ‘thinks’ that the ports are already used.Solution:
We need the MyEclipse2015 server connector to support the separation of the tomcat7 installation directory (catalina home) and the configuration directory (catalina base).
For the built in (embedded) server ‘MyEclipse Tomcat v7.0’ MyEclipse2015 already uses this feature: there is the option ‘Configuration path’ which points to the directory ‘/Servers/MyEclipse Tomcat v7.0-config’ in the workspace.
But if we define a new server, the option ‘Configuration path’ is not available: it’s grayed out and it says ‘<unused>’.Feature Request:
1. Please enable the option ‘Configuration path’ also for user defined servers.
2. Please allow the ‘Configuration path’ to point to a directory anywhere on the local file system – for the embedded server, its currently restricted to a directory in the workspace.Thank you very much!
Regards, Thomas
support-swapnaModeratorThomas,
The ‘Configuration Path’ option can be enabled for user defined servers as well.
You need to enable ‘Store server configuration files in the workspace’ option in the ‘Server Location Settings’ section to enable the ‘Configuration Path’ option.The ‘Configuration Path’ is actually to specify a project containing path for the server in the ‘Store configuration files in the workspace’ mode. Catalina.base can be configured in ‘Server Location Settings’ section.
So you can configure a single Server runtime and multiple Server connectors. For each server connector, you can configure the catalina.base and the Configuration Path accordingly.
Let us know if you have any questions.
thomasschenkerParticipantSwapna,
Thank you for your reply!
I have now used the option ‘Store server configuration files in the workspace’ and configured my tomcat base directory as ‘custom location’.
It works for us this way, but I’m not completely happy with it – the configuration is not as simple and straight forward as it was in MyEclipse2014 with the custom run configuration:
1. Because I already have a tomcat base directory containing the server configuration, I’m not happy that I have to place the same tomcat configuration a second time inside the workspace.
2. Every time I publish my application, MyEclipse2015 copies the server.xml from the workspace into the tomcat base directory and at the same time makes some modifications to the server.xml: the whole xml-structure is reformatted and “<Context docBase=”catalina.base\webapps\ROOT” path=”” reloadable=”false”/>” is inserted. I don’t like changes like these, because I want to keep control over the configuration myself.
Would it be possible to simply configure the server working directory (i.e. catalina.base) without having to place the server configuration inside the workspace? MyEclipse could read the server configuration from the ‘conf’ subdirectory inside the server working directory.
Thanks, Thomas
support-swapnaModeratorThomas,
It is a bug at our end that it requires to enable ‘Store server configuration files in the workspace’ option to specify the custom catalina.home directory.
It is a high priority issue and the dev team is working on it.
Sorry for the inconvenience caused.
thomasschenkerParticipantSwapna,
Do you know when this issue will be resolved?
Our team would like to switch from MyEclipse2014 to MyEclipse2015 and use Java8.Thanks, Thomas
support-swapnaModeratorThomas,
The fix is out with MyEclipse 2015 CI 12.
Please download and install MyEclipse 2015 CI 12 from here : https://www.genuitec.com/products/myeclipse/download/
You can install it alongside your existing MyEclipse installation and use your current license.
Let us know if you see any issues.
thomasschenkerParticipantSwapna,
I’ve tested the tomcat server configuration in MyEclipse2015 CI 12:
In the section “Server Location Settings” I can now choose “custom location” for the server working directory (i.e. catalina.base) without having to check the checkbox “Store server configuration files in the workspace.”
This resolves the first part of my problem, thanks!The second part of my problem is, how to tell MyEclipse where I have stored my server configuration files (i.e. catalina.base/conf).
In the section “General information” the “Configuration path” is still not enabled, so I cannot choose the location of my catalina.base/conf directory, which lies outside the workspace.The result is that I can start the server, but MyEclipse does not recognize that it is started:
MyEclipse shows the error message (popup) “Starting ‘Tomcat …’ has encountered a problem. Server ‘Tomcat …’ was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.”.This is because I use other port numbers in my tomcat configuration – I have to, because I’m running several different tomcat nodes at the same time.
Because MyEclipse cannot read my server configuration files, in the section “Ports” the tomcat default ports (e.g. HTTP 8080) are shown.Therefore if you could enable the the “Configuration path”, this would resolve the second part of my problem and my team would be very happy to start using MyEclipse2015!
Thanks, Thomas
support-swapnaModeratorThomas,
I have escalated your concern to the dev team. They are looking into it.
We will get back to you soon.Thanks for your patience.
support-piotrParticipantThomas,
Tomcat itself allows to pass “catalina.home” and “catalina.base” parameters. “Catalina.home” is configured through Tomcat Server Runtime location, and “catalina.base”, with the added feature on your request, can be passed through “custom location”. Your configuration files should be in “catalina.base”/conf directory. I have tested it with our development version and although port numbers are not immediately refreshed in the editor (which I will fix), after you reopen the editor, ports are correctly displayed and server can be started. Unfortunately as you reported, it doesn’t work with the latest release due to some bug, which is already fixed. We are now working on the release, which should be out in a week or two. Can you wait that long for the fix?
The “Configuration path” field is used to specify location in your workspace, where you store server configuration files, instead of using them directly from server location and the field is available only if you choose to “store configuration files in the workspace” option. We are aware of ambiguity on the Tomcat configuration editor page and we are now working hard to make it much more clear 🙂 Thank you very much for a valuable input!
thomasschenkerParticipantPiotr,
Now it’s working perfectly and – as you wrote – the Tomcat configuration editor page is really much clearer now!
Thank you very much for resolving this issue! Our team will now start to use MyEclipse2015.I still have a wish ;-):
MyEclipse2015 is reformatting the server.xml in the custom ‘catalina.base’-location. Because we have our Tomcat configuration under version control, this causes the server.xml to be marked as ‘modified’.
The reformatting of the server.xml makes it less readable for humans 😉 and therefore I don’t want to check it in.
If it’s possible, could you please disable the reformatting of the server.xml?Thanks, Thomas
support-swapnaModeratorThomas,
Glad that it is working. I have filed a bug for the dev team to disable the reformatting of the server.xml.
We will keep you posted about the fix.Let us know if you see any issues with MyEclipse 2015.
–Swapna
MyEclipse Support -
AuthorPosts