473,325 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

JMS: Cannot initialize ConnectionFactory

5
Hi all,

I am learning JMS and so I have downloaded "Java EE SDK 5 Update 2" (available at https://sdlc5a.sun.com/ECom/EComActionServlet;jsessionid=500D73F57050D281F4B6B 5289DA3C254) and installed it on my window machine. From the package, I can use "Sun Java System Application Server" to define the necessary resources used in the JMS example programs. I have followed the instruction to create the resources before I run the example with the following output to confirm that ConnectionFactory, Queue and Topic are successfully created:

C:\temp>asadmin list-jms-resources
jms/Queue
jms/Topic
jms/ConnectionFactory
Command list-jms-resources executed successfully.

C:\temp>


However, I got NullPointerException for when I executed the Producer.java (http://java.sun.com/javaee/5/docs/tutorial/examples/jms/simple/producer/src/java/Producer.java) that the ConnectionFactory cannot be created:

@Resource(mappedName = "jms/ConnectionFactory")
private static ConnectionFactory connectionFactory;
.........................
Connection connection = connectionFactory.createConnection(); // NullPointerException here


Do you think I have sth missing to be defined or created in the "Sun Java System Application Server" or anything else?

Thanks,
Joe
Jun 5 '07 #1
0 1193

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: csafd | last post by:
hi everyone, can anyone help me here, I want to know which communication technology is good for my system(which of course is being implemented as a distributed system). The technologies which I...
1
JMS
by: csafd | last post by:
hi, please help me by providing a comparision of JMS with either CORBA or SOAP. I will be thankful. Any kind of article talking about JMS will be appreciated. thanks. -Omkant
0
by: Helge Nilsen | last post by:
Hi, I have challange related to JMS usage of sockets. A JMS Client connect to a JMS Server over HTTPS through a proxy. My understanding is that a socket is created between the JMS client and...
0
by: Steve | last post by:
I need to introduce a JMS reconnect feature into an existing application. Basically, the application is a simple consumer of messages from a JMS topic. My requirement is to have the application...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.