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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 16483
    
    2

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: 16483
    
    2

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: 16483
    
    2

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Stuck sending Message to JMS Queue
 
Similar Threads
JMS HelloWorld
JMS queue problem
MDB not recieving the message not throwing any exception
JMS client on WAS V6.1
JMS - Message sending exception