0
我正在使用库com.thoughtworks.xstream:xstream:1.4.5在两台机器之间传输Java对象。
第一个是运行Windows 8.1和Java HotSpot客户端虚拟机1.7.0_51 第二种运行Ubuntu Linux操作系统12.04与Java HotSpot的64位服务器VM 1.7.0_51
我从Windows transfering一个TestNG的测试用例机器到Linux机器,因此需要XStream进行反序列化。当结果从Linux返回到Windows时,在Windows机器上反序列化XML会出现问题。
很明显,java.lang.UNIX **类在Windows JVM上不可用。我如何抑制这个异常。这些类不需要进一步处理,但可以忽略。
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
-------------------------------