Spring tc Server Support in IDEA

If you are developing an application for Spring tc Server, you may be interested in tc Server Support plugin for IntelliJ IDEA.

tc Server plugin provides a decent support for Developer, Standard and Spring editions of tc Server 2.0:

  • Running and debugging applications on local and remote server instances
  • Starting and stopping local server
  • Managing JVM parameters
  • Accessing server logs at run-time
  • Easily updating your application on the server
  • Opening application web page in a browser

To give it all a try, download and install tc Server from SpringSource: download center. In this post we’re showcasing the use of IntelliJ IDEA with Developer Edition.

To get started, click File | Settings | Application Servers, then add a new Sping tc Server application server and specify its home directory:

Then, choose a server instance. By default server has a single called tomcat-***, and Developer Edition provides spring-insight-instance supplied with Spring Insight. You may also create another instance, specifying its name and optionally a template to enable some additional features. To get Spring Insight support in a new instance you should use spring-insight-instance server folder as a template.

Now it’s time to create a run configuration. For local one, we just need to pick an application server:

Remote run configuration needs server JMX and HTTP ports and staging protocol instead:

Finally, we go to Deployment tab and configure artifacts and corresponding web paths.

Try it all for youself with pleasure! Your feedback is welcome in our issue tracker and forums.

This entry was posted in New Features and tagged , , , , . Bookmark the permalink.

