简体   繁体   English

如何在Linux中升级当前项目的Java版本?

[英]how to Upgrade Java version of current project in linux?

currently my project is running on linux server which complied in jdk5 now i want change jdk version jdk5 to jdk8 so for that what can i do? 目前,我的项目正在Linux服务器上运行,该服务器遵循jdk5,现在我想将jdk版本jdk5更改为jdk8,因此该怎么办?

I applied these steps: 1) Doc base deployment i followed so i change in apache2.27/conf/httpd_vhost.conf file and worker.properties as per as my latest complied(JDK8) location directory. 我执行了以下步骤:1)我遵循了文档库部署,因此我按照最新的compile(JDK8)位置目录更改了apache2.27 / conf / httpd_vhost.conf文件和worker.properties。

httpd_vhost.conf: httpd_vhost.conf:

<VirtualHost *:80>
 ServerAdmin 
 DocumentRoot /usr/local/ProjectJ8/demoregserver
 ServerName  
 DirectoryIndex      index.html
    ScriptAlias /cgi-bin "/usr/local/apache2.2.27/cgi-bin/"
    Alias /demoregserver "/usr/local/ProjectJ8/demoregserver"
 <Directory "/usr/local/ProjectJ8/demoregserver">
     Options FollowSymLinks -Indexes
    AllowOverride All
 </Directory>
            <Location "/demoregserver/WEB-INF/">
            </Location>

            <Location "/demoregserver/META-INF/">
            </Location>

JkMount /demoregserver/servlet/* wsworker
JkMount /demoregserver/*.jsp wsworker
JkMount /demoregserver/kaptcha.jpg wsworker

 #AddType application/x-httpd-php .php

   # RewriteEngine   On
   # RewriteLog "logs/rewrite.log"
   # RewriteLogLevel 10

   # RewriteCond %{REQUEST_URI} .rpm
   # RewriteCond ${tokenize:%{REMOTE_ADDR}%{QUERY_STRING}} !^$
   # RewriteRule ^(.*)$ $1?${tokenize:%{REMOTE_ADDR}} [R,L]


CustomLog           demoregserver_access_log common
CustomLog           demoregserver_referer_log referer
CustomLog           demoregserver_agent_log agent

2) I also changed tomcate/conf/server.xml and workder.properties. 2)我还更改了tomcate / conf / server.xml和workder.properties。 in worker.properties change java_home=/usr/local/jdk1.8.0_101 在worker.properties中更改java_home = / usr / local / jdk1.8.0_101

server.xml: server.xml:

<Context path="/demoregserver"
                    docBase="/usr/local/ProjectJ8/demoregserver"
                    debug="0"
                    crossContext="false" >
            </Context>

I am calling this project using specific Url from different project and getting this error: 我正在使用来自其他项目的特定网址来调用此项目,并收到此错误:

    Exception while getting Registration Response java.io.IOException: Server returned HTTP response code: 500 for URL: http://update.demoreg.com/demoregserver/servlet/CustomerMyAccountManager
    java.io.IOException: Server returned HTTP response code: 500 for URL: http://update.demoreg.com/demoregserver/servlet/CustomerMyAccountManager
            at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
            at registration.helpers.DemoRegProcess.registration(DemoRegProcess.java:150)
            at registration.helpers.DemoRegProcess.subscription(DemoRegProcess.java:47)
            at registration.helpers.SubscriptionHelper.processSubscription(SubscriptionHelper.java:219)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at com.filter.RequestFilterServlet.doFilter(RequestFilterServlet.java:60)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
            at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
            at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:311)
            at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
            at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
            at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
            at java.lang.Thread.run(Thread.java:745)

I found this about the error 500: 我发现此错误500:

HTTP Error 500 Internal server error Introduction HTTP错误500内部服务器错误简介

The Web server (running the Web Site) encountered an unexpected condition that prevented it from fulfilling the request by the client (eg your Web browser or our CheckUpDown robot) for access to the requested URL. Web服务器(运行Web站点)遇到意外情况,阻止其满足客户端(例如Web浏览器或CheckUpDown机械手)对请求的URL的访问请求。

This is a 'catch-all' error generated by the Web server. 这是Web服务器生成的“全部捕获”错误。 Basically something has gone wrong, but the server can not be more specific about the error condition in its response to the client. 基本上发生了问题,但是服务器在响应客户端时无法更具体地说明错误情况。 In addition to the 500 error notified back to the client, the Web server should generate some kind of internal error log which gives more details of what went wrong. 除了将500错误通知给客户端之外,Web服务器还应生成某种内部错误日志,该日志提供了发生错误的详细信息。 It is up to the operators of the Web server site to locate and analyse these logs. 由Web服务器站点的操作员确定和分析这些日志。 (Last updated: October 2013) Fixing 500 errors - general (最新更新:2013年10月)修复了500个错误-常规

This error can only be resolved by fixes to the Web server software. 该错误只能通过对Web服务器软件的修复来解决。 It is not a client-side problem. 这不是客户端问题。 It is up to the operators of the Web server site to locate and analyse the logs which should give further information about the error. 由Web服务器站点的操作员确定和分析日志,日志应提供有关该错误的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM