1

I am trying to get JRebel working with a fairly large enterprise web application which uses Ant + Ivy for building/dependency management, Spring 2.0 framework and Spring MVC, and all this has to be built and deployed to Tomcat.

I have JRebel enabled on Tomcat and the Project itself. Remoting is not enabled as I assume that if Tomcat and the project are on the same machine, this is not needed. When I start the Tomcat server from within STS, JRebel appears to load fine and I see no (apparent) significant errors.

However, any changes to the project do nothing with regard to deployment, and I see no JRebel messages in the console. The project itself is a somewhat nonstandard layout and does not have the traditional WEB-INF/src structure. When I enabled JRebel on it within STS, it just dumped a rebel.xml file in the root directory.

For reference, the project is based on this codebase and has the same general structure: https://github.com/NCIP/c3pr/tree/master/codebase

While the JRebel guides are good, they only show JRebel being used with very simple projects and do not go into very much depth into exactly how the service works.

Any suggestions, resources, or ideas are greatly appreciated.

thanks

haystack
  • 61
  • 5

1 Answers1

1

Did you actually recompile (doesn't matter if you use Eclipse or javac) those classes that you changed? It might be a good idea to check if you have "Build automatically" enabled under the "Project" menu.

They way how JRebel works is that it actually monitors the compiler output folder (usually "bin" folder or "build/classes" or something similar). This folder (or folders) is specified in the rebel.xml file and the file must be in the classpath of your application while you run it (WEB-INF/classes or on the jar file root or in the exploded dir).

Can you make sure, that rebel.xml is actually in the applications classpath? Also, you should see the message in the console that says something like: "JRebel: Directory '/path/to/project/bin' will be monitored for changes.".

And also, if you see the JRebel banner in your console, it is useful to check if the license is found (if it is not found then JRebel will not work).

Sometimes there may also be some mismatch when your Eclipse compiles classes to the "bin" folder and your build scripts compile them to under "build/classes" and only one of these locations is specified in the rebel.xml file. In this case, JRebel will monitor only one of them and then it is confusing too.

Wishing the best, Sigmar

six
  • 31
  • 1
  • 6
  • Thanks, still working on it. The JRebel banner is in the console and the license is active. It seems as though I do need to manually configure the locations JRebel looks for. – haystack Jan 13 '14 at 15:23
  • Oh, and the ant build file generates everything to projects\web\web, this folder consists of the standard folders and files of a web application (e.g., css, js, index.jsp, lib), and nearly all of the core logic of the web app is in jar files inside of that lib folder. But, Eclipse itself does not compile the project. The way it's set up, it always needs Ant to compile pretty much anything. I think I need to learn more about the fundamental processes behind JRebel monitoring. – haystack Jan 13 '14 at 15:38