Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stuck sending Message to JMS Queue

 
Debojit Sinha
Ranch Hand
Posts: 66
Java Linux Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20196
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 66
Java Linux Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Pie
Posts: 20196
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should I mark this as "solved", then?
 
Debojit Sinha
Ranch Hand
Posts: 66
Java Linux Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, please. Sorry for wasting everybody's time like this, I'm so embarrassed.
 
Paul Clapham
Sheriff
Pie
Posts: 20196
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic