3

我在 Glassfish 上运行的 JSF 2 (maven) 项目中使用 Shiro。添加了所有相关的依赖项(shiro-ehcache-1.2.2.jar、ehcache-core-2.5.0)。我的项目编译并运行顺利,但是一旦我用 @ViewScoped 注释标记了一个 ManagedBean,我就会得到这个恼人的 ClassNotFound 异常:

WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception java.lang.ClassNotFoundException: void
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509) 
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:247) 
    at net.sf.ehcache.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:129) 
    at net.sf.ehcache.util.PreferTCCLObjectInputStream.resolveClass(PreferTCCLObjectInputStream.java:44) 
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574) 
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495) 
    at java.io.ObjectInputStream.readClass(ObjectInputStream.java:1461) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1311) 
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) 
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) 
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) 
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) 
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) 
    at java.util.HashMap.readObject(HashMap.java:1030) 
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) 
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) 
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) 
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) 
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) 
    at java.util.HashMap.readObject(HashMap.java:1030) 
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) 
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) 
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) 
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) 
    at java.util.HashMap.readObject(HashMap.java:1030) 
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) 
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) 
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) 
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) 
    at java.util.HashMap.readObject(HashMap.java:1030) 
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) 
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) 
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) 
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) 
    at org.apache.shiro.session.mgt.SimpleSession.readObject(SimpleSession.java:500) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) 
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) 
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) 
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946) 
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479) 
    at net.sf.ehcache.Element.readObject(Element.java:800) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) 
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) 
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) 
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) 
    at net.sf.ehcache.store.disk.DiskStorageFactory.read(DiskStorageFactory.java:378) 
    at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:960) 
    at net.sf.ehcache.store.disk.Segment.decodeHit(Segment.java:178) 
    at net.sf.ehcache.store.disk.Segment.get(Segment.java:216) 
    at net.sf.ehcache.store.disk.DiskStore.get(DiskStore.java:504) 
    at net.sf.ehcache.store.disk.DiskStore.getQuiet(DiskStore.java:511) 
    at net.sf.ehcache.store.FrontEndCacheTier.getQuiet(FrontEndCacheTier.java:196) 
    at net.sf.ehcache.Cache.searchInStoreWithoutStats(Cache.java:2101) 
    at net.sf.ehcache.Cache.get(Cache.java:1630) 
    at org.apache.shiro.cache.ehcache.EhCache.get(EhCache.java:73) 
    at org.apache.shiro.session.mgt.eis.CachingSessionDAO.getCachedSession(CachingSessionDAO.java:217) 
    at org.apache.shiro.session.mgt.eis.CachingSessionDAO.getCachedSession(CachingSessionDAO.java:202) 
    at org.apache.shiro.session.mgt.eis.CachingSessionDAO.readSession(CachingSessionDAO.java:259) 
    at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSessionFromDataSource(DefaultSessionManager.java:236) 
    at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSession(DefaultSessionManager.java:222) 
    at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:118) 
    at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108) 
    at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getSession(AbstractNativeSessionManager.java:100) 
    at org.apache.shiro.mgt.SessionsSecurityManager.getSession(SessionsSecurityManager.java:125) 
    at org.apache.shiro.mgt.DefaultSecurityManager.resolveContextSession(DefaultSecurityManager.java:456) 
    at org.apache.shiro.mgt.DefaultSecurityManager.resolveSession(DefaultSecurityManager.java:442) 
    at org.apache.shiro.mgt.DefaultSecurityManager.createSubject(DefaultSecurityManager.java:338) 
    at org.apache.shiro.subject.Subject$Builder.buildSubject(Subject.java:846) 
    at org.apache.shiro.web.subject.WebSubject$Builder.buildWebSubject(WebSubject.java:148) 
    at org.apache.shiro.web.servlet.AbstractShiroFilter.createSubject(AbstractShiroFilter.java:292) 
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:359) 
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) 
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) 
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) 
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) 
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) 
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) 
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) 
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) 
    at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) 
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) 
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) 
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) 
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) 
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) 
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) 
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) 
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) 
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) 
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) 
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) 
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71) 
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) 
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) 
    at java.lang.Thread.run(Thread.java:662) 

由于异常发生在 shiro-ehcache 类内部并且它说:“java.lang.ClassNotFoundException:void”我无法推断,哪个类或 jar 导致了问题。似乎我的一个 bean 不能被序列化,但是哪一个呢?我的问题是:

在这种情况下,我们如何找到违规的班级?

编辑:我有一个会话范围的导航 bean:

@ManagedBean
@SessionScoped
public class NavigationBean implements Serializable {
private static final long serialVersionUID = 2L;

@Inject
private transient Logger log;

private String page = "/subpages/admin_home.xhtml";

public NavigationBean() {
}

public String getPage() {
    return page;
}

public void setPage(String page) {
    this.page = page;

}


}

还有另一个 sessionscoped bean:

