使用Gilead和Hibernate Envers时抛出SecurityException

时间:2014-04-07 14:33:54

标签: java hibernate gxt hibernate-envers gilead

我正在尝试审核包含HashMap的Object。 HashMap属性是@Transient,我尝试添加@NotAudited,但是当我尝试获取对象列表时,它会抛出以下错误:

SEVERE: Exception while dispatching incoming RPC call
java.lang.RuntimeException: net.sf.gilead.exception.InvocationException: net.sf.gilead.exception.InvocationException: net.sf.gilead.exception.InvocationException: net.sf.gilead.exception.ProxyException: Proxy generation failure for java.util.HashMap
    at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleExporterProcessingException(GWTRPCServiceExporter.java:449)
    at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:418)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest(GWTRPCServiceExporter.java:472)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    ...
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    ...
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:112)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.gilead.exception.InvocationException: net.sf.gilead.exception.InvocationException: net.sf.gilead.exception.InvocationException: net.sf.gilead.exception.ProxyException: Proxy generation failure for java.util.HashMap
    at net.sf.gilead.core.PersistentBeanManager.holdPersistentObject(PersistentBeanManager.java:998)
    at net.sf.gilead.core.PersistentBeanManager.holdPersistentObject(PersistentBeanManager.java:794)
    at net.sf.gilead.core.PersistentBeanManager.clonePojo(PersistentBeanManager.java:378)
    at net.sf.gilead.core.PersistentBeanManager.clone(PersistentBeanManager.java:254)
    at net.sf.gilead.gwt.GileadRPCHelper.parseReturnValue(GileadRPCHelper.java:157)
    at org.gwtwidgets.server.spring.gilead.GileadRPCServiceExporter.invokeMethodOnService(GileadRPCServiceExporter.java:151)
    at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:403)
    ... 54 more
Caused by: net.sf.gilead.exception.InvocationException: net.sf.gilead.exception.InvocationException: net.sf.gilead.exception.ProxyException: Proxy generation failure for java.util.HashMap
    at net.sf.gilead.core.PersistentBeanManager.holdPersistentObject(PersistentBeanManager.java:998)
    at net.sf.gilead.core.PersistentBeanManager.holdPersistentObject(PersistentBeanManager.java:949)
    ... 60 more
Caused by: net.sf.gilead.exception.InvocationException: net.sf.gilead.exception.ProxyException: Proxy generation failure for java.util.HashMap
    at net.sf.gilead.core.PersistentBeanManager.holdPersistentObject(PersistentBeanManager.java:998)
    at net.sf.gilead.core.PersistentBeanManager.holdPersistentObject(PersistentBeanManager.java:962)
    ... 61 more
Caused by: net.sf.gilead.exception.ProxyException: Proxy generation failure for java.util.HashMap
    at net.sf.gilead.proxy.JavassistProxyGenerator.generateProxyFor(JavassistProxyGenerator.java:101)
    at net.sf.gilead.proxy.ProxyManager.generateProxyClass(ProxyManager.java:128)
    at net.sf.gilead.core.beanlib.mapper.ProxyClassMapper.getTargetClass(ProxyClassMapper.java:119)
    at net.sf.gilead.core.PersistentBeanManager.holdPersistentObject(PersistentBeanManager.java:821)
    ... 62 more
Caused by: javassist.CannotCompileException: by java.lang.SecurityException: Prohibited package name: java.util
    at javassist.ClassPool.toClass(ClassPool.java:1051)
    at javassist.CtClass.toClass(CtClass.java:1120)
    at net.sf.gilead.proxy.JavassistProxyGenerator.generateProxyFor(JavassistProxyGenerator.java:97)
    ... 65 more
Caused by: java.lang.SecurityException: Prohibited package name: java.util
    at java.lang.ClassLoader.preDefineClass(Unknown Source)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at javassist.ClassPool.toClass2(ClassPool.java:1063)
    at javassist.ClassPool.toClass(ClassPool.java:1045)
    ... 67 more

我已经尝试了另一个没有HashMap的简单对象,它运行得很好。

有什么建议吗?

使用Hibernate 3.5.6和Gilead 1.3.2。

0 个答案:

没有答案