簡體   English   中英

如何解決javac編譯器錯誤“包com.sun.tools.internal.ws.processor.model不存在”?

[英]How do I solve javac compiler error, “package com.sun.tools.internal.ws.processor.model does not exist”?

當我使用Java 6通過Jenkins啟動Maven構建時,看到一個奇怪的錯誤。在測試編譯階段出現錯誤,它們是

[ERROR] /scratch/jenkins/workspace/subco/subco/myproject/src/test/java/org/mainco/subco/ebook/mvc/  CorrelationUpdateControllerTest.java:[77,48] error: package com.sun.tools.internal.ws.processor.model does not exist
[ERROR] /scratch/jenkins/workspace/subco/subco/myproject/src/test/java/org/mainco/subco/ebook/mvc/CorrelationUpdateControllerTest.java:[77,48] error: package com.sun.tools.internal.ws.processor.model does not exist
[INFO] 2 errors  

該錯誤絕不與上面引用的第77行相關。 那條線是

public class CorrelationUpdateControllerTest extends AbstractNTsubcoTests

我正在使用jaxb-api,v 2.2.9,如果有關系的話。 Maven的依賴是

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.2.9</version>
</dependency>

下面是更詳細的輸出結果...

[INFO] ------------------------------------------------------------------------
[INFO] Building subco Admin Module 16.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.ourrepo.com/content/groups/public/org/springframework/spring-oxm/3.1.1.RELEASE/spring-oxm-3.1.1.RELEASE.pom

下載地址: http : //repo.ourrepo.com/content/groups/public/org/springframework/spring-oxm/3.1.1.RELEASE/spring-oxm-3.1.1.RELEASE.pom (4 KB,23.5 KB / sec)下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/spring-webmvc-portlet/3.1.1.RELEASE/spring-webmvc-portlet-3.1.1.RELEASE.pom已下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/spring-webmvc-portlet/3.1.1.RELEASE/spring-webmvc-portlet-3.1.1.RELEASE.pom (位於4 KB 42.6 KB /秒)下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-web/3.1.3.RELEASE/spring-security-web-3.1.3 .RELEASE.pom下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-web/3.1.3.RELEASE/spring-security-web-3.1.3 。 RELEASE.pom (4 KB,133.4 KB /秒)下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-core/3.1.3.RELEASE/spring- security-core-3.1.3.RELEASE.pom下載: http://repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-core/3.1.3.RELEASE/spring-security-core-3.1.3.RELEASE.pom(4 KB速度為47.5 KB /秒)。下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-config/3.1.3.RELEASE/spring-security-config-3.1。 3.RELEASE.pom下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-config/3.1.3.RELEASE/spring-security-config-3.1.3 .RELEASE.pom (4 KB,41.5 KB /秒)下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-taglibs/3.1.3.RELEASE/spring -security-taglibs-3.1.3.RELEASE.pom下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-taglibs/3.1.3.RELEASE/spring- security-taglibs-3.1.3.RELEASE.pom (4 KB,16.5 KB /秒)下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-acl/ 3.1.3 RELE ASE / spring-security-acl-3.1.3.RELEASE.pom下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-acl/3.1.3.RELEASE /spring-security-acl-3.1.3.RELEASE.pom(4 KB,145.5 KB /秒)下載: http//repo.ourrepo.com/content/groups/public/org/springframework/spring-oxm/3.1 .1.RELEASE / spring-oxm-3.1.1.RELEASE.jar下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/spring-webmvc-portlet/3.1.1.RELEASE/ spring-webmvc-portlet-3.1.1.RELEASE.jar下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-web/3.1.3.RELEASE/spring -security-web-3.1.3.RELEASE.jar下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-core/3.1.3.RELEASE/spring- security-core-3.1.3.RELEASE.jar下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-config/3.1.3.RELEASE/spring-security -config-3.1.3.RELEASE.jar 下載地址: http: //repo.ourrepo.com/content/groups/public/org/springframework/spring-oxm/3.1.1.RELEASE/spring-oxm-3.1.1.RELEASE.jar(72 KB,1372.9 KB / sec)下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-taglibs/3.1.3.RELEASE/spring-security-taglibs-3.1.3.RELEASE。 jar下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-taglibs/3.1.3.RELEASE/spring-security-taglibs-3.1.3.RELEASE.jar (21 KB,以176.6 KB /秒的速度)下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-acl/3.1.3.RELEASE/spring-security-acl -3.1.3.RELEASE.jar下載: http : //repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-config/3.1.3.RELEASE/spring-security-config- 3.1.3.RELEASE.jar (199 KB,1156.6 KB /秒)下載: http ://repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-web/3.1.3 。發行/彈簧安全 ity-web-3.1.3.RELEASE.jar (248 KB,1369.5 KB /秒)已下載: http ://repo.ourrepo.com/content/groups/public/org/springframework/security/spring-security-acl/ 3.1.3.RELEASE / spring-security-acl-3.1.3.RELEASE.jar (78 KB,2678.2 KB /秒)已下載: http ://repo.ourrepo.com/content/groups/public/org/springframework/ security / spring-security-core / 3.1.3.RELEASE / spring-security-core-3.1.3.RELEASE.jar (333 KB,1721.7 KB /秒)下載地址: http ://repo.ourrepo.com/content/ groups / public / org / springframework / spring-webmvc-portlet / 3.1.1.RELEASE / spring-webmvc-portlet-3.1.1.RELEASE.jar (187 KB,每秒621.6 KB)mojo已啟動org.apache.maven.plugins :maven-clean-plugin:2.4.1(默認-clean)[INFO] [INFO] --- maven-clean-plugin:2.4.1:clean(default-clean)@ myproject --- mojo成功的org.apache。 maven.plugins:maven-clean-plugin:2.4.1(default-clean)[調試]執行上下文化mojoStarted org.apache.maven.plugins:maven-resources-plugin:2.5(default-resources)[INFO] [INFO] --- maven-resources-plugin:2.5:res ources(默認資源)@ myproject --- [INFO]使用'UTF-8'編碼復制過濾的資源。 [INFO]復制7個資源mojo成功的org.apache.maven.plugins:maven-resources-plugin:2.5(默認資源)mojoStarted org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2(默認)[INFO ] [INFO] --- properties-maven-plugin:1.0-alpha-2:write-project-properties(默認)@ myproject --- mojo成功的org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2 (默認)mojo啟動org.codehaus.mojo:sql-maven-plugin:1.5(drop-db-before-test-if-any)[INFO] [INFO] --- sql-maven-plugin:1.5:execute(drop -db-before-test-if-any)@ myproject --- [INFO]跳過sql執行mojo成功的org.codehaus.mojo:sql-maven-plugin:1.5(drop-db-before-test-if-any)mojoStarted org.codehaus.mojo:sql-maven-plugin:1.5(create-test-db)[INFO]跳過sql執行