33 Responses to Spring tc Server Support in IDEA

  1. Bjorn Harvold says:

    Hi Elena

    I am running IntelliJ 9.0.3. I cannot find the plugin in the plugin repository. When I download it from the online plugin directory and install it manually. It show up as inactive and red in my list of plugins.

    Any ideas?

    thanks
    bjorn

  2. ksafonov says:

    @Bjorn: Many apologies, the problem is fixed.
    Please reinstall the plugin at File | Settings | Plugins page.

    Kirill

  3. J. David Beutel says:

    To deploy locally, I had to enable JMX authentication with role “admin” and password “springsource”.

    Cheers,
    11011011

  4. Zdenek says:

    Hi, I have tcServer 6.0.20.C from STS 2.3.2 distribution. I cannot add my tcServer in IDEA beacause of “Executable ‘…tcruntime-ctl.bat’ not found.”

  5. Shaverdova Elena says:

    @Zdenek plugin doesn`t support 6.0 version, 2.0 only.

  6. Joensson says:

    @Zdenek/@Shaverdova Elena
    TcServer does not exist in anything newer than 2.0 – the 6.0.xx version inside the tcserver zips refer to which Tomcat version it contains.

    The latest tcserver distribution as of the 27th of October is 2.0.3 which contains Tomcat 6.0.29

  7. Shaverdova Elena says:

    @Joensson Yes, 2.0 version is the most recent one. If you look at tc Server Announcements you’ll find 6.0.xx version before it. Now it is available only as a part of STS, and it has some significant differences from 2.0 version.

  8. roekoe says:

    With tcServer 2.1 (developer) it does not load the instances: “Failed to get available server instances.” Previous versions work fine. Good work!

  9. Shaverdova Elena says:

    @roekoe new plugin version with tcServer 2.1 support is available now. Please update the plugin at File | Settings | Plugins page.

  10. Rudy says:

    The new version does not seem to work for me. I tried it several times … Does anybody else have this problem with the 2.1 compatible version ?

  11. J. Brisbin says:

    Just tried this on latest SpringSource ToolSuite version, which includes tcServer 2.1.1 and I get “JAVA_HOME environment variable is not defined”. This is coming from the top of the tcruntime-*.sh scripts, which are checking for JAVA_HOME to be explicitly set, which it isn’t on my Mac OS X/IDEA 10 install.

    Tried setting JAVA_HOME in path variables (global IDEA config) as well as setting JAVA_HOME in my “.profile” (which I don’t really want to do).

  12. Shaverdova Elena says:

    @J.Brisbin Have you tried setting in ~/.MacOSX/environment.plist? That worked for me.

  13. Shaverdova Elena says:

    @Rudy Could you create an ussue describing your problem?

  14. Mohit says:

    Any plans to update it for tc server 2.5

  15. Shaverdova Elena says:

    @Mohit Changes in tc Server 2.5 didn’t break support, plugin works fine with it.

  16. Hendrik says:

    I believe I need version 1.1.1 of the plugin to get my tc server instance 2.5 running.
    But my Idea-plugin-repository (idea 9.0.4 ultimate) only offers version 1.0 of your tc server plugin. Refresh of the repository is also not helping. Thx in advance.

  17. Shaverdova Elena says:

    @Hedric tc server v.2.1 and higher is supported since 1.1 version, and it is available only on IDEA 10.* Consider upgrade.

  18. Mohit says:

    Worked like a charm for me but redeploy fails. If i removed the application from webapps directory and then let the server startup build and deploy it works perfectly fine but in case application is already deployed, redeploy throws exception all the times.

  19. Shaverdova Elena says:

    @Mohit I’ve created an issue: http://youtrack.jetbrains.net/issue/IDEA-73409 . Please, write there, what exactly exception do you get, your tc server version and plugin version.

  20. Mohit says:

    Following is the error snapshot. I am using latest version of plugin

    01-Oct-2011 13:07:24.543 INFO com.springsource.tcserver.security.PropertyDecoder. tc Runtime property decoder using memory-based key
    01-Oct-2011 13:07:24.762 INFO com.springsource.tcserver.security.PropertyDecoder. tcServer Runtime property decoder has been initialized in 220 ms
    01-Oct-2011 13:07:25.90 INFO org.apache.coyote.AbstractProtocolHandler.init Initializing ProtocolHandler ["http-bio-8081"]
    …and more in issue

  21. Shaverdova Elena says:

    @Mohit What is tc Server version?

  22. Mohit says:

    vfabric-tc-server-developer-2.5.0.RELEASE

  23. Shaverdova Elena says:

    @Mohit Can’t reproduce your problem. Log shows plugin’s actions were correct, seems there is a problem with server’s settings.

  24. Patrick says:

    @J.Brisbin: I was having a similar issue with Insight not resolving other environment variables. It feels like a dirty hack, but I was able to get around it by adding my variables to vfabric-tc-server-2.6.3{instance}confwrapper.conf like so:

    set.ENVIRONMENT_VARIABLE=value

    There’s also a set.JAVA_HOME line in this file. I’d check that to make sure it’s pointing to a real JDK installation.

  25. Mohit says:

    Did anyone try vfabric-tc-server-developer-2.7.0.RELEASE with IntelliJ 11.1.2

    Plugin is getting installed but after providing home directory, it is not able to detect servers.

  26. Stephan Oudmaijer says:

    Does not work with vfabric-tc-server-developer-2.7.1.RELEASE and IntelliJ 10.5.4

  27. Eugeny says:

    Support of this plugin died?

  28. Eugeny says:

    I’ve obtained that there are some issues with undeploying application and redeploying it.

    My configuration is:
    IntelliJ IDEA Ultimate 12.1.6,
    tc Runtime Developer Edition 2.7.0 (also tested with 2.9.3)
    windows 7 home premium.

    ——————————————

    18-Oct-2013 17:34:45.765 SEVERE [RMI TCP Connection(7)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method undeployApplication
    java.lang.RuntimeException: Undeploy failed. Unable to delete all files on the file system. Check file locks for all files in the web application.
    at com.springsource.tcserver.serviceability.deploy.TcContainerDeployer.undeployApplication(TcContainerDeployer.java:512)

    ————————————–

    So I think that the plugin attempts to remove the application folder on server-instance, without waiting for the stop of the application on this instance.

    Also another issue takes place with primary deploying application when server-instance starts.

    Please, fix it.

    • Michael Golubev says:

      Hello,

      Deploy / undeploy workflow for tcServer had been rewritten for IDEA 13 to support tcServer up to 2.9.3
      To my understanding there should be no such problems with the renewed integration, can you please try IDEA-13 EAP?

      In any case it would be better to continue discussion in dedicated http://youtrack.jetbrains.com/issue/IDEA-115176.

      Regards,
      Michael

  29. Eugeny says:

    Michael, could you test adding libraries for tc Server?

    Since my project uses libraries from external directory (a common library folder for several projects), I add them to external libraries. I also don’t want to copy this folder into server instance’s lib folder. So I go to Application servers section, add tc Server as application server, select or create a server instance and add the libraries.
    It seems, server instance does not see the libraries, and I got “Exception invoking method deployApplication” with java.lang.ClassNotFoundException.

    If I copy the libraries to server-instance/lib folder manually, this does not appear.

  30. Aleksandar S. says:

    Hi,

    We are working on setting up the tc-server plugin (IntelliJ 12.1.5 Ultimate Edition, tc server 2.9.3). We have set it up correctly locally and can see that it started in the browser, however when we try to connect using the plugin, it gives us the error “Failed to determine version. Unexpected message beginning of input stream: The JAVA_HOME environment variable is not defined.”

    Any thoughts? Thank you!

    • Eugeny says:

      You have to setup system env var PATH by adding path to your jdk1.7.0_xx/bin folder. Also you have to setup user env var JAVA_HOME to your jdk1.7.0_xx folder.

      BTW, I have problems with tc Server plugin and 12.1.5. Try 13 eap.

  31. Pete B. says:

    How can I get the plug-in to use INSTANCE_BASE environment variable to locate instances?

    I have INSTANCE_BASE=c:\tcServer\instances, when I run:
    c:\tcServer>tcruntime-ctl.bat ecm-6.2 verbose-status

    I get:
    Instance name: ecm-6.2
    Runtime version: 7.0.35.B.RELEASE
    tc Runtime Base: c:\tcServer\instances\ecm-6.2
    tc Runtime Home: c:\tcServer\\tomcat-7.0.35.B.RELEASE
    tc Runtime Install dir: c:\tcServer\
    Instances directory: c:\tcServer\instances
    Script directory: c:\tcServer\
    Script version: 2.8.2.RELEASE

    Yet the plug-in apparently looks only in the root tcServer directory, so it finds an instance defined there, but not instances defined in my instances directory.

    I have:
    IntelliJ 13.1.1
    tc Server Support plug-in 1.2
    tcServer 2.8.2.RELEASE

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">