1

I am facing an issue while starting up SAP Hybris Server. I did my setup and later i added Jrebel configuration to my local.properties file Also i did Jrebel plugin installation in Eclipse and got the Jrebel activated.

java version used = "1.8.0_231"

local.properties

tomcat.javaoptions=-Xverify:none -javaagent:"C:/jrebel/jrebel.jar=de.hybris.tomcat.HybrisWebappClassLoader60"

tomcat.debugjavaoptions=-Xverify:none -javaagent:"C:/jrebel/jrebel.jar=de.hybris.tomcat.HybrisWebappClassLoader60" -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n

tomcat.generaloptions=-Xmx1024M -XX:MaxPermSize=8G -ea -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=${tomcat.jmx.port} -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}" -Drebel.log=trace

tomcat.javaoptions=-agentpath:"C:/jrebel/lib/jrebel64.dll"

Also have jrebel files at the specified location.

when executing hybrisserver.bat debug the following issues is getting displayed in the console

Console

Launching a JVM...

Listening for transport dt_socket at address: 8000

To run with JRebel Agent, use: -agentpath:C:\jrebel\lib\jrebel64.dll

For more information, please read https://zeroturnaround.com/software/jrebel/jrebel7-agent-upgrade-cli/

JRebel Agent is building a bootclass cache to C:\WORK\hybris\temp\hybris\rebelboot.jar

Check the instructions above to start using JRebel. The JVM will now exit.

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=8G; support was removed in 8.0


JVM exited while loading the application.

Reloading Wrapper configuration...

Launching a JVM...

Listening for transport dt_socket at address: 8000

To run with JRebel Agent, use: -agentpath:C:\jrebel\lib\jrebel64.dll

For more information, please read https://zeroturnaround.com/software/jrebel/jrebel7-agent-upgrade-cli/

JRebel Agent is building a bootclass cache to C:\WORK\hybris\temp\hybris\rebelboot.jar

Check the instructions above to start using JRebel. The JVM will now exit.

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=8G; support was removed in 8.0

JVM exited while loading the application.

There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.

  There may be a configuration problem: please check the logs.

<-- Wrapper Stopped

After this the JVM launch exits and hybris server does not start.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48

3 Answers3

1

It is not enough to just put properties like tomcat.generaloptions, tomcat.debugjavaoptions, tomcat.javaoptions in local.properties.

The JVM options that are taken into consideration when starting the server are taken from: wrapper.conf or wrapper-debug.conf. These two files are generated during build and can be found here: hybris\bin\platform\tomcat\conf\

Besides from that I also noticed that in my local.properties I have a reference directly to the Jrebel DLL as it can be seen below:

tomcat.debugjavaoptions=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n -agentpath:C:\\Users\\username\\.IntelliJIdea\\config\\plugins\\jr-ide-idea\\lib\\jrebel6\\lib\\jrebel64.dll -DforceANSI=true

Please try adjusting above path to fit your local JRebel DLL location, perform a build, and then start the server in debug mode

The above path intentionally uses "\\" instead of just "\" in order to escape the character.

dj_frunza
  • 1,553
  • 3
  • 17
  • 28
0

You are missing the agent path reference to the jrebel64.dll file.
Simply, append -agentpath:<your jrebel directory path>\\libjrebel64.dll to your tomcat.debugjavaoptions property.

Farrukh Chishti
  • 7,652
  • 10
  • 36
  • 60
0

This is a working example from my machine.

tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=1234,suspend=n -agentpath:<PATH-TO-JREBEL-LIB>\\jrebel64.dll

tomcat.generaloptions=-agentpath:<PATH-TO-JREBEL-LIB>\\jrebel64.dll -Xmx8192M -Xms1024M -XX:+UseG1GC -XX:+UseTLAB -ea -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}" -DforceANSI=true
Mohamed
  • 131
  • 1
  • 5