• Bug
  • Status: Closed
  • 1 Critical
  • Resolution: Fixed
  • tgautier
  • Reporter: tgautier
  • May 10, 2007
  • 0
  • Watchers: 1
  • October 05, 2007
  • July 27, 2007

Attachments

Description

From the forums:

http://forums.terracotta.org/forums/posts/list/236.page

I have another question. In the exception what the following line exactly means: *************************************************** Attempt to share an instance of a non-portable class referenced by a portable class. This unshareable class has not been included for sharing in the configuration. Please add this class to the section of the configuration file. This class also has a super-class that must be in the DSO boot jar. Please add this class to the boot jar configuration and re-create the DSO boot jar.

Referring class : oracle.jdbc.driver.T4CMAREngine Referring field : oracle.jdbc.driver.T4CMAREngine.inStream Thread : main JVM ID : VM(3) Non-portable root name : com.pramati.jdbc.terracotta.DBBeanClient.dbBean Non-included class : oracle.net.ns.NetInputStream Class to add to boot jar: java.io.InputStream ***********************************************

Per the Moraga PRD we are supposed to tell the user the class is unshareable, if we know it is unshareable, instead of telling them to add it to the boot jar which will not have any effect.

Comments

Juris Galang 2007-05-10

We already generate the correct error message for why a certain class is not portable or even if it is adaptable;

In this instance - java.io.InputStream - currently isn’t flagged as permanently excluded, which is why the recommendation in the error message is to add it in the boot jar, instead of saying that it is not adaptable or that it’s superclass is non-shareable.

Juris Galang 2007-05-10

fixed in rev 3012: Added java.io.InputStream and java.io. OutputStream in the permanent excludes list.

Tim Eck 2007-05-10

I’m confused – what is wrong about that message? It says you are trying to share an instance of NetInputStream (which is a subclass of java.io.InputStream). NetInputStream is not included, and java.io.InputStream is not in the boot jar. Both of those would have to be true (and can be) to try to make NetInputStream portable.

Now – more than likely there is a reference to something non-portable in the graph of that NetInputStream (like a socket), but that doesn’t mean someone couldn’t make it transient or something. I’m generalizing a bit since no one should be trying to cluster an instance of oracle’s database driver (the case here). Long story short, this isn’t yet a case of unshareable type

Tim Eck 2007-05-10

re-opening for the time being. I don’t think the fix is appropriate

Fiona OShea 2007-05-11

Sean: Added you as a watcher so that you can add tests for this scenario.

Fiona OShea 2007-05-31

The message should look like this *************************************************** Attempt to share an instance of a non-portable class referenced by a portable class. This unshareable class has not been included for sharing in the configuration. Please add this class to the section of the configuration file. This class also has a super-class that must be in the DSO boot jar. Please add this class to the boot jar configuration and re-create the DSO boot jar.

Referring class : oracle.jdbc.driver.T4CMAREngine Referring field : oracle.jdbc.driver.T4CMAREngine.inStream Thread : main JVM ID : VM(3) Non-portable root name : com.pramati.jdbc.terracotta.DBBeanClient.dbBean

Actions to take: Non-included class : oracle.net.ns.NetInputStream Class to add to boot jar: java.io.InputStream ***********************************************

Juris Galang 2007-06-01

Doesn’t the following text in the preamble to the error message already indicate what action needs to be taken? :

… Please add this class to the section of the configuration file. This class also has a super-class that must be in the DSO boot jar. Please add this class to the boot jar configuration and re-create the DSO boot jar.

Juris Galang 2007-06-04

The message is already clear.

Fiona OShea 2007-06-05

Talk to Juris to discuss exactly what the message should say

Fiona OShea 2007-06-26

This is good, but would also like to have this new style of messaging for the other similar types of exceptions like, non-portable not boot-jar, unlocked shared exception. Double check whether there are other kinds that should change.

Fiona OShea 2007-06-26

See if you can unify the code.

Nathaniel Harward 2007-07-07

Attaching Mylyn context

Nathaniel Harward 2007-07-07

Fiona – the messaging described here is in conflict with CDV-245, which I happened to stumble across while researching this. Should I change the messaging for all of these types of issues be similar to CDV-245, replace CDV-245 with the messaging in this issue, or go somewhere in the middle? If somewhere in the middle, please see if you can get Taylor to provide an example of how [non] verbose he’d like it to be.

Fiona OShea 2007-07-10

Work with PM (Taylor) to get the messaging. It should be a merge between both issues.

Nathaniel Harward 2007-07-25

This is checked in to the 2.4[.1] branch, please review quickly if you want changes before the next release :)

Fiona OShea 2007-07-27

Taylor verified that this is OK now.