aspose file tools*
The moose likes Beginning Java and the fly likes Stuck sending Message to JMS Queue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Stuck sending Message to JMS Queue" Watch "Stuck sending Message to JMS Queue" New topic
Author

Stuck sending Message to JMS Queue

Debojit Sinha
Ranch Hand

Joined: Mar 13, 2010
Posts: 66

I wrote the following code to send a text message to JMS Queue:

I got the following error:

I'm using Jdeveloper 11g and Weblogic 10.3.4. Could some one please point out my mistake(s)?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18155
    
    8

Look at line 50: you assign null to the "env" variable. Then in line 52 (where the error occurred) you tried to call a method on that variable. You can't call a method of a null value.

The fix is to assign something other than null to "env" in line 50.
Debojit Sinha
Ranch Hand

Joined: Mar 13, 2010
Posts: 66

Paul Clapham wrote:Look at line 50: you assign null to the "env" variable. Then in line 52 (where the error occurred) you tried to call a method on that variable. You can't call a method of a null value.

The fix is to assign something other than null to "env" in line 50.


Jesus, I deserve to be shot! Thanks a lot man, for pointing out what kind of prize numbskull i am.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18155
    
    8

Should I mark this as "solved", then?
Debojit Sinha
Ranch Hand

Joined: Mar 13, 2010
Posts: 66

Yes, please. Sorry for wasting everybody's time like this, I'm so embarrassed.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18155
    
    8

Sometimes the "second pair of eyes" is helpful. Stick around here and maybe you can provide a similar service to some other unfortunate.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stuck sending Message to JMS Queue
 
Similar Threads
JMS - Message sending exception
JMS queue problem
MDB not recieving the message not throwing any exception
JMS client on WAS V6.1
JMS HelloWorld