Я использую библиотеку com.thoughtworks.xstream: xstream: 1.4.5 для переноса объекта Java между двумя машинами.
Первый работает с ОС Windows 8.1 Java Hotspot Client VM 1.7.0_51 Второй работает Ubuntu Linux 12.04 с Java HotSpot 64-битном сервере VM 1.7.0_51
Я перенося в TestCase TestNG из окон машины на машину Linux, что требует XStream для десериализации. Когда результат возвращается из Linux в Windows, существует проблема десериализации XML на машине Windows.
Очевидно, что классы java.lang.UNIX ** недоступны в JVM Windows. Как подавить это исключение. Эти классы не требуются для дальнейшей обработки, но могут быть проигнорированы.
com.thoughtworks.xstream.converters.ConversionException: java.lang.UNIXProcess$ProcessPipeInputStream : java.lang.UNIXProcess$ProcessPipeInputStream
---- Debugging information ----
message : java.lang.UNIXProcess$ProcessPipeInputStream
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : java.lang.UNIXProcess$ProcessPipeInputStream
class : org.apache.commons.exec.StreamPumper
required-type : org.apache.commons.exec.StreamPumper
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /org.testng.internal.TestResult/m_testClass/m_beforeTestMethods/org.testng.internal.ConfigurationMethod/m_instance/driver/executor/connection/process/process/process/executor/streamHandler/outputThread/target/is
line number : 107
class[1] : java.lang.Thread
class[2] : org.apache.commons.exec.PumpStreamHandler
class[3] : org.apache.commons.exec.DefaultExecutor
class[4] : org.openqa.selenium.os.UnixProcess
class[5] : org.openqa.selenium.os.CommandLine
class[6] : org.openqa.selenium.firefox.FirefoxBinary
class[7] : org.openqa.selenium.firefox.internal.NewProfileExtensionConnection
class[8] : org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor
class[9] : org.openqa.selenium.firefox.FirefoxDriver
class[10] : my.work.selenium.MySeleniumTest
class[11] : org.testng.internal.ConfigurationMethod
class[12] : [Lorg.testng.ITestNGMethod;
converter-type[1] : com.thoughtworks.xstream.converters.collections.ArrayConverter
class[13] : org.testng.TestClass
class[14] : org.testng.internal.TestResult
version : 1.4.5
-------------------------------