简体   繁体   English

JRebel不适用于外部Tomcat 7

[英]JRebel not working on external tomcat 7

For some reason I can't get JRebel work on external Tomcat 7 with Eclipse. 由于某种原因,我无法在带有Eclipse的外部Tomcat 7使用JRebel Everything works fine if I use server runtime in IDE, but if I launch server from command line and deploy application externally, JRebel doesn't reflect my changes to server. 如果我在IDE中使用服务器运行时,则一切正常,但如果从命令行启动服务器并在外部部署应用程序,则JRebel不会反映对服务器的更改。

Here is how I configured and deployed my project: 这是我配置和部署项目的方式:

  • Enabled JRebel on project from projects configuration tab 从项目配置选项卡对项目启用了JRebel
  • Startup set to Run locally from command line 启动设置为Run locally from command line
  • Created catalina-jrebel.bat according to generated configuration 根据生成的配置创建catalina-jrebel.bat
  • Built project using maven 使用Maven构建项目
  • launched server using catalina-jrebel.bat run 使用catalina-jrebel.bat run启动服务器
  • Deployed war file on server from Tomcat's application manager 通过Tomcat的application manager在服务器上部署了war文件

Now, if I modify my sample Servlet and save, nothing happens. 现在,如果我修改示例Servlet并保存,则什么也不会发生。 Application behavior doesn't change, nothing in console. 应用程序的行为不变,控制台中没有任何变化。

Am I missing something, and how to debug the problem? 我是否缺少某些东西,以及如何调试问题?

Here is the content of catalina-jrebel.bat 这是catalina-jrebel.bat的内容

@echo off
set REBEL_BASE=C:\Users\tutoivon\.jrebel
set JAVA_OPTS="-javaagent:C:\SLO\eclipse\plugins\org.zeroturnaround.eclipse.embedder_6.4.4.RELEASE\jrebel\jrebel.jar"  %JAVA_OPTS%
call "%~dp0\catalina.bat" %*

Some things you can check by yourself: 您可以自己检查一些事情:

  1. Server starts up with JRebel banner - so you can be sure JRebel Agent was actually attached to server. 服务器以JRebel标语启动-因此您可以确定JRebel代理实际上已连接到服务器。
  2. In the banner it says that you have valid license - no license, no reloading. 标语中显示您具有有效的许可证-没有许可证,没有重新加载。
  3. The built .war contains a rebel.xml inside WEB-INF/classes - this helps JRebel to find the location of classes updated by IDE. 内置的.warWEB-INF/classes内包含rebel.xml这有助于JRebel查找由IDE更新的类的位置。
  4. The paths in rebel.xml are absolute and correct, no placeholders (eg ${rebel.workspace.path} ) are used - if placeholders are used, then they must be defined by passing eg -Drebel.workspace.path=/path/to/workspace to JAVA_OPTS . rebel.xml中的路径是绝对正确的,不使用任何占位符(例如${rebel.workspace.path} )-如果使用占位符,则必须通过传递它们来定义它们,例如-Drebel.workspace.path=/path/to/workspaceJAVA_OPTS -Drebel.workspace.path=/path/to/workspace If done correctly, JRebel will also log a line such as JRebel: Monitoring directory '/path/in/rebelxml' in server log. 如果正确完成,JRebel还将在服务器日志中记录如下JRebel: Monitoring directory '/path/in/rebelxml'

If you still can't get it to work after these steps, contact support@zeroturnaround.com. 如果在完成这些步骤后仍无法正常工作,请联系support@zeroturnaround.com。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM