[jboss-user] [EJB 3.0] - help required for JBOSS 4.0.4 GA and EJB 3.0 RC9

priyavijayan1 do-not-reply at jboss.com
Sun Dec 24 23:56:45 EST 2006


Hi, 

I am having a problem with EJB 3.0 . I am using 
EJB-3.0_RC9-FD 
jboss-4.0.4.GA 
jdk 1.5 
ant 1.6.5 


package com.EJB3.application;

import com.EJB3.application.FacadeRemote;
import javax.naming.InitialContext;
import java.sql.Timestamp;

CODE 

public class client
{
   public static void main(String[] args)
   {
 	try
 	{
 	  InitialContext ctx = new InitialContext();
 	 
 	  ctx.addToEnvironment("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
 	       ctx.addToEnvironment("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
            ctx.addToEnvironment("java.naming.provider.url","jnp://localhost:1099");
      System.out.println("<------"+FacadeRemote.class.getName()+"------->");
     
      FacadeRemote lFacadeRemote = (FacadeRemote) ctx.lookup(FacadeRemote.class.getName());
      
	  lFacadeRemote.createDepartment("Finance");
	  lFacadeRemote.createDepartment("Administration");
	  lFacadeRemote.createDepartment("Sales");

	  lFacadeRemote.assignEmployeeToDepartment(new Long(1),"Brijesh",31,"M");
	  lFacadeRemote.assignEmployeeToDepartment(new Long(1),"xxxx",31,"M");
	  lFacadeRemote.assignEmployeeToDepartment(new Long(2),"yyyy",31,"M");

 	}
 	catch(Exception ex)
 	{
		System.out.println(ex);
	}
   }
}

and the run time exception I am getting is

Buildfile: C:\prototype\EJB3.0\application\build.xml
     [echo] -------------1-----------
run:
     [echo] -------------2-----------
         [java] <------com.EJB3.application.FacadeRemote------->
     [java] javax.naming.NameNotFoundException: com.EJB3.application.FacadeRemote not bound
prepare:
     [echo] C:\jboss-4.0.4.GA
prepare:
     [echo] C:\jboss-4.0.4.GA
compile:
deploy:
BUILD SUCCESSFUL
Total time: 28 seconds

Please help....

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996174#3996174

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996174



More information about the jboss-user mailing list