你的interface NewSessionRemote 没有实现类???

解决方案 »

  1.   

    应该是ejb没有deploy成功,看下jboss的log里面应该有没有错误
      

  2.   

    有实现类,刚才忘了帖:
    @Stateful
    @Remote(NewSessionRemote.class)
    @Local(NewSessionLocal.class)
    public class NewSessionBean implements NewSessionRemote, NewSessionLocal {private Newtable account=null;    public void open(int accountNumber){
            account=manager.find(test.Newtable.class,accountNumber);
            if(account==null){
                account=new Newtable();
                account.setAccountNumber(new Integer(accountNumber));
                account.setAccount(new Integer(0));
                manager.persist(account);
            }
        }    public int getAccount(){
            if(account==null){
                throw new IllegalStateException();
            }
            return account.getAccount();
        }
        
        public void deposit(int amount){
            if(account==null){
                throw new IllegalStateException();
            }
            account.deposit(amount);
        }    public int withdraw(int amount){
            if(account==null){
                throw new IllegalStateException();
            }
            return account.withdraw(amount);
        }
    }
      

  3.   

    应该跟JBOSS的数据库配置文件有错误
      

  4.   

    把@RemoteBinding(jndiBinding="testbinding/NewSessionRemote")从接口类移到实现类
    实现类里加了@Remote(NewSessionRemote.class),接口类中的@Remote也可以去掉
      

  5.   

    这个已经做过了。我已经找到了原因了,原来是导少了jbossall-client.jar和jnp-client.jar。分还是给最后的仁兄吧