2016-08-21 261 views
1

你好,我下載了tomcat 8.5.4,當時我已經和球衣做了一些簡單的休息應用。當我在Windows上的tomcat上部署戰爭時,它工作正常。當我複製整個目錄到Linux服務器(下載版本是多平臺),我部署應用程序,Linux不看我的休息控制器。服務器,同一場戰爭的 相同的文件和Windows系統,Linux的不...從窗戶輸出在linux上部署戰爭

21-Aug-2016 19:12:52.370 INFO [localhost-startStop-2] com.sun.jersey.api.core.PackagesResourceConfig.init Scanning for root resource and provider classes in the packages: 
    com.test.rest 
21-Aug-2016 19:12:52.414 INFO [localhost-startStop-2] com.sun.jersey.api.core.ScanningResourceConfig.logClasses Root resource classes found: 
    class com.test.rest.RestController 
21-Aug-2016 19:12:52.414 INFO [localhost-startStop-2] com.sun.jersey.api.core.ScanningResourceConfig.init No provider classes found. 
21-Aug-2016 19:12:52.568 INFO [localhost-startStop-2] com.sun.jersey.server.impl.application.WebApplicationImpl._initiate Initiating Jersey application, version 'Jersey: 1.18 11/22/2013 03:05 AM' 
21-Aug-2016 19:12:53.773 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive D:\tomcat-8.5.4\webapps\RestServices.war has finished in 2,654 ms 

從Linux

21-Aug-2016 19:17:01.343 INFO [localhost-startStop-1] com.sun.jersey.api.core.PackagesResourceConfig.init Scanning for root resource and provider classes in the packages: 
    com.test.rest 
21-Aug-2016 19:17:01.398 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /home/tomcat-8.5.4/webapps/RestServices.war has fished in 3,342 ms 

輸出,當我打電話休止符:

Servlet.init() for servlet jersey-serlvet threw exception 
... 
java.lang.IllegalAccessError: tried to access method com.sun.jersey.core.reflection.ReflectionHelper.getContextClassLoader()Ljava/lang/ClassLoader; from class com.sun.jersey.spi.scanning.AnnotationScannerListener 

任何想法?

+0

你在Windows上測試過嗎?我的意思是,打到REST終點? –

+0

是的,它工作正常。我甚至把我的本地IP(192 ...),並試圖與此。因爲我本地有windows,linux是遠程服務器。我相信這是一些編碼問題或像這樣的問題;/ – user2771738

回答