CI-server (Hudson), for which I am responsible, builds Maven project. After the last commit, the build failed:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] \hudson\jobs\path to my class\MyClass.java:[33,62] package com.sun.xml.internal.messaging.saaj.packaging.mime.util does not exist
[ERROR] \hudson\jobs\path to my class\MyClass.java:[75,5] cannot find symbol
symbol : class BASE64EncoderStream
location: class |fullname of MyClass|
[ERROR] \hudson\jobs\path to my class\MyClass.java:[75,38] cannot find symbol
symbol : class BASE64EncoderStream
location: class |fullname of MyClass|
[INFO] 3 errors
Required class (com.sun.xml.internal.messaging.saaj.packaging.mime.util.BASE64EncoderStream) is situated in rt.jar.
I tried (In accordance with the instructions at http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies) to add system dependency in project's pom.xml:
<dependency>
<groupId>dummy</groupId>
<artifactId>dummy</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${java.home}/lib/rt.jar</systemPath>
</dependency>
It did not help.
The most interesting is that all files compiled fine on the local machine of my collegue (he use Eclipse build-in compiler).
In internet I found the same question (link: http://maven.40175.n5.nabble.com/Why-can-t-Maven-find-com-sun-xml-internal-messaging-saaj-util-ByteOutputStream-class-td107361.html). The last answer was that the reason for this trouble is Oracle's Java compiler.
So, I changed Oracle's jdk to OpenJDK, but it did not help.
Does someone have any suggestions on how to solve this problem?