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:

35 Responses to Spring tc Server Support in IDEA

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.

@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.

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.

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.

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.

@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.

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?

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.

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.”