运行以下我无法使用的简化代码ObjectSave
,然后立即ObjectLoad
获取我的原始对象
<!--- AbstractModel.cfc --->
<cfcomponent output="false">
<cffunction name="initAttributes" access="private" returntype="void">
</cffunction>
</cfcomponent>
<cfset myObj = createObject("component","AbstractModel")>
<cfset myObj = ObjectSave(myObj)>
<cfdump var="#myObj#">
<cftry>
<cfset myObj = ObjectLoad(myObj)>
<cfdump var="#myObj#">
<cfcatch>
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
第一次转储输出二进制对象,但运行ObjectLoad
抛出此错误
java.util.concurrent.ConcurrentHashMap incompatible with java.util.WeakHashMap
堆栈跟踪
java.lang.ClassCastException: java.util.concurrent.ConcurrentHashMap incompatible with java.util.WeakHashMap at
coldfusion.runtime.TemplateProxyWrapper.readResolve(TemplateProxyWrapper.java:80) at
sun.reflect.GeneratedMethodAccessor382.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at
java.lang.reflect.Method.invoke(Method.java:611) at
java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1126) at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1779) at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346) at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:365) at
coldfusion.tagext.io.FileUtils.loadInstance(FileUtils.java:1699) at
coldfusion.runtime.CFPage.ObjectLoad(CFPage.java:8814) at
cfjunk2ecfm1335312837.runPage(/webdata/data/installedApps/ADCDevDSM.ear/ADCDevDSM.war/pmb046/junk.cfm:6) at
coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at
coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:444) at
coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at
coldfusion.filter.IpFilter.invoke(IpFilter.java:64) at
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:449) at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at
coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at
coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) at
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at
coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at
coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at
coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at
coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at
coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at
coldfusion.CfmServlet.service(CfmServlet.java:219) at
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1224) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456) at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97) at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:191) at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928) at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025) at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3751) at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304) at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962) at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195) at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) at
com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784) at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at
com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at
com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1690)
我在 Java 1.6.0 上的 x86 Linux 2.6.32-220.7.1.el6.x86_64(由 ColdFusion 服务器报告)上运行 ColdFusion Enterprise 10,0,11,285437
我猜这是 Linux Java 中的一个错误,因为相同的代码在 Windows 上的 Java 1.6 和 1.7 中成功运行,如果我使用数组、结构或文本而不是对象,它也可以成功运行