Topic: Jbuilderx+boss3.04问题?? |
Print this page |
1.Jbuilderx+boss3.04问题?? | Copy to clipboard |
Posted by: xnlzh035 Posted on: 2005-05-18 21:11 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文件且服务器运行状态 请问各位高手,怎么回事?? |
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 |