Notes |
|
(0002711)
|
pagedn
|
02-03-08 13:32
|
|
This issue has been resolved. I made the following modifications to the getDeserializer(String) method of the SerializerFactory class:
replaced lines:
ClassLoader loader = Thread.currentThread().getContextClassLoader();
Class cl = Class.forName(type, false, loader);
with:
Class cl = Class.forName(type);
I'm running OC4J 9.0.4 and the ApplicationContextClassLoader returned from getContextClassLoader is unable to resolve the target class when calling Class.forName(). It's quite possible that this issue is specific to OC4J (this is the only environment that I've tested in). Regardless, invoking Class.forName using the default class loader seems to have done the trick. You might also want to consider at least WARN level logging in the catch block following the attempt to resolve the class. It's generally not a good idea to "eat" exceptions without at least logging any potential problems that may have occurred during the execution of the code.
My thanks to anyone that may have spent time looking into this. |
|
|
(0002714)
|
pagedn
|
02-04-08 08:52
|
|
Looks like the code changes aren't necessary. The problem was due to my lack of understanding about context classloaders on threads. I was able to assign the current classloader using the setContextClassloader method on Thread and the class is now resolved correctly when trying to obtain the proper deserializer. |
|
|
(0002766)
|
ferg
|
02-13-08 11:24
|
|
server/334g
(adding logging. The deserialization behavior is correct.) |
|