Announcement Announcement Module
Collapse
No announcement yet.
ObjectInputStream class loading problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ObjectInputStream class loading problem

    I've encountered this a couple times now in dm Server 1 where ObjectInputStream will use the classloader of the bundle who exports the class instead of the caller. Looking at the source code for ObectInputStream I've tracked it down to a native method called latestUserDefinedLoader which seems to be grabbing the wrong classloader. I think a few other people have experienced a similiar issue. This more than likely is an issue with ObjectInputStream rather than with dm Server, but does anyone know a workaround?

    This is also related to "Ehcache Persistence Class Loading Issue".

  • #2
    Originally posted by kierann View Post
    I've encountered this a couple times now in dm Server 1 where ObjectInputStream will use the classloader of the bundle who exports the class instead of the caller. Looking at the source code for ObectInputStream I've tracked it down to a native method called latestUserDefinedLoader which seems to be grabbing the wrong classloader. I think a few other people have experienced a similiar issue. This more than likely is an issue with ObjectInputStream rather than with dm Server, but does anyone know a workaround?

    This is also related to "Ehcache Persistence Class Loading Issue".

    My solution is to create a ValueObject class that contains byte[] field and my cache facade do the serialize/deserialize works with correct class loader before really send data to the cache server.

    Hope that helps.

    Shawn

    Comment

    Working...
    X