You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "james strachan (JIRA)" <ji...@apache.org> on 2006/05/22 12:39:51 UTC

[jira] Resolved: (AMQ-689) Endpoint failed to process message: NullPointerException

     [ https://issues.apache.org/activemq/browse/AMQ-689?page=all ]
     
james strachan resolved AMQ-689:
--------------------------------

    Fix Version: 4.1
     Resolution: Fixed

thanks for spotting this one

> Endpoint failed to process message: NullPointerException
> --------------------------------------------------------
>
>          Key: AMQ-689
>          URL: https://issues.apache.org/activemq/browse/AMQ-689
>      Project: ActiveMQ
>         Type: Bug

>     Versions: 4.0 RC2
>  Environment: Windows XP SP2, Eclipse, Tomcat 5.5.15, Spring 1.2.6, Hibernate 3.1.2, Jencks 1.1.3, ActiveMQ 4.0 RC2 and SNAPSHOT (Apr 6th 2006)
>     Reporter: Rodrigo S. de Castro
>      Fix For: 4.1

>
>
> I have redelivery configured, but when it fails in all attempts (through a RuntimeException), I get the following message:
> 11:00:54,775 DEBUG [ServerSessionImpl:0] Endpoint failed to process message.
> java.lang.NullPointerException
> 	at org.apache.activemq.ra.ServerSessionImpl.afterDelivery(ServerSessionImpl.java:218)
> 	at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:723)
> 	at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> 	at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> 11:00:54,775 INFO  [ServerSessionImpl:0] Endpoint failed to process message. Reason: java.lang.NullPointerException
> 11:00:54,775 DEBUG [ServerSessionImpl:0] run loop end
> 11:00:54,775 DEBUG [ServerSessionImpl:0] Endpoint did not release properly: org.apache.activemq.ra.InvalidMessageEndpointException
> org.apache.activemq.ra.InvalidMessageEndpointException
> 	at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.release(MessageEndpointProxy.java:156)
> 	at org.apache.activemq.ra.MessageEndpointProxy.release(MessageEndpointProxy.java:68)
> 	at org.apache.activemq.ra.ServerSessionImpl.close(ServerSessionImpl.java:250)
> 	at org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(ServerSessionPoolImpl.java:180)
> 	at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:177)
> 	at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> 	at java.lang.Thread.run(Unknown Source)
> 11:00:54,775 DEBUG [ServerSessionImpl:0] Run finished
> 11:00:54,775 DEBUG [ServerSessionImpl:0] Work completed: javax.resource.spi.work.WorkEvent[source=Work :ServerSessionImpl:0]
> 11:00:54,790 DEBUG [ServerSessionPoolImpl] ServerSession requested.
> The code that throws this NPE is ServerSessionImpl, whose excerpt I send below. There are more reports of this 
>             try {
>                 endpoint.afterDelivery();
>             } catch (Throwable e) {
>                 throw new RuntimeException("Endpoint after delivery notification failure", e);
>             } finally {
>                 if( session.getTransactionContext().isInLocalTransaction() ) { <<<<--------------------------- NPE
>                     if( !useRAManagedTx ) {
>                         // Sanitiy Check: If the local transaction has not been commited..
>                         // Commit it now.
>                         log.warn("Local transaction had not been commited.  Commiting now.");
>                     }
>                     try {
>                         session.commit();
>                     } catch (JMSException e) {
>                         log.info("Commit failed:", e);
>                     }
>                 }
>             }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira