Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6820863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:28:34+00:00 2026-05-26T21:28:34+00:00

I want to run the jms tutorial files in eclipse. I have configured glassfish

  • 0

I want to run the jms tutorial files in eclipse. I have configured glassfish properly and added the jms resources. It works ok if I run it in netbeans.

I created an “application client project” in eclipse.

Here is where the resources get injected:

 @Resource(mappedName = "jms/ConnectionFactory")
 private static ConnectionFactory connectionFactory;
 @Resource(mappedName = "jms/Queue")
 private static Queue queue;
 @Resource(mappedName = "jms/Topic")
 private static Topic topic;

Then, when it gets here:

connection = connectionFactory.createConnection();

I get a NullPointerException. For some reason it doesn’t get the resources from the server so they are null.

It works if I build the project in eclipse and then run it from a command line using appclient:

 appclient Producer topic 4

It says here http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jst.j2ee.doc.user%2Ftopics%2Fcjappcliproj.html that:

An application client module is used to contain a full-function client
Java™ application (non Web-based) that connects to and uses the Java
EE resources defined in your server. When you place the client code in
an application client module instead of a simple JAR file, the
application client benefits from the server’s resources (it does not
need to re-specify the class path to Java EE and server JAR files) as
well as from easier JNDI lookup (the client container fills in the
initial context and other parameters).

So it seems that I am on the right track, but maybe I am missing some eclipse configuration.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:28:35+00:00Added an answer on May 26, 2026 at 9:28 pm

    As you’ve already noticed, if you run your Application in standalone mode you will not be able to access servers resources, this is by design. You need to use Glassfish appclient (or similar tools for other application servers) in order to run a Java EE Client App.
    Heres another thread that may help you configure your project to run correctly: eclipse howto start a application client on java ee glassfish appl srv.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to run javascript/Python/Ruby inside my application. I have an application that creates
I have an app(django-compressor) that I only want to run on my local machine
I have a pom with 3 profiles defined. I want: run generate profile always
i want to run a infinite loop in c#. the structure i have is
I have a rather unusual idea. I want to run a single instance of
I want to send object message in jms and getting run time exception. Please
I want to run two different Android apps from Eclipse (in two different types
I want run a script as follows: runner: ssh 'java program &' ssh 'java
Why this code don't work,when i want run this code vwd 2008 express show
I want to run a weekly batch process in an asp.net page. How can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.