页面树结构
转至元数据结尾
转至元数据起始

(本文档仅供参考)

问题描述

进入【系统监控】-》【线程】/【堆打印】,点击会出现【未指定错误Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.tools.attach.LinuxVirtualMachine

        

详细错误日志如下:

at smartbi.framework.rmi.ClientService.execute(Smartbi:134)
 at ...(...)
 at smartbi.freequery.migrate.ExportLog.exportThreadDumpByAttach(ExportLog.java:692)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.tools.attach.LinuxVirtualMachine
 at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:46)
 at smartbi.freequery.migrate.ExportLog.exportThreadDumpByAttach(ExportLog.java:692)
 at smartbi.freequery.migrate.ExportLog.exportThreadDumpInfo(ExportLog.java:477)
 at smartbi.management.LocalManagementHandler.getCurrentThreadDumpInfo(LocalManagementHandler.java:338)
 at smartbi.management.ManagementService.getCurrentThreadDumpInfo(ManagementService.java:159)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at smartbi.framework.rmi.ClientService.execute(Smartbi:118)
 at smartbi.framework.rmi.RMIServlet.processExecute(RMIServlet.java:199)
 at smartbi.framework.rmi.RMIServlet.doPost(RMIServlet.java:143)
 at javax.servlet.http.HttpServlet.service$WTImpl$javax$servlet$http$HttpServlet(HttpServlet.java:727)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

原因分析

通过【系统监控】-【概述】的确认使用的JDK类型,如果是openjdk ,因openjdk大多是不带tools.jar包的,会导致无法调用到相关类文件。

如果是openjdk,可以到服务器上确认当前加载的tools.jar是在哪个路径下,并确认对应的路径下有没有jdk存在。如下图,对应的tools.jar包加载的路径是 usr/jdk1.8.0_182/lib/tools.jar , 进入当前路径usr/jdk1.8.0_182/lib/ 确认是否有tools.jar包。

解决方案

如果在对应的jdk路径下没有tools.jar ,可以进入smartbi.war包拿到tools.jar 或者直接从当前文档结尾下载 tools.jar,添加到对应的jdk加载的tools.jar的路径下:


附件: tools.jar

       

        

  • 无标签