@ManagedBean
@SessionScoped
public class SettingsBean implements Serializable {

private static final long serialVersionUID = 1L;

@Inject
private transient Logger log;

private static final Locale Turkish = new Locale("tr");
private static final Locale English = Locale.ENGLISH;
private Locale locale = FacesContext.getCurrentInstance().getViewRoot().getLocale();
private static final Map<String,Object> countries;
static {
        countries = new LinkedHashMap<String,Object>();
        countries.put("English", English); //label, value
        countries.put("Türkçe", Turkish);
}

/**
 * Creates a new instance of SettingsBean
 */
public SettingsBean() {
    System.out.print("Settings bean constructed");
}

@PostConstruct
public void init(){
    log.debug ("Settings bean initialized");
}

public Locale getLocale() {
    return locale;
} 

public String getLanguage() {
    String lang = locale.getLanguage();
    if (lang.equals("en_US")){lang="en";}
    else if (lang.equals("tr_tr")){lang="tr";}
    return lang;
}

public void setLanguage(String language) {
    locale = new Locale(language);
    FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);

    //String Msg = Messages.getResourceBundleString("M","LanguageChanged");
    String Msg = Messages.getString("LanguageChanged");

    FacesMessage facesmsg = new FacesMessage(FacesMessage.SEVERITY_INFO, Msg, "");  
    FacesContext.getCurrentInstance().addMessage(null, facesmsg);
    log.debug(Msg + " : " + language);
}

public Map<String, Object> getCountriesInMap() {
        return countries;
}


//value change event listener
public void countryLocaleCodeChanged(ValueChangeEvent e){

    String newLocaleValue = e.getNewValue().toString();

    for (Map.Entry<String, Object> entry : countries.entrySet()) {

       if(entry.getValue().toString().equals(newLocaleValue)){
                            setLanguage(entry.getValue().toString());
      }
   }
}    

}

4

2 回答 2

2

您可以使用 Jboss 的tattle tale来检查项目的 lib 文件夹并以图形方式映射出依赖关系树。使用这个工具,你可以找出一个类的依赖关系。下载并解压项目后,通过以下步骤运行以找出哪个类正在破坏:

  1. 从命令行运行 tattletale jar。例如

    java -jar -Xmx512m tattletale.jar   <the path with your libraries> <the destination folder where you want the generated reports to be stored>
    
  2. 在输出文件夹中,您会找到一个文件夹树和一个index.html文件。打开此文件并选择依赖链接。

  3. 依赖页面中,您将找到库中的所有类以及每个类的所有依赖项的列表。一个简单的“查找”操作将告诉您哪个类缺少您突出显示的类

于 2013-07-17T13:56:52.043 回答
0

正如@mrembisz 指出的那样,我已经检查了我的viewscoped bean。我将一个 stateles bean 注入到我的 viewscoped bean 中,尽管它正在实现“Serializable”,但它的一个或多个属性可能是不可序列化的。所以我改变了

@Inject
MyBean MB;

@Inject
private transient MyBean MB;

而且我坚持“java.lang.ClassNotFoundException:void”消失了。但是因为我一开始没有得到那个异常,它仍然偶尔会被抛出。我现在得到:

INFO: 2013-07-18 15:21:06,123 ERROR o.a.s.w.s.AbstractShiroFilter - session.touch() method invocation has failed.  Unable to updatethe corresponding session's last access time based on the incoming request.org.apache.shiro.cache.CacheException: net.sf.ehcache.CacheException: java.lang.ClassNotFoundException: void

at org.apache.shiro.cache.ehcache.EhCache.put(EhCache.java:105) ~[shiro-ehcache-1.2.2.jar:1.2.2]
at org.apache.shiro.session.mgt.eis.CachingSessionDAO.cache(CachingSessionDAO.java:247) ~[shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.session.mgt.eis.CachingSessionDAO.cache(CachingSessionDAO.java:235) ~[shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.session.mgt.eis.CachingSessionDAO.update(CachingSessionDAO.java:280) ~[shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.session.mgt.DefaultSessionManager.onChange(DefaultSessionManager.java:212) ~[shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.session.mgt.AbstractNativeSessionManager.touch(AbstractNativeSessionManager.java:193) ~[shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.session.mgt.DelegatingSession.touch(DelegatingSession.java:120) ~[shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.session.ProxiedSession.touch(ProxiedSession.java:100) ~[shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.web.servlet.AbstractShiroFilter.updateSessionLastAccessTime(AbstractShiroFilter.java:315) [shiro-web-1.2.2.jar:1.2.2]
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:364) [shiro-web-1.2.2.jar:1.2.2]
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.2.2.jar:1.2.2]
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.2.2.jar:1.2.2]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.2.jar:1.2.2]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256) [web-core.jar:3.1.2.1-SNAPSHOT]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) [web-core.jar:3.1.2.1-SNAPSHOT]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) [web-core.jar:3.1.2.1-SNAPSHOT]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) [web-core.jar:3.1.2.1-SNAPSHOT]
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) [web-core.jar:3.1.2.1-SNAPSHOT]
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) [web-core.jar:3.1.2.1-SNAPSHOT]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) [web-core.jar:3.1.2.1-SNAPSHOT]
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) [web-core.jar:3.1.2.1-SNAPSHOT]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) [web-core.jar:3.1.2.1-SNAPSHOT]
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) [kernel.jar:3.1.2.1-SNAPSHOT]
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) [kernel.jar:3.1.2.1-SNAPSHOT]
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860) [grizzly-http.jar:1.9.50]
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757) [grizzly-http.jar:1.9.50]
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056) [grizzly-http.jar:1.9.50]
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229) [grizzly-http.jar:1.9.50]
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) [grizzly-framework.jar:1.9.50]
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) [grizzly-framework.jar:1.9.50]
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) [grizzly-framework.jar:1.9.50]
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) [grizzly-http.jar:1.9.50]
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) [grizzly-framework.jar:1.9.50]
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) [grizzly-framework.jar:1.9.50]
at com.sun.grizzly.ContextTask.run(ContextTask.java:71) [grizzly-framework.jar:1.9.50]
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) [grizzly-utils.jar:1.9.50]
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) [grizzly-utils.jar:1.9.50]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_38]

