This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.naming. NameNotFoundException : remaining name: env/posturl

Sriram Hari
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my code piece
try {
HashMap theMap=new HashMap();
Object ref=null;
TestHarnessHome harnessHome=null;
Environment env = new Environment();

Context ctx=env.getInitialContext();
Context ctx1 = new InitialContext();
String val = (String)ctx1.lookup("java:comp/env/posturl");
ref = ctx.lookup("TestHarnessEJB");
TestHarness test=harnessHome.create();
theMap.put("Order.Status", "P");

I am trying to lookup two things here

1.EJB JNDI Name which is ctx.lookup("TestHarnessEJB");
2.Environment entry in ejb-jar.xml -ctx1.lookup("java:comp/env/posturl");

First one is a success whereas the second one is a failure with the below exception
javax.naming.NameNotFoundException: remaining name: env/posturl
at weblogic.j2eeclient.SimpleContext.resolve(
at weblogic.j2eeclient.SimpleContext.resolve(
at weblogic.j2eeclient.SimpleContext.lookup(
at weblogic.j2eeclient.SimpleContext.lookup(
at weblogic.j2eeclient.SimpleContext.lookup(
at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.j
at javax.naming.InitialContext.lookup(
at com.synchronoss.util.testharness.ejb.Client.main(

I am testing the deployed ejb from a stand alone java program.

Here is an excerpt from ejb-jar.xml
and the excerpt from weblogic-ejb-jar.xml
I dont understand whats causing the problem.I am trying for the solution for more than 2 days..someone help please
[ July 15, 2008: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma
Posts: 64192
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"hello boys", please check your private messages for an important administrative matter.
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic