[jboss-user] [Beginners Corner] - Re: Problem with minimal server

swedeNewbie do-not-reply at jboss.com
Tue Nov 25 13:47:07 EST 2008


Hi again!

My bean looks like:

  | package tmp;
  | import javax.ejb.Stateless;
  | @Stateless
  | public class CalculatorBean implements CalulatorRemote {
  |    public int add(int a, int b) {
  |       return a + b;
  |    }
  | }
  | 

And the client looks like:

  | All needed stuff
  | Properties props = new Properties();
  | props.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
  |    "org.jboss.naming.NamingContextFactory"=;
  | props.setProperty(Context.PROVIDER_URL, "192.168.0.100:1099");
  | 
  | Context ic = new InitialContext(props);
  | Object o = ic.lookup("CalculatorBean/remote");
  | CalculatorRemote cr = (CalculatorRemote) o;
  | 
  | System.out.println("sum: " + cr.add(2, 4));
  | 

As you can see, I don't use any special services in the sever.

The exception is: 

  | javax.naming.NameNotFoundException: CalculatorBean not bound...
  | 

I start jboss from commandline: run.bat -c minimal -b 0.0.0.0

>From server.log I get: 
anonymous wrote : 
  | 2008-11-25 19:24:33,890 DEBUG [org.jboss.deployers.plugins.main.MainDeployerImpl] (main) Add deployment: vfszip:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/RemoveMe-ejb.jar
  | 2008-11-25 19:24:33,890 DEBUG [org.jboss.deployers.plugins.main.MainDeployerImpl] (main) Scheduling deployment: vfszip:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/RemoveMe-ejb.jar parent=null
  | 2008-11-25 19:24:33,890 DEBUG [org.jboss.deployers.plugins.deployers.DeployersImpl] (main) Deploying vfszip:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/RemoveMe-ejb.jar
  | 2008-11-25 19:24:33,921 DEBUG [org.jboss.deployers.vfs.plugins.classloader.InMemoryClassesDeployer] (main) Dynamic class root for vfszip:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/RemoveMe-ejb.jar is vfsmemory://5c4o02s-z3ugym-fnyvn2da-1-fnyvnla9-7
  | 2008-11-25 19:24:33,921 DEBUG [org.jboss.classloader.spi.base.BaseClassLoader] (main) Created BaseClassLoader at e59e40{vfszip:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/RemoveMe-ejb.jar} with policy VFSClassLoaderPolicy at f8ae79{name=vfszip:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/RemoveMe-ejb.jar domain=null roots=[MemoryContextHandler at 8827766[path=classes context=vfsmemory://5c4o02s-z3ugym-fnyvn2da-1-fnyvnla9-7 real=vfsmemory://5c4o02s-z3ugym-fnyvn2da-1-fnyvnla9-7/classes], DelegatingHandler at 24134853[path=RemoveMe-ejb.jar context=file:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/ real=vfszip:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/RemoveMe-ejb.jar]]  delegates=null exported=[tmp, META-INF] <IMPORT-ALL>NON_EMPTY}
  | 2008-11-25 19:24:33,921 DEBUG [org.jboss.classloader.spi.base.BaseClassLoaderDomain] (main) ClassLoaderDomain at 970c0e{} registerClassLoader BaseClassLoader at e59e40{vfszip:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/RemoveMe-ejb.jar}
  | 2008-11-25 19:24:33,921 DEBUG [org.jboss.deployers.plugins.deployers.DeployersImpl] (main) Fully Deployed vfszip:/C:/jboss/jboss-5.0.0.CR1/server/minimal/deploy/RemoveMe-ejb.jar
  | 2008-11-25 19:24:33,921 DEBUG [org.jboss.bootstrap.microcontainer.ServerImpl] (main) Installing life thread Thread[JBossLifeThread,5,jboss]
  | 2008-11-25 19:24:33,937 INFO  [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.0.0.CR1 (build: SVNTag=JBoss_5_0_0_CR1 date=200806301254)] Started in 25s:172ms
  | 

Is there an obvious reason why this does not work? What do I miss?



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

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



More information about the jboss-user mailing list