-1
當deSerializing和object發生錯誤時,出現以下錯誤。在反序列化對象時獲取classnotfound異常錯誤
13:47:00,679 INFO [stdout] (org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1) 2012-10-26 13:47:00,679() DEBUG com.dipp.testMap - Error while reading the object to HashMap
13:47:00,680 ERROR [stderr] (org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1) java.lang.ClassNotFoundException: org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl from [Module "deployment.DIPP.war:main" from Service Module Loader]
13:47:00,682 ERROR [stderr] (org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
13:47:00,682 ERROR [stderr] (org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
這是我的代碼。
try{
transferObject = (HashMap)o.readObject();
}
catch(Exception e)
{
log.debug("Error while reading the object to HashMap");
e.printStackTrace();
}
我有一個名爲EPOCHDATE場是在transferObject和具有的XMLGregorianCalendar datatype.Any的想法來解決這個問題?我得到了classNotFound異常。我相信,我必須在POM文件中添加依賴項。
在此先感謝
Gendaful
這很可能是類路徑的問題。正如你所說,檢查你的POM文件和/或類路徑。 – tjg184
而不是懶惰,你可能已經嘗試添加依賴到你的POM文件發佈問題之前。 – CKing