When you restart resin using SSH to perform a remote restart script, an error occurs:
Com.caucho.jsp.jspparseexception: resin can ' t load com.sun.tools.javac.main. usually this means that the jdk tools.jar is missing from the classpath, possibly because of using a jre instead of The jdk. you can either add tools.jar to the classpath or change the compiler to an external one with <java compiler= ' Javac '/> or jikes.java.lang.classnotfoundexception: com.sun.tools.javac.main at com.caucho.jsp.jspcompilerinstance.compile ( jspcompilerinstance.java:421) at Com.caucho.jsp.JspManager.compile (jspmanager.java:233) at Com.caucho.jsp.JspManager.createPage (jspmanager.java:177) &nbsP; at com.caucho.jsp.jspmanager.createpage (JspManager.java:157) at com.caucho.jsp.pagemanager.getpage (PageManager.java : 248) at com.caucho.jsp.pagemanager.getpage ( pagemanager.java:166) at Com.caucho.jsp.QServlet.getSubPage (qservlet.java:292) at Com.caucho.jsp.QServlet.getPage (qservlet.java:210) at Com.caucho.server.dispatch.PageFilterChain.compilePage (pagefilterchain.java:206) at com.caucho.server.dispatch.pagefilterchain.dofilter (PageFilterChain.java:133) at com.caucho.server.webapp.dispatchfilterchain.dofilter ( dispatchfilterchain.java:115) &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBsp;at com.caucho.server.dispatch.servletinvocation.service (servletinvocation.java:229) at com.caucho.server.webapp.requestdispatcherimpl.forward ( requestdispatcherimpl.java:277) at Com.caucho.server.webapp.RequestDispatcherImpl.forward (requestdispatcherimpl.java:106) at com.iheyday.base.cgi.cgiservlet.dispatchpage (CGIServlet.java:204) at com.iheyday.base.cgi.cgiservlet.disposeactionresult ( cgiservlet.java:159) at Com.iheyday.base.cgi.CGIServlet.invokeAction (cgiservlet.java:108) at com.iheyday.base.cgi.cgiservlet.service (cgiservlet.java:90) at javax.servlet.http.httpservlet.service (httpservlet.java:92) at com.caucho.server.dispatch.servletfilterchain.dofilter (ServletFilterChain.java : 106) at Com.iheyday.web.filter.CampaignPromotionFilter.doFilter (campaignpromotionfilter.java:115) at com.caucho.server.dispatch.filterfilterchain.dofilter ( FILTERFILTERCHAIN.JAVA:70) at Com.iheyday.web.filter.AntiXSSFilter.doFilter (antixssfilter.java:116) at com.caucho.server.dispatch.filterfilterchain.dofilter (filterfilterchain.java:70) at com.iheyday.web.filter.setcharacterencodingfilter.dofilter ( SETCHARACTERENCODINGFILTER.JAVA:54) at Com.caucho.server.dispatch.FilterFilterChain.doFilter (filterfilterchain.java:70) at cOm.caucho.server.webapp.WebAppFilterChain.doFilter (webappfilterchain.java:173) at com.caucho.server.dispatch.servletinvocation.service (ServletInvocation.java:229) at com.caucho.server.hmux.hmuxrequest.handlerequest ( hmuxrequest.java:420) at Com.caucho.server.port.TcpConnection.run (tcpconnection.java:511) at com.caucho.util.threadpool.runtasks (threadpool.java:516) at com.caucho.util.threadpool.run (threadpool.java:442) at java.lang.thread.run (thread.java:662) caused by: Com.caucho.java.javacompileexception: resin can ' t load com.sun.tools.javac.main. usually this means that the jdk tools.jar is missing&nbSp;from the classpath, possibly because of using a jre instead of the JDK. You can either add tools.jar to the classpath or change the compiler to an external one with <java compiler= ' Javac '/> or jikes.java.lang.classnotfoundexception: com.sun.tools.javac.main at Com.caucho.java.InternalCompiler.compileInt (internalcompiler.java:77) at com.caucho.java.abstractjavacompiler.run (abstractjavacompiler.java:101) ... 1 more
The reason for this problem is simple:
When using SSH to execute a remote script, there is no inherited full environment variable, that is, the JDK environment variable is not loaded!
So just implement the set JDK environment variable:
Vi/etc/profile.d/java.shexport java_home=/usr/java/jdk1.6.0_38export path= $PATH: $JAVA _home/bin
and add it in your restart script:
. /etc/profile.d/java.sh
This article is from the "Ops Road" blog, please be sure to keep this source http://vekergu.blog.51cto.com/9966832/1628030
Production resin error resin can ' t load com.sun.tools.javac.Main