1

JRebel 5.0.0 (201206080930)

Have multimodule maven project, which is assembling into war and deploying on Tomcat 7. When I am enabling JRebel-agent for projets(rebel.xml is generated) and starting Tomcat with agent(either by adding follow lines to the Tomcat JVM Parameters:

-Drebel.properties="..\.jrebel\jrebel.properties"
-javaagent:"D:\eclipse\plugins\org.zeroturnaround.eclipse.embedder_5.0.0.RELEASE-201206121145\jrebel\jrebel.jar"
-Drebel.workspace.path="D:\eclipse"

or pressing "Launch with JRebel agent" button in opened dialog) I am getting Spring exception

   org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.smile.AccountHandler] is defined: expected single matching bean but found 2: [accountHandlerImpl, testAccountHandler]

The main thing here, is that testAccountHandler is from tests directory. Without JRebel agent everything is work good.

Deleting

<dir name="D:/path/to/sources/target/test-classes">
        </dir>

from rebel.xml did not help

vacuum
  • 2,273
  • 3
  • 20
  • 32

2 Answers2

0

Make sure you are not including the test jar files in tomcat when assembling the war file using (I assume some maven plugin or configuration). If the classes are found on the class path, jrebel will try to find it in the target directories.

aseychell
  • 1,794
  • 17
  • 35
0

The problem was in rebel.xml's. I try to delete all references to test-classes from ALL rebel.xml files and it help.

vacuum
  • 2,273
  • 3
  • 20
  • 32