Java XMLGregorianCalendar和类依赖于内部api类的FindBugs非瞬态不可服务错误

Java XMLGregorianCalendar和类依赖于内部api类的FindBugs非瞬态不可服务错误,java,checkstyle,findbugs,pmd,nonserializedattribute,Java,Checkstyle,Findbugs,Pmd,Nonserializedattribute,我正在使用FindBugs2.0.2。使用findbugs验证项目时,我遇到以下错误: In class com.vo.Account Field com.vo.Account.startDat Actual type javax.xml.datatype.XMLGregorianCalendar In Account.java Class com.vo.Account defines non-transient non-serializable instance field startDat

我正在使用FindBugs2.0.2。使用findbugs验证项目时,我遇到以下错误:

In class com.vo.Account
Field com.vo.Account.startDat
Actual type javax.xml.datatype.XMLGregorianCalendar
In Account.java
Class com.vo.Account defines non-transient non-serializable instance field startDat
This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.
而且

class com.demo.AccountResources relies on internal api classes
This class makes use of internal api classes. As these classes are not documented, nor externally released as part of the api, they are subject to change or removal. You should not be using these classes.

Packages that shouldn't be used are:
com.sun.xxx
org.apache.xerces.xxx
org.apache.xalan.xxx
如何修复这些错误?
提前感谢

1。使日历暂时化。2.不要在这些包中使用类,尽管我认为FindBugs在这三个方面都是错误的。它应该只抱怨sun.*软件包。com.sun.*中有许多类是公共API,例如JNDI上下文工厂。如果我将其设置为瞬态,则无法发送抛出网络,也无法在反序列化中获取vale,那么这是解决此问题的正确解决方案吗?