You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Bruce Snyder (JIRA)" <ji...@apache.org> on 2007/12/23 17:03:27 UTC

[jira] Commented: (SM-1134) NullpointerException on DeliveryChannel.send()

    [ https://issues.apache.org/activemq/browse/SM-1134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40918 ] 

Bruce Snyder commented on SM-1134:
----------------------------------

The diff in the attached tarball does not contain any of the new files. In order to include the newly created files in the diff, you need to do a [{{svn add}}|http://svnbook.red-bean.com/en/1.0/re01.html] in your local copy to schedule the addition of the new files. Then run {{svn diff}} to create the diff file. This will include the new files in the diff file. 

> NullpointerException on DeliveryChannel.send()
> ----------------------------------------------
>
>                 Key: SM-1134
>                 URL: https://issues.apache.org/activemq/browse/SM-1134
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-bean
>    Affects Versions: 3.2
>         Environment: Mac OSX Tiger
>            Reporter: Ryan Bohn
>            Priority: Blocker
>         Attachments: servicemix-bean-example.zip
>
>
> I'm trying to send a message asynchronously from a sender to a receiver using an InOnly exchange.  When I call DeliveryChannel.send(), I get the following NullPointerException:
> Sending message: Hello?
> java.lang.NullPointerException
>         at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:846)
>         at org.apache.servicemix.bean.BeanEndpoint$PojoChannel.send(BeanEndpoint.java:566)
>         at example.Sender$1.run(Sender.java:40)
>         at java.lang.Thread.run(Thread.java:613)
> When I go to the line of code in the BeanEndpoint, I see the following:
> requests.put(messageExchange.getExchangeId(), currentRequest.get());
> Using my debugger, I noticed the value of currentRequest.get() returns null, which is not allowed in a ConcurrentHashMap (neither null keys nor null values are allowed).  the message exchange id is non-null.
> I also noticed that currentRequest is only set when the component receives an exchange, which is not the case here.
> Both the sender and receiver are using bean endpoints.  I have attached the project to this ticket.  You can deploy the project using maven, with the following command:
> mvn install jbi:projectDeploy

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.