Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10773

MarshalledValueInputStream cannot load an array class from specified class loader

    Details

    • Affects:
      Release Notes
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Preload the class in a servlet context listener

      Show
      Preload the class in a servlet context listener
    • Release Notes Text:
      Hide
      An NPE arising from the MarshalledValueInputStream method not being able to to load an array class with WebappClassLoader#loadClass(name) has been corrected in this release of EAP5. **DOCS NOTES** The loadClass() call has been replaced with the Class.forName(name, false, WebappClassLoader) which understands array syntax and the NPE no longer presents.
      Show
      An NPE arising from the MarshalledValueInputStream method not being able to to load an array class with WebappClassLoader#loadClass(name) has been corrected in this release of EAP5. **DOCS NOTES** The loadClass() call has been replaced with the Class.forName(name, false, WebappClassLoader) which understands array syntax and the NPE no longer presents.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Bugzilla Update:
      Perform

      Description

      This is basically same issue as JBCOMMON-25, but happened in unmarshalling of a replicated http session. The class is deployed in a war file, so WebappClassLoader is responsible for loading it. In this case the allowArraySyntax workaround doesn't work.

      In the http session replication scenario, the MarshalledValueInputStream#resolveClass() tries to resolve the array class with WebappClassLoader#loadClass(name) but this call doesn't understand the array syntax form, delegate it to parents, parents don't know about the class and then a ClassNotFoundException raised.

      The loadClass() call should be replaced with the Class.forName(name, false, WebappClassLoader) which understands array syntax.

      This http session unmarshalling problem basically doesn't happen normally. This never happen once the class is loaded (cached in the class loader). So this is basically very rare situation, either 1) unfortunate timing fail-over immediately after boot or 2) active-hotstandby setup.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bmaxwell Brad Maxwell
                  Reporter:
                  tkimura Takayoshi Kimura
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: