0

I get this message on deploy my application on Eclipse, using JBOSS and JRebel

Caused by: java.lang.NoClassDefFoundError: com/zeroturnaround/javarebel/BP
    at org.jboss.as.ejb3.component.EJBValidationConfigurator.configure(EJBValidationConfigurator.java:67)
    at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:80)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
    ... 5 more
Caused by: java.lang.ClassNotFoundException: com.zeroturnaround.javarebel.BP from [Module "org.jboss.as.ejb3:main" from local module loader @1ec41c0 (finder: local module finder @1d0e2c9 (roots: C:\Users\Public\DesenvolvimentoJava\jboss-eap-6.3\modules,C:\Users\Public\DesenvolvimentoJava\jboss-eap-6.3\modules\system\layers\base))]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:447) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:414) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final-redhat-1]
    ... 8 more

How can I resolve it?

Murka
  • 353
  • 4
  • 10
LopesDaLeste
  • 69
  • 1
  • 2
  • 1
    Add jRebel to the JBOSS classpatn. – DwB Nov 30 '17 at 20:28
  • 1
    Make sure JRebel is attached via a single `agentpath` argument and you haven't included any jrebel jars manually to jboss classpath or to webapp libraries. If this doesn't help, go to eclipse `Help->JRebel->Submit a Support Ticket` and make sure the jrebel.log is included. You will get a solution there. – Murka Nov 30 '17 at 22:18

1 Answers1

-1

It seems that com/zeroturnaround/javarebel/BP class was available at compile-time but was not available at runtime. I do not have experience with JRebel, though from what I have understood it is much of a "hot-deployment" tool. I do not see why your compiled sources would need the JRebel jars?

However if it is indeed needed at runtime, if you are using a build tool then you could modify the dependency scope so that the jar will be included in the deploy-able package. Else you could include the jar in the runtime of your JBoss, the potential downside of going with that, is if the version of the jar used at compile-time was changed you could again run into other errors.

  • 1
    Adding JRebel's jar dependencies to the classpath is a bad idea and is entirely unnecessary since JRebel's agent itself is responsible for making sure that the correct classes are present in the classpath. The issue is with JRebel itself and should be reported to their support. – Tiit Dec 04 '17 at 07:29
  • @Tiit thanks for the comment, though the down-vote was excessive. I clearly stated that from what I have understood the JRebel jars should most likely not be needed at runtime. – Ntobeko Mkhize Dec 04 '17 at 17:01