-
1. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
clebert.suconic Feb 9, 2006 6:28 PM (in response to clebert.suconic)I have even configured JBossSerialization as the serialization provider on a remote client and didn't get any exceptions. So, this is probably not related to dettached collections.
I will wait until someone find a way to replicate this. I have done a lot work trying to replicate this without any success. -
2. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
epbernard Feb 9, 2006 8:13 PM (in response to clebert.suconic)Search for the exception in the EJB3 user forum. I've scanned it from feb 1st today, and people are having the same issue. Ask for help overthere, they usually are responsive.
It might be due to:
- proxy passivation rather than collection passivation
- or maybe field interception issue (ie byte code enhanced classes), but I'm doubtfull on this one since it is disabled out-of-the-box. -
3. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
clebert.suconic Feb 10, 2006 1:08 PM (in response to clebert.suconic)I looked at EJB user's forum (googling) and didn't find any references to "javax.ejb.EJBException: Could not passivate; failed to save state" under EJB3 user's forums.
Also, I wrote a small testcase using another Stateless Session Bean (Proxy), and having dettached collections, and passivate it over 100 times, and didn't get any errors.
The session produced had 1M, so it was a pretty big bean. It would have failed if it was something obvious. -
4. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
bill.burke Feb 10, 2006 1:11 PM (in response to clebert.suconic)Have you tried all types? Specifically classes?
-
5. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
clebert.suconic Feb 10, 2006 5:04 PM (in response to clebert.suconic)Well... I have testcases for all existing types within JBossSerialization.
I'm not saying is not possible to be something wrong, but I have tested it within JBossSerialization project. -
6. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
bill.burke Feb 10, 2006 5:07 PM (in response to clebert.suconic)post back to him that you need more information then.
-
7. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
clebert.suconic Feb 10, 2006 5:13 PM (in response to clebert.suconic)Just had an insight...
I'm using a CVS download equivalent to 4.0.4 RC1.
Maybe we had something breaking it recently.
I'm going to ask him what version he is using. (head or 4.0.4) -
8. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
epbernard Feb 10, 2006 7:01 PM (in response to clebert.suconic)"clebert.suconic@jboss.com" wrote:
I looked at EJB user's forum (googling) and didn't find any references to "javax.ejb.EJBException: Could not passivate; failed to save state" under EJB3 user's forums.
Here is the forum case
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=76737 -
9. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
clebert.suconic Feb 12, 2006 1:47 PM (in response to clebert.suconic)Moving discussion from JIRA to the Forum.
Adrian wrote:Guys.
JIRA == release notes
Guesses go in the Forums
If you want to have a chat ... take it somewhere else. :-)
Anyway, the bug is trivial to see by reading the code.
ClassMetaData "unwraps" a Class[] to store the underlying type java.lang.Class
and calculate the array depth.
See ClassMetaData::calculateDepthAndName
However the persistor checks for a class type BEFORE it checks for an array.
So it never going to be able to marshal an array of classes.
See PersistResolver::resolvePersister
Can somebody raise a separate task to fix this obviously broken duplicate logging of exceptions!
BAD LOG AND THROW PATTERN:
try
{
// do stuff
}
catch (Exception e)
{
log.error("Error", e);
throw e;
}
IF YOU DON'T HANDLE THE EXCEPTION, LOG IT AT DEBUG! -
10. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
clebert.suconic Feb 12, 2006 2:01 PM (in response to clebert.suconic)You're right about the Class array on persist resolver.
It was so obvious that I couldn't see that.
I'm creating a testcase and fixing the code.
Also, I don't have any exceptions on JBossSerialization the way you described (At least I didn't find any, and I have improved exception handling on JBossSerialization on the third Beta release. I guess these are EJB3 code.
I'm attaching a fixed JAR for jboss-serialization.jar, so people could try it out and see if this solves the issue.
I'm planning a release soon, but I want to do a few more tests before officially releasing it.
http://jira.jboss.com/jira/secure/attachment/12311542/jboss-serialization.jar -
11. Re: Discussion of EJBTHREE-423 JBossSerialization ClassCastE
adrian.brock Feb 13, 2006 4:41 AM (in response to clebert.suconic)"clebert.suconic@jboss.com" wrote:
Also, I don't have any exceptions on JBossSerialization the way you described (At least I didn't find any, and I have improved exception handling on JBossSerialization on the third Beta release. I guess these are EJB3 code.
Yes you can see from the stacktrace/logger names that it is being logged
multiple times by the different layers of the SFSB cache.