• Bug
  • Status: Closed
  • 2 Major
  • Resolution: As Designed
  • Sessions
  • gbevin
  • Reporter: cdanielw
  • August 17, 2007
  • 0
  • Watchers: 2
  • July 27, 2012
  • August 21, 2007

Attachments

Description

When the number of request exceeds the number of view stored in the session, the following exception is thrown:

com.tc.exception.TCNonPortableObjectError: ******************************************************************************* Attempt to share an instance of a non-portable class referenced by a portable class. This unshareable class is a subclass of a JVM- or host machine-specific resource. Please either modify the class hierarchy or ensure that instances of this class don’t enter the shared object graph.

Referring class : org.apache.commons.collections.map.AbstractReferenceMap$ReferenceEntry Referring field : org.apache.commons.collections.map.AbstractHashedMap$HashEntry.value Thread : http-9081-Processor4 JVM ID : VM(0) Unshareable superclass names: java.lang.ref.SoftReference

*******************************************************************************

at com.tc.object.ClientObjectManagerImpl.throwNonPortableException(ClientObjectManagerImpl.java:720)
at com.tc.object.ClientObjectManagerImpl.checkPortabilityOfTraversedReference(ClientObjectManagerImpl.java:616)
at com.tc.object.ClientObjectManagerImpl.access$800(ClientObjectManagerImpl.java:69)
at com.tc.object.ClientObjectManagerImpl$NewObjectTraverseTest.checkPortability(ClientObjectManagerImpl.java:942)
at com.tc.object.Traverser.addReferencedObjects(Traverser.java:48)
at com.tc.object.Traverser.traverse(Traverser.java:82)
at com.tc.object.ClientObjectManagerImpl.addToManagedFromRoot(ClientObjectManagerImpl.java:876)
at com.tc.object.ClientObjectManagerImpl.create(ClientObjectManagerImpl.java:268)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreateIfNecesary(ClientObjectManagerImpl.java:332)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreate(ClientObjectManagerImpl.java:305)
at com.tc.object.tx.ClientTransactionManagerImpl.fieldChanged(ClientTransactionManagerImpl.java:516)
at com.tc.object.TCObjectImpl.objectFieldChanged(TCObjectImpl.java:294)
at com.tc.object.bytecode.hook.impl.ArrayManager.objectArrayChanged(ArrayManager.java:122)
at com.tc.object.bytecode.ManagerUtil.objectArrayChanged(ManagerUtil.java:359)
at org.apache.commons.collections.map.AbstractHashedMap.addEntry(AbstractHashedMap.java:524)
at org.apache.commons.collections.map.AbstractHashedMap.addMapping(AbstractHashedMap.java:492)
at org.apache.commons.collections.map.AbstractHashedMap.put(AbstractHashedMap.java:282)
at org.apache.commons.collections.map.AbstractReferenceMap.put(AbstractReferenceMap.java:255)
at org.apache.myfaces.application.jsp.JspStateManagerImpl$SerializedViewCollection.add(JspStateManagerImpl.java:628)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:453)
at org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:312)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:601)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at com.tc.tomcat55.session.SessionValve55.tcInvoke(SessionValve55.java:63)
at com.tc.tomcat55.session.SessionValve55.invoke(SessionValve55.java:50)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

A minimal war has been attached. The number of views stored in the session has been reduced to 5, in order to replicate the problem quicker. To reproduce, deploy the war in the Terracotta Session Configurator, point the browser to one of the servers and reload the page 5 times.

Comments

Fiona OShea 2007-08-17

Although unsupported GUI Framework we should look into this.

Geert Bevin 2007-08-21

The old views are stored into a map with soft references, Terracotta doesn’t support sharing those.

You can configure this by setting rg.apache.myfaces.application.jsp.JspStateManagerImpl$SerializedViewCollection._oldSerializedViews up as a transient field.

For example:

  <transient-fields>
    <field-name>org.apache.commons.collections.map.AbstractReferenceMap.queue</field-name>
    <field-name>org.apache.myfaces.application.jsp.JspStateManagerImpl$SerializedViewCollection._oldSerializedViews</field-name>
  </transient-fields>