Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Application Server » JBoss  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Jbuilderx+boss3.04问题??
xnlzh035





发贴: 2
积分: 0
于 2005-05-18 21:11 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
package bookstore;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
//import com.wave.bookstore.facade.CustomerSessionFacadeHome;
import java.util.Hashtable;
import javax.rmi.PortableRemoteObject;

public class test {
public static void main(String[] args) throws NamingException {
Hashtable environment = new Hashtable();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
environment.put(Context.PROVIDER_URL, "jnp://localhost:1099");
Context context=new InitialContext(environment);
Object ref = context.lookup("Customer");
//CustomerSessionFacadeHome customerSessionFacadeHome =
//(CustomerSessionFacadeHome) PortableRemoteObject.narrow(ref, CustomerSessionFacadeHome.class);
// System.out.println("开始!!");

}
}
出现如下问题
javax.naming.NameNotFoundException: Customer not bound
  at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
  at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
  at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
  at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
  at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:324)
  at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
  at sun.rmi.transport.Transport$1.run(Transport.java:148)
  at java.security.AccessController.doPrivileged(Native Method)
  at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
  at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
  at java.lang.Thread.run(Thread.java:534)
  at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
  at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
  at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
  at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:445)
  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:429)
  at javax.naming.InitialContext.lookup(InitialContext.java:347)
  at bookstore.test.main(test.java:18)

jboss.xml明明是Customer的jini
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
<jboss>
<enterprise-beans>
<entity>
<ejb-name>Address</ejb-name>
<local-jndi-name>Address</local-jndi-name>
</entity>
<entity>
<ejb-name>Book</ejb-name>
<local-jndi-name>Book</local-jndi-name>
</entity>
<entity>
<ejb-name>Category</ejb-name>
<local-jndi-name>Category</local-jndi-name>
</entity>
<entity>
<ejb-name>Customer</ejb-name>
<local-jndi-name>Customer</local-jndi-name>
</entity>
<entity>
<ejb-name>Orderline</ejb-name>
<local-jndi-name>Orderline</local-jndi-name>
</entity>
<entity>
<ejb-name>Order</ejb-name>
<local-jndi-name>Order</local-jndi-name>
</entity>
<entity>
<ejb-name>Shipping</ejb-name>
<local-jndi-name>Shipping</local-jndi-name>
</entity>
</enterprise-beans>
</jboss>

在jboss服务器的deploy下有的.jar文件且服务器运行状态
请问各位高手,怎么回事??




菜鸟请教,基本程序调试不通,急急急急急急!!!

话题树型展开
人气 标题 作者 字数 发贴时间
9639 Jbuilderx+boss3.04问题?? xnlzh035 3581 2005-05-18 21:11

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923