• New Feature
  • Status: Open
  • 2 Major
  • Resolution:
  • cdennis
  • Reporter: steve
  • May 26, 2010
  • 0
  • Watchers: 1
  • October 11, 2011

Description

To be clear – the issue here is that the toolkit throws an exception type that is not part of the toolkit API and violates closure. This surely isn’t the only instance of this violation.

map.put(“test”, Color.RED);

get’s you

2010-05-25 22:05:29,318 INFO - Terracotta 3.3.0-SNAPSHOT, as of 20100522-190529 (Revision 15305 by [email protected] from trunk) 2010-05-25 22:05:30,080 INFO - Successfully loaded base configuration from server at ‘localhost:9510’. 2010-05-25 22:05:30,135 INFO - Successfully loaded base configuration from file at ‘/var/folders/px/pxGDUQ1mF1SJpzK1nis6ak+++TM/-Tmp-/tc-config7997769738254236899.xml’. 2010-05-25 22:05:30,559 INFO - Log file: ‘/Users/steve/terracotta/client-logs/terracotta-client.log’. 2010-05-25 22:05:33,171 INFO - Connection successfully established to server at 192.168.2.19:9510 com.tc.exception.TCNonPortableObjectError: ******************************************************************************* Attempt to share an instance of a non-portable class by passing it as an argument to a method of a logically-managed class. This unshareable class must be in the DSO boot jar. Please add this class to the boot jar configuration and re-create the DSO boot jar.

For more information on this issue, please visit our Troubleshooting Guide at: http://www.terracotta.org/kit/reflector?kitID=default&pageID=npoe

Thread : main JVM ID : VM(0) Logically-managed class name: org.terracotta.collections.ConcurrentDistributedMapDso Logical method name : put(Object,Object) Class to add to boot jar : java.awt.Color

Under most circumstances, you should only be adding classes for your application. If you are adding classes for frameworks or code not written by you, then you should consider finding a Terracotta Integration Module (TIM) that matches the framework you are using.

As an example, if the non-portable class listed below is net.sf.ehcache.CacheManager, you should consider using the ehcache TIM.

It is possible that this class is truly non-portable, the solution is then to mark the referring field as transient. For more information on non-portable classes see the Troubleshooting Guide.

Action to take:

1) Reconfigure and rebuild the boot jar * edit your tc-config.xml file * locate the element \* add this snippet inside the element

   <additional-boot-jar-classes>
    <include>java.awt.Color</include>
   </additional-boot-jar-classes>

* if there is already an element present, simply add the new includes inside it \* Recreate the boot jar by running the 'make-boot-jar' tool in the bin/ directory

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

at com.tc.object.ClientObjectManagerImpl.throwNonPortableException(ClientObjectManagerImpl.java:781)
at com.tc.object.ClientObjectManagerImpl.checkPortabilityOfLogicalAction(ClientObjectManagerImpl.java:754)
at com.tc.object.tx.ClientTransactionManagerImpl.logicalInvoke(ClientTransactionManagerImpl.java:506)
at com.tc.object.TCObjectLogical.logicalInvoke(TCObjectLogical.java:17)
at com.tc.object.bytecode.ManagerImpl.logicalInvoke(ManagerImpl.java:295)
at com.tc.object.bytecode.ManagerUtil.logicalInvoke(ManagerUtil.java:316)
at org.terracotta.collections.ConcurrentDistributedMapDso.doLogicalPut(ConcurrentDistributedMapDso.java:155)
at org.terracotta.collections.ConcurrentDistributedMapDso.put(ConcurrentDistributedMapDso.java:123)
at org.terracotta.collections.ConcurrentDistributedMapDsoArray.put(ConcurrentDistributedMapDsoArray.java:182)
at org.terracotta.collections.ConcurrentDistributedMapImpl.put(ConcurrentDistributedMapImpl.java:213)
at PlayingWithExpress.main(PlayingWithExpress.java:31) Exception in thread "main" com.tc.exception.TCNonPortableObjectError:  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Attempt to share an instance of a non-portable class by passing it as an argument to a method of a logically-managed class. This unshareable class must be in the DSO boot jar. Please add this class to the boot jar configuration and re-create the DSO boot jar.

For more information on this issue, please visit our Troubleshooting Guide at: http://www.terracotta.org/kit/reflector?kitID=default&pageID=npoe

Thread : main JVM ID : VM(0) Logically-managed class name: org.terracotta.collections.ConcurrentDistributedMapDso Logical method name : put(Object,Object) Class to add to boot jar : java.awt.Color

Under most circumstances, you should only be adding classes for your application. If you are adding classes for frameworks or code not written by you, then you should consider finding a Terracotta Integration Module (TIM) that matches the framework you are using.

As an example, if the non-portable class listed below is net.sf.ehcache.CacheManager, you should consider using the ehcache TIM.

It is possible that this class is truly non-portable, the solution is then to mark the referring field as transient. For more information on non-portable classes see the Troubleshooting Guide.

Action to take:

1) Reconfigure and rebuild the boot jar * edit your tc-config.xml file * locate the element \* add this snippet inside the element

   <additional-boot-jar-classes>
    <include>java.awt.Color</include>
   </additional-boot-jar-classes>

* if there is already an element present, simply add the new includes inside it \* Recreate the boot jar by running the 'make-boot-jar' tool in the bin/ directory

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

at com.tc.object.ClientObjectManagerImpl.throwNonPortableException(ClientObjectManagerImpl.java:781)
at com.tc.object.ClientObjectManagerImpl.checkPortabilityOfLogicalAction(ClientObjectManagerImpl.java:754)
at com.tc.object.tx.ClientTransactionManagerImpl.logicalInvoke(ClientTransactionManagerImpl.java:506)
at com.tc.object.TCObjectLogical.logicalInvoke(TCObjectLogical.java:17)
at com.tc.object.bytecode.ManagerImpl.logicalInvoke(ManagerImpl.java:295)
at com.tc.object.bytecode.ManagerUtil.logicalInvoke(ManagerUtil.java:316)
at org.terracotta.collections.ConcurrentDistributedMapDso.doLogicalPut(ConcurrentDistributedMapDso.java:155)
at org.terracotta.collections.ConcurrentDistributedMapDso.put(ConcurrentDistributedMapDso.java:123)
at org.terracotta.collections.ConcurrentDistributedMapDsoArray.put(ConcurrentDistributedMapDsoArray.java:182)
at org.terracotta.collections.ConcurrentDistributedMapImpl.put(ConcurrentDistributedMapImpl.java:213)
at PlayingWithExpress.main(PlayingWithExpress.java:31)

Comments

Tim Eck 2010-05-26

what was your expectation?

Steve Harris 2010-05-26

Someone said in the meeting that since TCNonportable wasn’t a toolkit exception we were violating the API. I was just recording

Tim Eck 2010-05-26

gotcha…I guess the title of this item says that but I didn’t quite get it.

Fiona OShea 2010-08-11

Is this fixable?

Chris Dennis 2010-08-12

Yes, but I’m not so bothered about this as I was in the past. Since the behavior isn’t documented and the throw is undeclared the fact that the type is internal is not such a big issue - I’m happy for it to stay as is - at least for the moment.