启动SAP Hybris服务器时出现Jrebel问题

时间:2019-11-07 12:39:08

标签: tomcat sap hybris jrebel

启动SAP Hybris Server时遇到问题。 我进行了设置,后来我将Jrebel配置添加到了local.properties文件中 另外,我在Eclipse中安装了Jrebel插件,并激活了Jrebel。

使用的Java版本=“ 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”

在指定位置也有jrebel文件。

在执行 hybrisserver.bat调试时,控制台中将显示以下问题

控制台

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

此后,JVM启动退出,hybris服务器无法启动。

3 个答案:

答案 0 :(得分:1)

仅将 tomcat.generaloptions tomcat.debugjavaoptions tomcat.javaoptions 等属性放在local.properties中是不够的。 / p>

启动服务器时要考虑的JVM选项来自: wrapper.conf wrapper-debug.conf 。这两个文件是在构建期间生成的,可以在这里找到:hybris \ bin \ platform \ tomcat \ conf \

除此之外,我还注意到在我的local.properties中,我直接引用了Jrebel DLL,如下所示:

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

请尝试调整上述路径以适合您的本地JRebel DLL位置,执行构建,然后以调试模式启动服务器

上面的路径有意使用“ \\”而不是仅仅使用“ \”来转义字符。

答案 1 :(得分:0)

您缺少对jrebel64.dll文件的 代理路径 引用。
只需将-agentpath:<your jrebel directory path>\\libjrebel64.dll附加到{{1 }}属性。

答案 2 :(得分:0)

这是我机器上的有效示例。

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