標籤:.sh eve create summary action dmi health 添加 jar
最初並未發現,筆者的系統內容變數JAVA_HOME變數設定錯誤
D:\develop\Java\x64\jdk1.8.0_144 #最初使用了閹割版的JDK
改成完整安裝的JDK就可以
D:\develop\Java\jdk1.8.0_144
另外還有設定RESIN_HOME環境變數
RESIN_HOME=D:\develop\resin-pro-4.0.53
設定環境變數
.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;%RESIN_HOME%\lib\resin.jar;%RESIN_HOME%\lib\javamail-141.jar
網上說要把lib目錄下所有jar加進去,即使JAVA_HOME設定正確,不加仍舊保持
缺少%RESIN_HOME%\lib\resin.jar;報錯
Error occurred during initialization of VMjava.lang.Error: java.lang.ClassNotFoundException: com.caucho.loader.SystemClassLoader at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1469) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1436)Caused by: java.lang.ClassNotFoundException: com.caucho.loader.SystemClassLoader at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2209) at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2195) at java.security.AccessController.doPrivileged(Native Method) at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1456) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1436)
缺少%RESIN_HOME%\lib\javamail-141.jar報錯:
file:/d:/develop/resin-pro-4.0.53/conf/health.xml:723: com.caucho.config.core.ResinIf.init(): java.lang.NoClassDefFoundError: javax/mail/Session721: - Automatic PDF reports722: -->723: <resin:if test="${pdf_summary}">724: <health:PdfReport>725: <path>${resin.root}/doc/admin/pdf-gen.php</path> at com.caucho.config.xml.XmlConfigContext.error(XmlConfigContext.java:1244) at com.caucho.config.xml.XmlConfigContext.configureChildNode(XmlConfigContext.java:471) at com.caucho.config.xml.XmlConfigContext.configureAttribute(XmlConfigContext.java:324) at com.caucho.config.program.NodeBuilderChildProgram.inject(NodeBuilderChildProgram.java:82) at com.caucho.config.program.ContainerProgram.inject(ContainerProgram.java:88) at com.caucho.config.program.ConfigProgram.configure(ConfigProgram.java:107) at com.caucho.config.core.ResinIf.init(ResinIf.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.caucho.config.j2ee.PostConstructProgram.inject(PostConstructProgram.java:140) at com.caucho.config.type.InlineBeanType.init(InlineBeanType.java:458) at com.caucho.config.xml.XmlConfigContext.configureChildBean(XmlConfigContext.java:705) at com.caucho.config.xml.XmlConfigContext.configureBeanProperties(XmlConfigContext.java:686) at com.caucho.config.xml.XmlConfigContext.configureChildNode(XmlConfigContext.java:464) at com.caucho.config.xml.XmlConfigContext.configureNode(XmlConfigContext.java:371) at com.caucho.config.xml.XmlConfigContext.configureBean(XmlConfigContext.java:285) at com.caucho.config.Config.configureBean(Config.java:376) at com.caucho.config.Config.configureBean(Config.java:342) at com.caucho.config.core.ResinImport.initImpl(ResinImport.java:176) at com.caucho.config.core.ResinImport.init(ResinImport.java:107) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.caucho.config.j2ee.PostConstructProgram.inject(PostConstructProgram.java:140) at com.caucho.config.type.InlineBeanType.init(InlineBeanType.java:458) at com.caucho.config.xml.XmlConfigContext.configureChildBean(XmlConfigContext.java:705) at com.caucho.config.xml.XmlConfigContext.configureBeanProperties(XmlConfigContext.java:686) at com.caucho.config.xml.XmlConfigContext.configureChildNode(XmlConfigContext.java:464) at com.caucho.config.xml.XmlConfigContext.configureNode(XmlConfigContext.java:371) at com.caucho.config.xml.XmlConfigContext.configureBean(XmlConfigContext.java:285) at com.caucho.config.xml.XmlConfigContext.configure(XmlConfigContext.java:243) at com.caucho.config.Config.configure(Config.java:324) at com.caucho.config.Config.configure(Config.java:254) at com.caucho.server.resin.BootConfig.configureFile(BootConfig.java:132) at com.caucho.server.resin.Resin.configureFile(Resin.java:1036) at com.caucho.server.resin.Resin.<init>(Resin.java:251) at com.caucho.server.resin.Resin.<init>(Resin.java:183) at com.caucho.server.resin.Resin.main(Resin.java:1465)Caused by: com.caucho.config.ConfigException: com.caucho.config.core.ResinIf.init(): java.lang.NoClassDefFoundError: javax/mail/Session at com.caucho.config.ConfigException.create(ConfigException.java:102) at com.caucho.config.ConfigException.create(ConfigException.java:130) at com.caucho.config.j2ee.PostConstructProgram.inject(PostConstructProgram.java:142) at com.caucho.config.type.InlineBeanType.init(InlineBeanType.java:458) at com.caucho.config.xml.XmlConfigContext.configureChildBean(XmlConfigContext.java:705) at com.caucho.config.xml.XmlConfigContext.configureBeanProperties(XmlConfigContext.java:686) at com.caucho.config.xml.XmlConfigContext.configureChildNode(XmlConfigContext.java:464) ... 39 moreCaused by: java.lang.NoClassDefFoundError: javax/mail/Session at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.getDeclaredMethods(Class.java:1975) at com.caucho.config.reflect.ReflectionAnnotatedType.introspectMethods(ReflectionAnnotatedType.java:260) at com.caucho.config.reflect.ReflectionAnnotatedType.introspect(ReflectionAnnotatedType.java:212) at com.caucho.config.reflect.ReflectionAnnotatedType.introspect(ReflectionAnnotatedType.java:193) at com.caucho.config.reflect.ReflectionAnnotatedType.getMethods(ReflectionAnnotatedType.java:152) at com.caucho.config.reflect.AnnotatedTypeImpl.getMethods(AnnotatedTypeImpl.java:132) at com.caucho.config.xml.XmlBeanConfig.<init>(XmlBeanConfig.java:130) at com.caucho.config.xml.XmlBeanAttribute.create(XmlBeanAttribute.java:139) at com.caucho.config.xml.XmlConfigContext.configureBeanProperties(XmlConfigContext.java:677) at com.caucho.config.xml.XmlConfigContext.configureChildNode(XmlConfigContext.java:464) at com.caucho.config.xml.XmlConfigContext.configureAttribute(XmlConfigContext.java:324) at com.caucho.config.program.NodeBuilderChildProgram.inject(NodeBuilderChildProgram.java:82) at com.caucho.config.program.ContainerProgram.inject(ContainerProgram.java:88) at com.caucho.config.program.ConfigProgram.configure(ConfigProgram.java:107) at com.caucho.config.core.ResinIf.init(ResinIf.java:71) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.caucho.config.j2ee.PostConstructProgram.inject(PostConstructProgram.java:140) ... 43 moreCaused by: java.lang.ClassNotFoundException: javax.mail.Session at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 65 morefile:/d:/develop/resin-pro-4.0.53/conf/health.xml:723: com.caucho.config.core.ResinIf.init(): java.lang.NoClassDefFoundError: javax/mail/Session721: - Automatic PDF reports722: -->723: <resin:if test="${pdf_summary}">724: <health:PdfReport>725: <path>${resin.root}/doc/admin/pdf-gen.php</path>
當然如果你的resin啟動還報錯,請根據出錯類所在包添加到%resin_home%\lib\目錄
在linux下,專業版還有以下兩種啟動參數
IV) PDF Reports--------------- With Resin-Pro, you can get a PDF snapshot report of the server with the command-line: unix> bin/resin.sh pdf-report #產生pdf報告 You can also get a watchdog restart report with the -watchdog option unix> bin/resin.sh pdf-report -watchdog
resin-pro-4.0.53報錯java.lang.Error: java.lang.ClassNotFoundException: com.caucho.loader.SystemClassLoader