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 8867997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:09:48+00:00 2026-06-14T17:09:48+00:00

I want to access EJBs with security.. I am developing an eclipse rcp application

  • 0

I want to access EJBs with security..
I am developing an eclipse rcp application and I want to connect to a glassfish 3.1.1 server that has some EJBs secured and I want to connect to that EJBs using Java EE 6 security

I found something like this:

ProgrammaticLogin pm = new ProgrammaticLogin();
pm.login(usernameText.getText(), passwordText.getText());

Properties props = new Properties();
props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
// optional. Defaults to localhost. Only needed if web server is running on a different host than the appserver
props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
// optional. Defaults to 3700. Only needed if target orb port is not 3700.
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");

try
{
    Context ctx = new InitialContext(props);
}
catch (NamingException e)
{
    e.printStackTrace();
}

I included all jars from glassfish appclient.jar glassfish3/glassfish/bin/package-appclient

Example errors:

SEVERE: SEC9050: Programmatic login failed
com.sun.enterprise.security.auth.login.common.LoginException:  javax.security.auth.login.LoginException: No LoginModules configured for default
at com.sun.enterprise.security.auth.login.LoginContextDriver$9.run(LoginContextDriver.java:889)
...

Do you know how to securely login to EJBs using any method for a desktop application?

My references:

  1. Java EE 6 tutorial – security
  2. Java-Tips: accessing a secure EJB from a client

If you know the answer.. can you, please, provide me examples?

Thank you in advance!

  • 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-06-14T17:09:49+00:00Added an answer on June 14, 2026 at 5:09 pm

    You might try making the pm.login call after context initialization.

    I know this question is old, but I stumbled across it after encountering the same error, and would have appreciated a solution.

    I had code comparable to the following:

    ProgrammaticLogin pm = new ProgrammaticLogin();
    pm.login(username, pass, "file", true);
    container = EJBContainer.createEJBContainer(properties);
    

    Simply re-ordering it as below solved the problem:

    container = EJBContainer.createEJBContainer(properties);
    ProgrammaticLogin pm = new ProgrammaticLogin();
    pm.login(username, pass, "file", true);
    

    The idea being, at least as I understand my case, that the server/my connection to the server hadn’t yet been initialized, and thus was unable to handle the login.

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

Sidebar

Related Questions

I want access to symfony's libraries of my project into some other php files.
I am currently working on a 3-tier application with Java-EE6 (GlassFish 3.1.2, MySQL Server
I have a data access EJB project that has a number of EJB's I
I want to access the call stack at runtime in a Native C++ application.
I want to access my sql server database files in a INTEL SS4000-E storage.
I want to access MySQL through ruby on a shared linux server. I figure
We have a bunch of services (EJBs) that we want to lookup using the
I want to access a keyboard via Bluetooth. For example : Two devices connect
i have bean that contain method [void return] and want access to this bean
I have a Silverlight application using C#, with 2 main functions that I want

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.