NPE in MessageReference.java when restarting with queued messages -----------------------------------------------------------------
Key: JBAS-1603 URL: http://jira.jboss.com/jira/browse/JBAS-1603 Project: JBoss Application Server Type: Bug Components: JMS service Versions: JBossAS-4.0.1 Final, JBossAS-3.2.7 Final, JBossAS-4.0.0 Final, JBossAS-3.2.6 Final, JBossAS-3.2.5 Final, JBossAS-4.0.2RC1, JBossAS-4.0.1RC1, JBossAS-4.0.1 SP1 Reporter: Peter Stout Priority: Critical Using JBoss 3.2.5 with the file-based persistance manager, a JBoss instance cannot be restarted if there are any queued messages. The following is the relevant part of an example stacktrace generated when attempting to restart with queued messages: 2005-02-10 10:54:00,584 ERROR [PersistenceManager] jboss.mq:service=PersistenceManager PersistenceManager - Starting failed jboss.mq:service=PersistenceManager org.jboss.mq.SpyJMSException: Could not rebuild the queue from the queue's tranaction log.; - nested throwable: (java.lang.NullPointerException) at org.jboss.mq.pm.file.MessageLog.throwJMSException(MessageLog.java:275) at org.jboss.mq.pm.file.MessageLog.restore(MessageLog.java:112) at org.jboss.mq.pm.file.PersistenceManager.restoreTransactions(PersistenceManager.java:260) at org.jboss.mq.pm.file.PersistenceManager.startService(PersistenceManager.java:183) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221) ... (Many frames deleted) Caused by: java.lang.NullPointerException at org.jboss.mq.server.MessageReference.init(MessageReference.java:100) at org.jboss.mq.server.MessageCache.addInternal(MessageCache.java:130) at org.jboss.mq.server.MessageCache.add(MessageCache.java:103) at org.jboss.mq.pm.file.MessageLog.restoreMessageFromFile(MessageLog.java:267) at org.jboss.mq.pm.file.MessageLog.restore(MessageLog.java:96) ... 95 more The immediate cause of the problem is that the MessageReference.init method assumes that the queue parameter is always non-null, and the rest of the class assumes that the queue field is always non-null. The MessageCache class, however, sometimes passes in a null value (MessageCache.java, line 103) for the queue parameter. The same code exists in all 3.2.5+ and 4.0.x releases. This code did not exist in 3.2.3. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development