Caused by: net.sf.ehcache.CacheException: java.lang.ClassNotFoundException: void
at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:890) ~[ehcache-core-2.6.6.jar:na]
at net.sf.ehcache.store.disk.Segment.decode(Segment.java:172) ~[ehcache-core-2.6.6.jar:na]
at net.sf.ehcache.store.disk.Segment.put(Segment.java:449) ~[ehcache-core-2.6.6.jar:na]
at net.sf.ehcache.store.disk.DiskStore.put(DiskStore.java:438) ~[ehcache-core-2.6.6.jar:na]
at net.sf.ehcache.store.FrontEndCacheTier.put(FrontEndCacheTier.java:267) ~[ehcache-core-2.6.6.jar:na]
at net.sf.ehcache.Cache.putInternal(Cache.java:1455) ~[ehcache-core-2.6.6.jar:na]
at net.sf.ehcache.Cache.put(Cache.java:1383) ~[ehcache-core-2.6.6.jar:na]
at net.sf.ehcache.Cache.put(Cache.java:1348) ~[ehcache-core-2.6.6.jar:na]
at org.apache.shiro.cache.ehcache.EhCache.put(EhCache.java:102) ~[shiro-ehcache-1.2.2.jar:1.2.2]
... 39 common frames omitted


Caused by: java.lang.ClassNotFoundException: void
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1509) ~[war-util.jar:3.1.2.1-SNAPSHOT]
at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359) ~[war-util.jar:3.1.2.1-SNAPSHOT]
at java.lang.Class.forName0(Native Method) ~[na:1.6.0_38]
at java.lang.Class.forName(Class.java:247) ~[na:1.6.0_38]
at net.sf.ehcache.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:129) ~[ehcache-core-2.6.6.jar:na]
at net.sf.ehcache.util.PreferTCCLObjectInputStream.resolveClass(PreferTCCLObjectInputStream.java:44) ~[ehcache-core-2.6.6.jar:na]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readClass(ObjectInputStream.java:1461) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1311) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) ~[na:1.6.0_38]
at java.util.HashMap.readObject(HashMap.java:1030) ~[na:1.6.0_38]
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_38]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_38]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) ~[na:1.6.0_38]
at java.util.HashMap.readObject(HashMap.java:1030) ~[na:1.6.0_38]
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_38]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_38]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) ~[na:1.6.0_38]
at java.util.HashMap.readObject(HashMap.java:1030) ~[na:1.6.0_38]
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_38]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_38]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) ~[na:1.6.0_38]
at java.util.HashMap.readObject(HashMap.java:1030) ~[na:1.6.0_38]
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_38]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_38]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) ~[na:1.6.0_38]
at org.apache.shiro.session.mgt.SimpleSession.readObject(SimpleSession.java:500) ~[shiro-core-1.2.2.jar:1.2.2]
at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_38]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_38]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) ~[na:1.6.0_38]
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946) ~[na:1.6.0_38]
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479) ~[na:1.6.0_38]
at net.sf.ehcache.Element.readObject(Element.java:844) ~[ehcache-core-2.6.6.jar:na]
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_38]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_38]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:969) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) ~[na:1.6.0_38]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) ~[na:1.6.0_38]
at net.sf.ehcache.store.disk.DiskStorageFactory.read(DiskStorageFactory.java:370) ~[ehcache-core-2.6.6.jar:na]
at net.sf.ehcache.store.disk.DiskStorageFactory.retrieve(DiskStorageFactory.java:886) ~[ehcache-core-2.6.6.jar:na]
... 47 common frames omitted
于 2013-07-18T11:24:12.590 回答