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

Deserialization of Timer "info" object from database results in ClassNotFoundException for isolated deployments

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.1.1
    • EAP 5.0.0
    • Other
    • None
    • Release Notes
    • Hide
      In isolated deployments, a ClassNotFoundException was thrown when the application server tried to deserialize an info object associated with the Timer. This occured because the wrong classloader (threadContextClassLoader) was used to deserialize the object. This bug has been fixed and the correct classloader is now used.
      Show
      In isolated deployments, a ClassNotFoundException was thrown when the application server tried to deserialize an info object associated with the Timer. This occured because the wrong classloader (threadContextClassLoader) was used to deserialize the object. This bug has been fixed and the correct classloader is now used.
    • Documented as Resolved Issue

      A ClassNotFoundException is thrown during startup when the app server tries to de-serialize an "info" object associated with the timer at creation time. This occurs when the deployment contains the timer info class file and the deployment is isolated. The timer thread reading the timer information does not access the deployment classloader.

      To reproduce using the attached TimerClassNotFound.zip:

      1.) unzip and cd into TimerClassNotFound
      2.) configure the jboss.home property in build.xml as appropriate
      3.) Start the application server
      4.) run "ant deploy" to build and deploy the ear
      5.) run "ant startTimer" to start the timer
      6.) restart the application server

      During the restart, the ejb2-timer-service will attempt to read persisted timers from the database and will fail with a ClassNotFoundException trying to create example.MessageWrapper. A null value will be stored for the info and used in subsequent timeouts.

      Use "ant stopTimer" to cancel the timer.

      If the deployment is not isolated (comment out line 67 in the build.xml file,) the ClassNotFoundException is not encountered.

              rhn-engineering-cdewolf Carlo de Wolf
              rhn-support-miclark Mike Clark
              Misty Stanley-Jones Misty Stanley-Jones (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: