2013-04-12 67 views
1

我看到一个奇怪的错误,当我做了Maven构建,通过詹金斯推出,使用Java 6,我是否会在我的测试编译相位误差,这是如何解决javac编译器错误,“package com.sun.tools.internal.ws.processor.model不存在”?

[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为2350 KB /秒) 下载: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/sec) 下载: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 at 133.4 KB/sec) 下载: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.RELEASE/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 /秒) 下载: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.RELEASE/spring-security-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 /秒) mojoStarted org.apache.maven.plugins:maven-clean-plugin:2.4.1(默认清除) [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean(default-clean)@ myproject --- mojoSucceeded org.apache.maven.plugins:maven-clean-plugin:2.4.1(default-干净) [debug] execute contextualize mojoStarted org.apache.maven.plugins:maven-resources-plugin:2.5(default-resources) [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources)@ myproject --- [INFO]使用'UTF-8'编码来复制已过滤的资源。 复制7资源 mojoSucceeded org.apache.maven.plugins:maven-resources-plugin:2.5(默认资源) mojoStarted org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2(default ) [INFO] [INFO] --- properties-maven-plugin:1.0-alpha-2:write-project-properties(default)@ myproject --- mojoSucceeded org。codehaus.mojo:properties-maven-plugin:1.0-alpha-2(默认) mojoStarted org.codehaus.mojo:sql-maven-plugin:1.5(drop-db-before-test-if-any) [INFO] [INFO] --- sql-maven-plugin:1.5:执行(drop-db-before-test-if-any)@ myproject --- [INFO]跳过sql执行 mojoSucceeded 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 --- 

mojoSucceeded org.codehaus.mojo:sql-maven-plugin:1.5(create-test-db) mojoStarted org.apache.maven.plugins:maven-compiler-pl ugin:2.3.2(default-compile) [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile(default-compile)@ myproject --- [INFO]编译40个源文件to/scratch/jenkins/workspace/subco/subco/myproject/target/classes mojoSucceeded .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 

mojoSucceeded org.apache.maven.plugins:行家资源-插件:2.5(缺省testResources) mojoStarted org.codehaus.mojo:SQL-行家-插件:1.5(创建存储的进程内) [INFO]跳转SQL执行

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

mojoSucceeded org.codehaus.mojo:SQL-行家-插件:1.5(创建存储的进程内) mojoStarted org.apache.maven.plugins:行家-antrun-插件: 1.7(unzip-liquibase-archive) [INFO] [INFO] --- maven-antrun-plugin:1.7:run(unzip-liquibase-archive)@ myproject --- [INFO]执行任务

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. 
+2

这是完全不可读的。 – durron597

回答

0

com.sun.tools.internal.ws看起来像你的Web服务和一些JAX-WS工具工作,像wsgen工具。

JAX-WS工具是Java开发工具包(JDK)的一部分 - 它位于tools.jar中,在JRE中找不到它。 不太可能的原因,但你应该检查詹金斯是否使用JRE。

更可能是您在Linux工作站/服务器上执行此操作,而您没有安装Oracle的JDK。 OpenJDK可能没有Sun的“私有”工具/实现。

+0

我不是起诉JAX-WS。我只想让JAXB API将我的一些POJO转换为XML字符串。正如你所建议的那样,将JAXB编译为JRE中的tools.jar是唯一的方法吗? – Dave

+0

我不确定为什么JAXB会这样做。你可以尝试注释掉那部分代码,然后运行Maven来确认这是否是导致问题的原因。 – Cebence

相关问题