[INFO] 
[INFO] --- sql-maven-plugin:1.5:execute (create-test-db) @ myproject ---

mojo成功的org.codehaus.mojo:sql-maven-plugin:1.5(create-test-db)mojoStarted org.apache.maven.plugins:maven-compiler-plugin:2.3.2(default-compile)[INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile(default-compile)@ myproject --- [信息]將40個源文件編譯到/ scratch / jenkins / workspace / subco / subco / myproject / target / classes mojo成功的組織.apache.maven.plugins:maven-compiler-plugin:2.3.2(默認編譯)[調試]執行上下文化mojoStarted org.apache.maven.plugins:maven-resources-plugin:2.5(default-testResources)[INFO] [INFO]使用'UTF-8'編碼復制過濾的資源。

[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ myproject ---
[INFO] Copying 10 resources

mojo成功的org.apache.maven.plugins:maven-resources-plugin:2.5(default-testResources)mojoStarted org.codehaus.mojo:sql-maven-plugin:1.5(create-stored-proc)[INFO]跳過sql執行

[INFO] 
[INFO] --- sql-maven-plugin:1.5:execute (create-stored-proc) @ myproject ---

mojo成功的org.codehaus.mojo:sql-maven-plugin:1.5(create-stored-proc)mojoStarted org.apache.maven.plugins:maven-antrun-plugin:1.7(unzip-liquibase-archive)[INFO] [INFO] --- maven-antrun-plugin:1.7:run(unzip-liquibase-archive)@ myproject --- [信息]執行任務

main:
mojoSucceeded org.apache.maven.plugins:maven-antrun-plugin:1.7(unzip-liquibase-archive)[INFO] Executed tasks

mojoStarted org.apache.maven.plugins:maven-antrun-plugin:1.7(format-liquibase-files)
[INFO] 
[INFO] --- maven-antrun-plugin:1.7:run (format-liquibase-files) @ myproject ---
[INFO] Executing tasks

main:
[INFO] Executed tasks
mojoSucceeded org.apache.maven.plugins:maven-antrun-plugin:1.7(format-liquibase-files)
mojoStarted com.google.code.maven-replacer-plugin:replacer:1.5.1(create-init-db-test-scripts)
[INFO] 
[INFO] --- replacer:1.5.1:replace (create-init-db-test-scripts) @ myproject ---
[INFO] Replacement run on 1 file.
mojoSucceeded com.google.code.maven-replacer-plugin:replacer:1.5.1(create-init-db-test-scripts)
mojoStarted org.apache.maven.plugins:maven-compiler-plugin:2.3.2(default-testCompile)
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ myproject ---
[INFO] Compiling 8 source files to /scratch/jenkins/workspace/subco/subco/myproject/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /scratch/jenkins/workspace/subco/subco/myproject/src/test/java/org/mainco/subco/ebook/mvc/  CorrelationUpdateControllerTest.java:[77,48] error: package com.sun.tools.internal.ws.processor.model does not exist
[ERROR] /scratch/jenkins/workspace/subco/subco/myproject/src/test/java/org/mainco/subco/ebook/mvc/  CorrelationUpdateControllerTest.java:[77,48] error: package com.sun.tools.internal.ws.processor.model does not exist
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
mojoFailed org.apache.maven.plugins:maven-compiler-plugin:2.3.2(default-testCompile)
projectFailed org.mainco.subco:myproject:16.0.0-SNAPSHOT
An attempt to send an e-mail to empty list of recipients, ignored.

com.sun.tools.internal.ws ,您似乎正在使用Web服務和某些JAX-WS工具,例如wsgen工具。

JAX-WS工具是Java開發工具包(JDK)的一部分-它位於`tools.jar中,在JRE中找不到。 不太可能是原因,但是您應該檢查Jenkins是否正在使用JRE。

您更有可能在Linux工作站/服務器上執行此操作,而未安裝Oracle的JDK。 OpenJDK可能沒有Sun的“私有”工具/實現。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM