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

  • SEARCH
  • Home
  • 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 6864381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:54:16+00:00 2026-05-27T02:54:16+00:00

I’m trying to implement an ejb-call by using JNDI-naming. Setup: JBoss-6.1.0.Final ear-deploy: gwt.war ejb.jar

  • 0

I’m trying to implement an ejb-call by using JNDI-naming.

Setup:

  • JBoss-6.1.0.Final
  • ear-deploy:
    • gwt.war
    • ejb.jar

My problem is, although the JNDIView shows me the existing ejb, I’m not able to reach it.

In my RemoteServiceServlet I try to reach the ejb, which is deployed in the ejb.jar inside the same ear-package.

I allready tried several calls, as I wasn’t sure about the correct jndi code.

try 
{
    productLocal = (ProductLocal) context.lookup("ProductHome/local");
} 
catch (NamingException e) 
{
    System.err.println(e.getMessage());
    e.printStackTrace();
}

also tried:

productLocal = (ProductLocal) context.lookup("ProductLocal");
productLocal = (ProductLocal) context.lookup("sung_app_kylintv/ProductHome/local");

The stateless ejb is assigned like this:

@Stateless
@Local(ProductLocal.class)
@Remote(ProductRemote.class)
@LocalBinding(jndiBinding="ProductLocal")
@RemoteBinding(jndiBinding="ProductRemote")
public class ProductHome extends HomeBase<ProductEntity> implements SessionBean, Serializable, ProductLocal

The context initiation:

Properties p = new Properties();
p.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
p.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
p.put("java.naming.provider.url","jnp://localhost:1099");

context = new InitialContext(p);

My JNDIView:

  +- sung_app_kylintv (class: org.jnp.interfaces.NamingContext)
  |   +- CategoryHome (class: org.jnp.interfaces.NamingContext)
  |   |   +- local (class: Proxy for: sung.app.kylintv.ejbclient.product.CategoryLocal)
  |   |   +- local-sung.app.kylintv.ejbclient.product.CategoryLocal (class: Proxy for: sung.app.kylintv.ejbclient.product.CategoryLocal)
  |   |   +- remote-sung.app.kylintv.ejbclient.product.CategoryRemote (class: Proxy for: sung.app.kylintv.ejbclient.product.CategoryRemote)
  |   |   +- remote (class: Proxy for: sung.app.kylintv.ejbclient.product.CategoryRemote)
  |   +- ProductHome (class: org.jnp.interfaces.NamingContext)
  |   |   +- local (class: Proxy for: sung.app.kylintv.ejbclient.product.ProductLocal)
  |   |   +- remote (class: Proxy for: sung.app.kylintv.ejbclient.product.ProductRemote)
  |   |   +- remote-sung.app.kylintv.ejbclient.product.ProductRemote (class: Proxy for: sung.app.kylintv.ejbclient.product.ProductRemote)
  |   |   +- local-sung.app.kylintv.ejbclient.product.ProductLocal (class: Proxy for: sung.app.kylintv.ejbclient.product.ProductLocal)
  |   +- CustomerHome (class: org.jnp.interfaces.NamingContext)
  |   |   +- local-sung.common.behavior.FindAllBehaviour (class: Proxy for: sung.common.behavior.FindAllBehaviour)
  |   |   +- local (class: Proxy for: sung.common.behavior.FindAllBehaviour)
  |   +- Option (class: org.jnp.interfaces.NamingContext)
  |   |   +- local-sung.app.kylintv.ejbclient.product.OptionLocal (class: Proxy for: sung.app.kylintv.ejbclient.product.OptionLocal)
  |   |   +- local (class: Proxy for: sung.app.kylintv.ejbclient.product.OptionLocal)
  |   |   +- remote-sung.app.kylintv.ejbclient.product.OptionRemote (class: Proxy for: sung.app.kylintv.ejbclient.product.OptionRemote)
  |   |   +- remote (class: Proxy for: sung.app.kylintv.ejbclient.product.OptionRemote)
  |   +- DurationHome (class: org.jnp.interfaces.NamingContext)
  |   |   +- local (class: Proxy for: sung.app.kylintv.ejbclient.product.DurationLocal)
  |   |   +- local-sung.app.kylintv.ejbclient.product.DurationLocal (class: Proxy for: sung.app.kylintv.ejbclient.product.DurationLocal)
  |   |   +- remote (class: Proxy for: sung.app.kylintv.ejbclient.product.DurationRemote)
  |   |   +- remote-sung.app.kylintv.ejbclient.product.DurationRemote (class: Proxy for: sung.app.kylintv.ejbclient.product.DurationRemote)
  |   +- VariantHome (class: org.jnp.interfaces.NamingContext)
  |   |   +- local (class: Proxy for: sung.app.kylintv.ejbclient.product.VariantLocal)
  |   |   +- local-sung.app.kylintv.ejbclient.product.VariantLocal (class: Proxy for: sung.app.kylintv.ejbclient.product.VariantLocal)
  |   |   +- remote (class: Proxy for: sung.app.kylintv.ejbclient.product.VariantRemote)
  |   |   +- remote-sung.app.kylintv.ejbclient.product.VariantRemote (class: Proxy for: sung.app.kylintv.ejbclient.product.VariantRemote)
  |   +- VelocityBean (class: org.jnp.interfaces.NamingContext)
  |   |   +- local (class: Proxy for: sung.app.kylintv.ejb.velocity.Velocity)
  |   |   +- local-sung.app.kylintv.ejb.velocity.Velocity (class: Proxy for: sung.app.kylintv.ejb.velocity.Velocity)
  |   +- CustomerAddressHome (class: org.jnp.interfaces.NamingContext)
  |   |   +- local-sung.common.behavior.FindAllBehaviour (class: Proxy for: sung.common.behavior.FindAllBehaviour)
  |   |   +- local (class: Proxy for: sung.common.behavior.FindAllBehaviour)
  |   +- OrderEntityHome (class: org.jnp.interfaces.NamingContext)
  |   |   +- no-interface (class: sung.app.kylintv.ejbclient.order.OrderEntityHome_$$_javassist_50)

Are there any requirements for jndi to work properly in a case like this?

  • 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-27T02:54:17+00:00Added an answer on May 27, 2026 at 2:54 am

    using

    productLocal = (ProductLocal) context.lookup("sung_app_kylintv/ProductHome/local")
    

    returned a slightly different error message:

    2011-11-24 12:37:07,893 INFO  [STDOUT] (http-0.0.0.0-8080-2) productLocal called successfully.
    2011-11-24 12:37:07,893 INFO  [STDOUT] (http-0.0.0.0-8080-2) productLocal calling createTestEntry().
    2011-11-24 12:37:07,950 ERROR [STDERR] (http-0.0.0.0-8080-2) org.jboss.injection.manager.spi.InjectionException: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: sung not bound]
    

    After a colleague of mine took a look the error has been identified: I tried an Injection using @EJB inside of that class ProductHome, that used mappedName=”sung/…”. The mappedName isn’t correct and even not required at all, inside the ejb-project the connections do allready exist and work. Hope, this may help others as well.

    Solution:
    I had to fix my ProductHome by removing the mappedName-Attribute on my ejb-call. After that the class can be instanciated and functions are called.

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

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.