A rmiregistry problem!

i type rmiregistry &
but return a error...
Invalid JAVA_HOME: .;d:\JBuilerX\jdk1.4;d:\JBuilderx\jdk1.4\jre\lib
i don't know why ,look forward to answering

But i have set my JAVA_HOME=d:\JBuilerX\jdk1.4,the problem is persist...
i try another way:
i run rmiregisty & at jre/lib directory,it can work,but when i back to my package and
execute java RemoteBAnkServer,it return a error:
java.rmi.ServerException: RemoteException occurred in server thread; nested exce
ption is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: graduatedesign.RemoteBankServer_Stub
but i have use rmic generate the RemoteBankServer_Stub.class file....
hope for help!

Similar Messages

  • Problem about rmic and rmiregistry

    I am new to java!
    My OS is Win2000 and the java compiler I installed is Sun One Studio 4 CE. The teaching book I used is teh JAVA2 unleash.
    I try to copy some example in the book and run it! The problem I have the book didn't quite tell me how to compile it!
    The chapter is about the RMI and the step describe in the book are followed:
    1) Move to the directory containing all your classes and compile them. (Which I did)
    2) Move to the root directory
    c:\>rmic unleashed.ch2.GreeterImpl (problem)
    3) Open one command window and type
    c:\> rmiregistry (problem)
    4) Open another command window and type
    c:\> java unleashed.ch2.GreeterServer
    5) open the thrid window and type
    c:\> java unleashed.ch2.GreetingClient
    Problem part:
    I try to follow the step and open a DOS Prompt and type step two and three!! It seems that the window don't understand the command rmic and rmiregistry! What should I do??
    Thank you very much for helping! Thanks!!
    Ferdinand

    you need to add the java bin directory to your 'path' system environment variable

  • Problem with Rmiregistry

    this is simple rmi program and its related execution procedure and exceptions
    please help me out of this situation..
    i have jdk 1.4 version
    import java.rmi.*;
    public interface Inter extends Remote
    public String say() throws RemoteException;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.io.*;
    public class InterI extends UnicastRemoteObject
    implements Inter,Serializable
    public InterI() throws RemoteException
    super();
    public String say() throws RemoteException
    return " Hello World ";
    import java.rmi.*;
    import java.rmi.server.*;
    public class Server
    public static void main(String args[]) throws Exception
    Inter obj=(Inter)new InterI();
    System.out.println("Registering ... ");
    Naming.rebind("/First",obj);
    System.out.println("Registered .");
    import java.rmi.*;
    import java.rmi.server.*;
    public class Client
    public static void main(String args[]) throws Exception
    Inter obj=(Inter)Naming.lookup("/First");
    System.out.println(obj.say());
    C:\First>edit InterI.java
    C:\First>javac *.java
    C:\First>rmic InterI
    C:\First>java Server
    Registering ...
    Exception in thread "main" java.rmi.ServerException: RemoteException occurred in
    server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.lang.ClassNotFoundException: InterI_Stub
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:352
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
    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:4
    60)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
    .java:701)
    at java.lang.Thread.run(Thread.java:536)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
    RemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
    223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Naming.java:159)
    at Server.main(Server.java:10)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested ex
    ception is:
    java.lang.ClassNotFoundException: InterI_Stub
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
    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:4
    60)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
    .java:701)
    at java.lang.Thread.run(Thread.java:536)
    Caused by: java.lang.ClassNotFoundException: InterI_Stub
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:207)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:427)
    at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:161)
    at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:629)
    at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
    at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.jav
    a:200)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:150
    3)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1425)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
    616)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1264)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    ... 9 more
    C:\First>

    In you Server class you do the following:
    Inter obj=(Inter)new InterI();
    System.out.println("Registering ... ");
    Naming.rebind("/First",obj);
    In you Client class you do the following:
    Inter obj=(Inter)Naming.lookup("/First");
    System.out.println(obj.say());
    I believe you have invalid URLS in the Naming.rebind() and the Naming.lookup().
    Try this:
    Server
    Naming.rebind("/'/127.0.0.1/First",obj);
    Client
    Naming.lookup("/'/127.0.0.1/First");
    NOTE: use "localhost" or your IP number on the network. Also I escaped the "/". How you build this string is up to you.
    In your Server example, you are basically stating, I want to bind the String("First") to the method "say()" in the rmiregistry on a particular machine.
    In your Client example, you are basically stating, I want to lookup(in the rmiregisry on a particular machine) a String called "First" that should have a method(object reference) called "say()" bound to it. If you find it, then pass that object reference to me across the network, so that I can use the "say()" method on that machine.
    In your example, you didn't use a valid URL, You stated that you wanted to bind and lookup the String "First", but you didn't specify the machine that you wanted to operate on.
    This might not be problem, but check your CLASSPATH and see if it has the current directory in it.
    echo %CLASSPATH% (should contain ".") at DOS prompt
    echo $CLASSPATH ((should contain ".") at Unix variant prompt
    Hope this helps

  • Problem to contact rmiregistry

    Hi,
    I'v some problems with RMI. I've a project and i'd like to test it in the real environnement where i want to deploy. The RMI serveur must be run on a Linux (Debian), and my machine has 4 network interface cards.
    I run the registry, and next, i run my code and, the run is very very long...
    Like if the rmiregister was not available...
    After 1 minute (approximatively), i've the following message:
    (suite of the message after the exception...)
    Connection refused to host: ; nested exception is:
    java.net.ConnectException: Connection timed out
    java.rmi.ConnectException: Connection refused to host: ; nested exception is:
    java.net.ConnectException: Connection timed out
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Naming.java:160)
    at ControleurMesuresLocalImpl.main(ControleurMesuresLocalImpl.java:101)
    Caused by: java.net.ConnectException: Connection timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:434)
    at java.net.Socket.connect(Socket.java:384)
    at java.net.Socket.<init>(Socket.java:291)
    at java.net.Socket.<init>(Socket.java:119)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
    ... 6 more
    I don't know what is the problem. If i test on my desktop PC, it's work fine !
    HELP ME PLEASE !!!!!!!!!!!!!!!!
    Best regards
    Romain ROCHAT

    It looks like your problem is network related. I would try to narrow it down. If the registry is on the same machine as the crashing code then try to connect using localhost and/or ip address rather than machine name. also make sure no proxies are involved (I'm guessing they aren't from what you described). If the registry is on its own machine make sure all machines involved can see each other. I would try ping from the command line or something. If there are only two machines with the registry and RMI servers co-located then again make sure the client machine can find the server over the network using ping or some other simple test. In all cases make sure there are no proxies and firewalls involved and then slowly introduce proxies and firewalls into your tests as they would be present in the real deploy scenario. Do this only after you have verified eveything works without them.

  • Problem to send a message with JMS

    Hi
    I'm doing some tests with the api JMS to know how works. I have got some problems. I have been looking for some information but i don't find so much. I have got too doubts.
    I am usinng Netbeans 5.5 with Sun Java System Application Server Platform Edition 9.0_01 (build b14).
    I am trying to do it with ejb. Because in the future the application can have got so many connection in the same time.
    The server shows me the next errors.
    Starting Sun Java System Application Server Platform Edition 9.0_01 (build b14) ...
    CORE5098: AS Socket Service Initialization has been completed.
    CORE5076: Using [Java HotSpot(TM) Client VM, Version 1.6.0_03] from [Sun Microsystems Inc.]
    SEC1002: Security Manager is OFF.
    ADM0001:MBeanServer initialized successfully
    SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
    sgmt.service_initialized
    DPL5400:Exception occurred : error in opening zip file.
    ADM1079: Initialization of AMX MBeans successful
    ADM1504: Here is the JMXServiceURL for the Standard JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://t1:8686/jmxrmi].  This is where the remote administrative clients should connect using the standard JMX connectors
    ADM1506: Status of Standard JMX Connector: Active = [true]
    JTS5014: Recoverable JTS instance, serverId = [3700]
    About to load the system app: MEjbApp
    LDR5010: All ejb(s) of [MEjbApp] loaded successfully!
    About to load the system app: __ejb_container_timer_app
    EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]
    LDR5010: All ejb(s) of [__ejb_container_timer_app] loaded successfully!
    NAM0008 : Invalid Destination: jndi/Topic for java:comp/env/jms/Topic
    EJB5090: Exception in creating EJB container [javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]]
    appId=Chat-ejb moduleName=Chat-ejb ejbName=publicarBean
    LDR5004: UnExpected error occured while creating ejb container
    javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:485)
            at com.sun.ejb.containers.BaseContainer.setupEnvironment(BaseContainer.java:2628)
            at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:629)
            at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:163)
            at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:515)
            at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:490)
            at com.sun.enterprise.server.EJBModuleLoader.load(EJBModuleLoader.java:158)
            at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:206)
            at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:198)
            at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:326)
            at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:112)
            at com.sun.enterprise.server.PEMain.run(PEMain.java:326)
            at com.sun.enterprise.server.PEMain.main(PEMain.java:260)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
    Caused by: javax.naming.NameNotFoundException
            at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:255)
            at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:178)
            at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
            at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:98)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:309)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:469)
            ... 17 more
    CORE5021: Application NOT loaded: [Chat-ejb]
    WEB0302: Starting Sun-Java-System/Application-Server.
    WEB0100: Loading web module [__default-admingui] in virtual server [__asadmin] at [/]
    WEB0100: Loading web module [adminapp] in virtual server [__asadmin] at [/web1]
    WEB0100: Loading web module [admingui] in virtual server [__asadmin] at [/asadmin]
    WEB0100: Loading web module [amserver] in virtual server [server] at [/amserver]
    Initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context ''
    Completed initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context ''
    Initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context '/asadmin'
    Completed initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context '/asadmin'
    WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8080
    WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 8181
    WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 4848
    About to load the system app: __JWSappclients
    WEB0100: Loading web module [__JWSappclients:sys.war] in virtual server [server] at [/__JWSappclients]
    Using MQ RA for Broker lifecycle control
    JMS Service Connection URL is :mq://t1:7676/
    MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting...
    EB-start:brokerProps={imq.instancename=imqbroker, imq.jmx.rmiregistry.port=8686, BrokerArgs=-port 7676 -name imqbroker -imqhome D:\Sun\AppServer\imq\bin\.. -varhome D:/sun/AppServer/domains/domain1\imq -useRmiRegistry -rmiRegistryPort 8686, imq.jmx.rmiregistry.use=true, imq.portmapper.port=7676}
    [07/nov/2007:18:35:03 CET]
    ================================================================================
    Sun Java(tm) System Message Queue 4.0
    Sun Microsystems, Inc.
    Version:  4.0  (Build 27-a)
    Compile:  Thu 03/02/2006
    Copyright (c) 2006 Sun Microsystems, Inc.  All rights reserved.
    SUN PROPRIETARY/CONFIDENTIAL.  Use is subject to license terms.
    This product includes code licensed from RSA Data Security.
    ================================================================================
    Java Runtime: 1.6.0_03 Sun Microsystems Inc. D:\sun\Java\jdk1.6.0_03\jre
    [07/nov/2007:18:35:03 CET]    IMQ_HOME=D:\sun\AppServer\imq
    [07/nov/2007:18:35:03 CET] IMQ_VARHOME=D:\sun\AppServer\domains\domain1\imq
    [07/nov/2007:18:35:03 CET] Windows XP 5.1 x86 t1 (1 cpu) pepepc
    [07/nov/2007:18:35:03 CET] Java Heap Size: max=506816k, current=46944k
    [07/nov/2007:18:35:03 CET] Arguments: -port 7676 -name imqbroker -imqhome D:\Sun\AppServer\imq\bin\.. -varhome D:/sun/AppServer/domains/domain1\imq -useRmiRegistry -rmiRegistryPort 8686
    [07/nov/2007:18:35:04 CET] [B1060]: Loading persistent data...
    [07/nov/2007:18:35:04 CET] Using built-in file-based persistent store: D:\sun\AppServer\domains\domain1\imq\instances\imqbroker\
    [07/nov/2007:18:35:04 CET] [B1189]: Cluster Service feature is not available
    [07/nov/2007:18:35:04 CET] [B1039]: Broker "imqbroker@t1:7676" ready.
    MQJMSRA_EB1101: run:EMBEDDED broker started with code =0
    MQJMSRA_RA1101: SJSMQ JMS ResourceAdaapter configuration=
            raUID                               =null
            brokerType                          =EMBEDDED
            brokerInstanceName                  =imqbroker
            brokerBindAddress                   =null
            brokerPort                          =7676
            brokerHomeDir                       =D:\Sun\AppServer\imq\bin\..
            brokerVarDir                        =D:/sun/AppServer/domains/domain1\imq
            brokerJavaDir                       =D:/sun/Java/jdk1.6.0_03
            brokerArgs                          =null
            brokerStartTimeout                  =60000
            adminUsername                       =admin
            adminPassFile                       =E:\tempWin\asmq21980.tmp
            useJNDIRmiServiceURL                =true
            rmiRegistryPort                     =8686
            startRmiRegistry                    =false
            useSSLJMXConnector                  =true
            brokerEnableHA                      =false
            clusterId                           =null
            brokerId                            =null
            jmxServiceURL                       =null
            dbType                              =null
            dbProps                             ={}
            dsProps                             ={}
            ConnectionURL                       =
            UserName                            =guest
            ReconnectEnabled                    =true
            ReconnectInterval                   =5000
            ReconnectAttempts                   =3
            AddressListBehavior                 =RANDOM
            AddressListIterations               =3
            InAppClientContainer                =false
            InClusteredContainer                =false
            GroupName                           =null
    MQJMSRA_RA1101: start:SJSMQ JMSRA Connection Factory Config={imqOverrideJMSPriority=false, imqConsumerFlowLimit=1000, imqOverrideJMSExpiration=false, imqAddressListIterations=3, imqLoadMaxToServerSession=true, imqConnectionType=TCP, imqPingInterval=30, imqSetJMSXUserID=false, imqConfiguredClientID=, imqSSLProviderClassname=com.sun.net.ssl.internal.ssl.Provider, imqJMSDeliveryMode=PERSISTENT, imqConnectionFlowLimit=1000, imqConnectionURL=http://localhost/imq/tunnel, imqBrokerServiceName=, imqJMSPriority=4, imqBrokerHostName=localhost, imqJMSExpiration=0, imqAckOnProduce=, imqEnableSharedClientID=false, imqAckTimeout=0, imqAckOnAcknowledge=, imqConsumerFlowThreshold=50, imqDefaultPassword=guest, imqQueueBrowserMaxMessagesPerRetrieve=1000, imqDefaultUsername=guest, imqReconnectEnabled=false, imqConnectionFlowCount=100, imqAddressListBehavior=PRIORITY, imqReconnectAttempts=3, imqSetJMSXAppID=false, imqConnectionHandler=com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler, imqSetJMSXRcvTimestamp=false, imqBrokerServicePort=0, imqDisableSetClientID=false, imqSetJMSXConsumerTXID=false, imqOverrideJMSDeliveryMode=false, imqBrokerHostPort=7676, imqQueueBrowserRetrieveTimeout=60000, imqSetJMSXProducerTXID=false, imqSSLIsHostTrusted=false, imqConnectionFlowLimitEnabled=false, imqReconnectInterval=5000, imqAddressList=localhost:7676, imqOverrideJMSHeadersToTemporaryDestinations=false}
    MQJMSRA_RA1101: SJSMQ JMSRA Started
    endpoint.determine.destinationtype
    NAM0008 : Invalid Destination: jndi/Topic for java:comp/env/jms/Topic
    EJB5090: Exception in creating EJB container [javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]]
    appId=Chat moduleName=Chat-ejb_jar ejbName=publicarBean
    LDR5004: UnExpected error occured while creating ejb container
    javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:485)
            at com.sun.ejb.containers.BaseContainer.setupEnvironment(BaseContainer.java:2628)
            at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:629)
            at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:163)
            at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:515)
            at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:490)
            at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:184)
            at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:113)
            at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:206)
            at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:204)
            at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:326)
            at com.sun.enterprise.server.ondemand.OnDemandServer.onStartup(OnDemandServer.java:112)
            at com.sun.enterprise.server.PEMain.run(PEMain.java:326)
            at com.sun.enterprise.server.PEMain.main(PEMain.java:260)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
    Caused by: javax.naming.NameNotFoundException
            at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:255)
            at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:178)
            at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
            at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:98)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:309)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:469)
            ... 18 more
    Registering ad hoc servlet: WebPathPath: context root = "/Chat", path = "/Chat-app-client'
    Java Web Start services started for application com.sun.enterprise.appclient.jws.ApplicationContentOrigin@aabc2d registration name=Chat
        [email protected]56b4 registration name=Chat, context root=/Chat/Chat-app-client, module name=
    , parent=Chat
    CORE5021: Application NOT loaded: [Chat]
    SMGT0007: Self Management Rules service is enabled
    Application server startup complete.
    JBISE6013: JavaEEServiceEngine : Java EE Service Engine started successfully.
    CORE5024: EJB module [Chat-ejb] unloaded successfully!
    DeployedItemRef postDeregistration failed. Load Balancer Monitoring MBeans might be lying around if this application is being load balanced
    BPEL service engine started
    ADM1064:The upload file at [E:\tempWin\s1astempdomain1server-162970426\Chat-ejb.jar] exists and will be overwritten.
    ADM1006:Uploading the file to:[E:\tempWin\s1astempdomain1server-162970426\Chat-ejb.jar]
    deployed with moduleid = Chat-ejb
    ADM1041:Sent the event to instance:[ModuleDeployEvent -- enable ejb/Chat-ejb]
    endpoint.determine.destinationtype
    NAM0008 : Invalid Destination: jndi/Topic for java:comp/env/jms/Topic
    EJB5090: Exception in creating EJB container [javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]]
    appId=Chat-ejb moduleName=D__sun_AppServer_domains_domain1_applications_j2ee-modules_Chat-ejb ejbName=publicarBean
    LDR5004: UnExpected error occured while creating ejb container
    javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:485)
            at com.sun.ejb.containers.BaseContainer.setupEnvironment(BaseContainer.java:2628)
            at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:629)
            at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:163)
            at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:515)
            at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:490)
            at com.sun.enterprise.server.EJBModuleLoader.load(EJBModuleLoader.java:158)
            at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:219)
            at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:174)
            at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:406)
            at com.sun.enterprise.server.StandAloneEJBModulesManager.moduleEnabled(StandAloneEJBModulesManager.java:500)
            at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:960)
            at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:941)
            at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:448)
            at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
            at com.sun.enterprise.admin.server.core.AdminNotificationHelper.sendNotification(AdminNotificationHelper.java:128)
            at com.sun.enterprise.admin.server.core.ConfigInterceptor.postInvoke(ConfigInterceptor.java:109)
            at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:97)
            at $Proxy1.invoke(Unknown Source)
            at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
            at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:56)
            at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:142)
            at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:109)
            at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:180)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
            at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
            at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
            at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: javax.naming.NameNotFoundException
            at com.sun.enterprise.naming.TransientContext.resolveContext(TransientContext.java:255)
            at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:178)
            at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
            at com.sun.enterprise.naming.LocalSerialContextProviderImpl.lookup(LocalSerialContextProviderImpl.java:98)
            at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:309)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java:469)
            ... 54 more
    CORE5020: Error while loading ejb module
    {code}
    I know it is very large. I think the error it is in this line.
    {code}
    NAM0008 : Invalid Destination: jndi/Topic for java:comp/env/jms/Topic
    EJB5090: Exception in creating EJB container [javax.naming.NamingException [Root exception is javax.naming.NameNotFoundException]]
    {code}
    also I am going to put the code.
    file PublicarBean.java
    {code}
    package org.pepes;
    import com.sun.tools.ws.processor.model.java.JavaArrayType;
    import javax.annotation.Resource;
    import javax.ejb.SessionContext;
    import javax.ejb.Stateless;
    import javax.jms.ConnectionFactory;
    import javax.jms.QueueConnectionFactory;
    import javax.jms.Topic;
    import javax.naming.NamingException;
    * @author pepes
    @Stateless(mappedName="ejb/publicar")
    public class publicarBean implements org.pepes.publicarRemote {
        /** Creates a new instance of publicarBean */
        @Resource(name="jms/QueueConnectionFactory")
        private QueueConnectionFactory connectionFactory;
        @Resource(name="jms/Topic", mappedName="jndi/Topic")
        private Topic topic;
        private javax.naming.InitialContext ctx;
        public publicarBean() {
        public void creaMensaje() throws javax.naming.NamingException , javax.jms.JMSException {
            try {       
                javax.naming.InitialContext ctx = new javax.naming.InitialContext();
                this.connectionFactory = (javax.jms.QueueConnectionFactory)ctx.lookup("jms/QueueConnectionFactory");
                this.topic = (javax.jms.Topic)ctx.lookup("jms/Topic");
                javax.jms.Connection connection = this.connectionFactory.createConnection();
                javax.jms.TopicSession ts = (javax.jms.TopicSession)connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
                javax.jms.TopicPublisher tp = ts.createPublisher(this.topic);
                javax.jms.TextMessage msg = ts.createTextMessage();
                for (int i = 0; i<3;i++) {
                    msg.setText("Prueba: " + i);
                    tp.publish(msg);
            catch (javax.jms.JMSException jmex) {
                throw jmex;
    {code}
    the file publicarRemote.java
    {code}
    package org.pepes;
    import javax.ejb.Remote;
    * This is the business interface for publicar enterprise bean.
    @Remote
    public interface publicarRemote {
         public void creaMensaje() throws javax.naming.NamingException , javax.jms.JMSException;
    {code}
    file mensaje.java
    {code}
    package org.pepes;
    import javax.annotation.Resource;
    import javax.ejb.ActivationConfigProperty;
    import javax.ejb.MessageDriven;
    import javax.ejb.MessageDrivenContext;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    * Entity class Mensaje
    * @author pepes
    @MessageDriven(mappedName = "jms/Mensaje", activationConfig =  {
            @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
            @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    public class Mensaje implements MessageListener {
        /** Creates a new instance of Mensaje */
        @Resource
        private MessageDrivenContext mdc;
        public Mensaje() {
        public void onMessage(Message message) {
            javax.jms.TextMessage msg = null;
            try {
                if (message instanceof javax.jms.TextMessage) {
                    msg = (javax.jms.TextMessage) message;
                    System.out.println(msg.getText());
                } else {
                    System.out.println("Message of wrong type: "
                            + message.getClass().getName());
            } catch (javax.jms.JMSException e) {
                e.printStackTrace();
                mdc.setRollbackOnly();
            } catch (Throwable te) {
                te.printStackTrace();
    {code}
    the file prueba.jsp
    {code}
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
        <h1>JSP Page</h1>
        <%--
        This example uses JSTL, uncomment the taglib directive above.
        To test, display the page like this: index.jsp?sayHello=true&name=Murphy
        --%>
        <%--
        <c:if test="${param.sayHello}">
            <!-- Let's welcome the user ${param.name} -->
            Hello ${param.name}!
        </c:if>
        --%>
        <%    
            try {
            javax.naming.InitialContext ctx = new javax.naming.InitialContext();
            org.pepes.publicarRemote publisher = (org.pepes.publicarRemote)ctx.lookup("ejb/publicar");
            if (publisher==null) {
                System.out.println("INFO: Es null");
            else {
                System.out.println("INFO: No es null");
            publisher.creaMensaje();
            } catch (javax.naming.NamingException ex) {
                System.out.println("ERROR naming: " + ex.getMessage());
            catch (javax.jms.JMSException jmex) {
                System.out.println("ERROR jms: " + jmex.getMessage());
            catch (java.lang.NullPointerException nullex) {
                System.out.println("ERROR null: " + nullex.getMessage());
    %>
        </body>
    </html>
    {code}
    I think the problem is because i don't put destination address. if it is so, the true where do I put this address?. if not where is the problem?
    I hope your help.
    Thanks you  in advanced.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Hi,
    Did you create your destinations in your application server? It seems that the destinations such as topics and queues are not created. First you should create them and then start using them.
    For example, in here, it says that jndi/Topic is not valid. To check if the destinations are valid or not; you can do it either through the graphical user interface or the command line console.

  • Rmiregistry crashing Java HotSpot VM on SGI machine

    Hello!
    I have created an application that uses RMI in Java to pass messages between one server and several clients. That is, the clients talk only to the server and not with each other. I've recently been tasked by my company to make this program work an an 8-processor 64-bit machine.
    I originally thought that it must have been something wrong with the code, seeing as how it was created on a Windows 32-bit machine, and now I'm trying to run it a Unix 64-bit machine. In fact our technology expert suggested that it may be ENDIAN issues... However, I've just about tracked down the problems I'm having to the rmiregistry.
    I think it is causing these random HotSpot VM crashes I've been having. The biggest reason I suspect this is because upon typing
    rmiregistry&
    in the console window, I have been able to get one of those crashes. This is before I have any code running, and yes, my path variables are set correctly and also my policy file is set to the correct path.
    Does anyone have any ideas? Thanks!

    At very first moment, I haven't used jdk from arch repo,
    so i was downloaded it from java.sun.com.
    and haven't any problem  jdk1.5.0 or 1.6  with Eclipse, though i didn't tried Azureus.
    PS: so my jdk-1.6.0 is under home directory.
    > pwd
    /home/<user_account>/jdk1.6.0
    >

  • I have been on the same problem for 2 days now.... it has become URGENT

    ==================
    CLIENT SIDE
    ==================
    try
    srvIntrface = (MyServerInterface) Naming.lookup("rmi://"+server+":1099/Interface");
    }catch(Exception e){System.out.println("clientForm, lookup: Error getting the remote service");}
    byte[] fileData = srvIntrface.getFile();
    This is how i connect to the interface on the client side... AND then get the file
    server variable - is the ip of the remote machine
    ==================
    SERVER SIDE
    ==================
    MyServer mySrvr = new MyServer();
    Naming.rebind("//localhost:1099/Interface",mySrvr);
    this is how i bind the interface to the server
    ================
    PROBLEM
    ================
    i am working on a LAN.... when i run the above codes on one of the machines e.g. machine1.... the machine1 works fine and can get the file from machine 2. but when i run it on machine 2 and try to get the file from machine 1 following exception occurs
    Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect
    Please help

    Thank you for your responses....
    i do run the registry on both machines...
    as such
    "start rmiregistry 1099"
    plus i system.out the variable "server" with your suggestion.... it gives out the correct ip of the machines to be looked up!
    e.g.
    if i want to connect to 192.168.1.2.... the server variable is gives out the correct ip...
    i have been trying to solve this problem for a very long time... but can't seem to find a way around it...
    this is how i run my server and client
    java -Djava.rmi.server.codebase=file:/C:j2sdk1.4.2_04\bin/ -Djava.rmi.server.hostname=localhost
    -Djava.security.policy=java.policy MyServer
    java -Djava.rmi.server.codebase=file:/C:j2sdk1.4.2_04\bin/ -Djava.security.policy=java.policy MyClient
    my policy file is: just wanted to be very relaxed
    grant {
    permission java.net.SocketPermission "*:*","connect,accept,resolve";
    permission java.net.SocketPermission.AllPermission;
    permission java.security.AllPermission;
    permission java.io.FilePermission "c:\\j2sdk1.4.2_04/bin\\-","read,write,delete";
    Plz help

  • Please help with an RMI problem

    Hi,
    This is probably a really simple problem which i can't spot, but i have the folloing 'HelloWorld' RMI program:
    The Client Program:
    import java.rmi.*;
    public class HelloClient {
         public static void main(String args[]) {
              if(System.getSecurityManager() == null) {
                   System.setSecurityManager(new RMISecurityManager());
              try {
                   HelloInterface obj = (HelloInterface)Naming.lookup("/HelloServer");
                   String message = obj.sayHello();
                   System.out.println(message);
                   Thread.sleep(10000);
              } catch (Exception e) {
                   System.out.println("HelloClient exception: " + e);
    }The Remote Interface:
    public interface HelloInterface extends java.rmi.Remote {
         public String sayHello() throws java.rmi.RemoteException;
    }The Server Program:
    import java.io.*;
    import java.rmi.*;
    import java.rmi.server.*;
    import java.util.Date;
    public class HelloServer extends UnicastRemoteObject implements HelloInterface {
         public HelloServer() throws RemoteException {
              super();
         public String sayHello() throws RemoteException {
              return "Hello World, the current system time is " + new Date();
    }And finally the class which binds the object to the registery:
    import java.rmi.*;
    public class RegisterIt {
         public static void main(String args[]) {
              try {
                   HelloServer obj = new HelloServer();
                   System.out.println("Object instantiated: " + obj);
                   Naming.rebind("/HelloServer", obj);
                   System.out.println("HelloServer bound to registery");
              } catch (Exception e) {
                   System.out.println(e);
    }Now, this program works fine on my computer at home(XP!!!!!) but when i try to run it on the computers in college which run NT, it comes up with the following exceptions when i try to run RegisterIt:
    Java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    Java.lang.ClassNotFoundException: HelloServer_StubThis is saying that it cannot find the stub which is generated, but i use the folloing .bat file to load up the program:
    echo Creating remote object skelton classes....
    rmic -d . HelloServer
    start rmiregistry -J-Djava.security.policy=test.policy
    start java RegisterIt
    start java -Djava.security.policy=test.policy HelloClientThe stub is definitely created(it worked at home and i have checked in the directory and there are clearly the files HelloServer_Stub.class and HelloServer_Skel.class). The PATH is set correctly otherwise the registery would not be able to run correctly etc and therefore i am completely stuck as to why it doesn't work.
    Please help as it is very important for me.
    Many Thanks
    Cath

    I did not have any problem with Windows 2000 at all but only with Windows XP (and to think XP is a 2000 hybrid!).
    I have the same error: a ClassNotFoundException on the stub file.
    Any help will be appreciated. Thanks.

  • Error with "rmiregistry" in command prompt

    Hello everybody.
    I am experiencing something really strange. I am doing the exercices on http://java.sun.com/developer/onlineTraining/rmi/RMI.html#RMIArchitectureGoals and now am trying the second one.
    When I type in "rmiregistry" in command prompt at location "C:\" it's works fine. However, when I type it in "C:\JProg\RMI" (and for another program a subdirectory) where my classes reside, command goes all funny. It keeps printing the command-line without any results.
    I tried to use it anyway but then I get a "Connection refused to host: localhost" error, so it really doesn't work.
    I also tried the all the above ten times at least.... it is consistent.
    Does anybody have any idea what the hell command is on about ?
    Thanks,
    Q

    "rmiregistry" in command prompt is just registering
    into the registry. No output or response will be
    resulted. The next line cursor will be appeared. That
    all. If any error has, you should check the class
    again I mean related coding.I do not understand what the classes have to do with the rmiregistry command. When I create an empty directory it works, that is: it gives a blinking _ and I can succesfully start a server class. How can this problem (which occurs before calling any classes) have anything to do with the classfiles ? It is only in my RMI (and sub-) directory that the rmiregistry goes all wacky.

  • How to change the classpath in rmiregistry

    I am storing remote object stubs in an RMI registry as part of my application. When I try to bind my objects to the rmiregistry started by the kxs process on port 1099, I get class def not found errors because that rmiregistry does not have my classes in the classpath. My classes are in the iAS classpath because I added them through the registry.
    When I start my own rmiregistry on a different port and set the classpath environment variable to include my classes, then I have no problems.
    Does anyone know how to change the classpath for the rmiregistry started by the kxs process?
    I am running iAS sp3 on Windows 2000 adn Solaris
    Thanks,
    Mark

    Hi,
    I would like to help, but could you kindly clarify what rmiregistry
    means ?
    Regards
    Raj
    Mark Priest wrote:
    I am storing remote object stubs in an RMI registry as part of my
    application. When I try to bind my objects to the rmiregistry started
    by the kxs process on port 1099, I get class def not found errors
    because that rmiregistry does not have my classes in the classpath.
    My classes are in the iAS classpath because I added them through the
    registry.
    When I start my own rmiregistry on a different port and set the
    classpath environment variable to include my classes, then I have no
    problems.
    Does anyone know how to change the classpath for the rmiregistry
    started by the kxs process?
    I am running iAS sp3 on Windows 2000 adn Solaris
    Thanks,
    Mark
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Rmiregistry: Port already in use error

    Hi,
    I'm running the following comand to start a registry service listening on port 1099. I'll start and stop it several times with control-C and everything will work fine but if I do this a few times, it will get to the point that when I try to start it again I get a message
    saying the port is already in use(but I killed the service). Is there a way to start and stop the rmiregistry several times without it getting hung? I'm sure if you get into a production issue with this you need a way to get around it? Besides using the proper command, what can you do to free up a port? Note, I also noticed that netstat shows multiple entries listening on port 1099! Was this from re-trying the command when it failed or from the times that it was successful? Any help appreciated.
    Thanks,
    Peter
    C:\>rmiregistry -J-Djava.security.policy=C:\jdk1.3.0_02\jre\lib\security\pkjava2.policy
    java.rmi.server.ExportException: Port already in use: 1099; nested exception
    is:
    java.net.BindException: Address in use: JVM_Bind
    java.net.BindException: Address in use: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:408)
    at java.net.ServerSocket.<init>(ServerSocket.java:173)
    at java.net.ServerSocket.<init>(ServerSocket.java:85)
    at
    sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:30)
    at
    sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:312)
    at
    sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:559)
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:200)
    at
    sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:172)
    at
    sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:319)
    at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:119)
    at
    sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:125)
    at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:95)
    at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:81)
    at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:320)
    C:\>netstat -a
    Active Connections
    Proto Local Address Foreign Address State
    TCP reminetopk:135 0.0.0.0:0 LISTENING
    TCP reminetopk:135 0.0.0.0:0 LISTENING
    TCP reminetopk:1028 0.0.0.0:0 LISTENING
    TCP reminetopk:1030 0.0.0.0:0 LISTENING
    TCP reminetopk:1032 0.0.0.0:0 LISTENING
    TCP reminetopk:1033 0.0.0.0:0 LISTENING
    TCP reminetopk:1099 0.0.0.0:0 LISTENING
    TCP reminetopk:1099 0.0.0.0:0 LISTENING
    TCP reminetopk:1099 0.0.0.0:0 LISTENING
    TCP reminetopk:1409 0.0.0.0:0 LISTENING
    TCP reminetopk:1893 0.0.0.0:0 LISTENING
    TCP reminetopk:1972 0.0.0.0:0 LISTENING
    TCP reminetopk:2026 0.0.0.0:0 LISTENING
    TCP reminetopk:2359 0.0.0.0:0 LISTENING
    TCP reminetopk:2367 0.0.0.0:0 LISTENING
    TCP reminetopk:2369 0.0.0.0:0 LISTENING
    TCP reminetopk:7318 0.0.0.0:0 LISTENING
    TCP reminetopk:8082 0.0.0.0:0 LISTENING

    I have exactly the same problem. At first it was happening with the use of the "rmiregistry" command, but now my code creates the registry using registry = LocateRegistry.createRegistry(port) and I end up with the same problem.
    I too end up with (typically) 3 listening sockets (as reported by netstat), that don't seem to be owned by any processes. So without a process to kill, the only way to get rid of them is to reboot.

  • RMI Problem with rebind()

    created files as below. All compiled successfully.
    ran <rmic -v1.1 -d %cp% -classpath %cp% server.TempServerImpl> from command window.
    this generated a stub file called TempServerImpl_Stub.class
    I launched the rmiRegistry
    To make the remote object available to recieve mathod calls from clients I run TempServerImpl.class
    But ..... when I run TempServerImpl I get the exception "java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: "
    AND..... my stub class is deleted without any warning!!!
    if I comment out the line "Naming.rebind( serverObjectName, tempServer );" after I generate the stub class then TempServerImpl runs without throwing any exception but this must be included to bind my remote server object to the RMI registry.
    Any ideas what Im missing?
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    import java.net.URL;
    import java.rmi.Remote;
    import java.rmi.Naming;
    public class TempServerImpl extends UnicastRemoteObject implements TempServer{
       public TempServerImpl() throws RemoteException {
          super();
       public Info getInfo() throws RemoteException{
          return new Info("some temperature data returned");
       public static void main( String args [] ) throws Exception{
          TempServerImpl tempServer = new TempServerImpl();
          String serverObjectName = "//localhost/TempServer";
          Naming.rebind( serverObjectName, tempServer );
    //************ Remote Interface
    import java.rmi.*;
    import java.rmi.RemoteException;
    public interface TempServer extends Remote {
      public Info getInfo() throws RemoteException;
    import java.io.Serializable;
    public class Info implements Serializable{
       private String data;
       public Info(String data){
          this.data = data;
       public String toString(){
          return this.data;
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Are you sure that the stub is being deleted, or is it just that the exception message says it can't be found. If it's the latter it might be that the stub is not in the class path of either the commandline running the rmi registry or the commandline running the TempServerImpl. However as you are running this i assume it ok.
    The code looks fine, The problem is something to do with classpaths ect.

  • RMI connectivity problem (multi-NIC)

    I'm developing a simple photo share program with Java RMI.
    I connect rmiregistry (192.168.100.3), it returns the object reference, but when I invoke a method I get problems.
    My server (remote) - 192.168.100.3 - reply with an address of another NIC - 192.168.62.1 (from VMware). I print out the Proxy object, and I was surprised when I saw 192.167.62.1 address, instead 192.168.100.3. My client is running on 192.168.100.1 address.
    Why is this happening?
    When I turned off the VMware virtual NICs, I was successful. I want to understand what is going on, and if is there a way to fix this issue.
    $ java rmi.Client
    Looking...object found!
    Proxy[PhotoShare,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[192.168.62.1:58343](remote),objID:[4cc5973e:11de2bb065b:-7fff, 4037313925566802436]]]]]
    Exception in thread "main" java.rmi.ConnectIOException: Exception creating connection to: 192.168.62.1; nested exception is:
         java.net.SocketException: Network is unreachable
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:614)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
         at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
         at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
         at $Proxy0.listaFotos(Unknown Source)
         at rmi.Client.main(Client.java:26)
    Caused by: java.net.SocketException: Network is unreachable
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:469)
         at java.net.Socket.<init>(Socket.java:366)
         at java.net.Socket.<init>(Socket.java:180)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
         ... 7 moreEdited by: pantony on Nov 28, 2008 3:26 AM
    Edited by: pantony on Nov 28, 2008 3:27 AM

    See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].

  • Rmi problem

    Hello,
    I am working with melilta and amilcare both written in java.
    My problem is when I try to run the melitaserver it shows the error message:
    "Melita startup script
    Using AMILCARE_HOME: "."
    "D:\j2sdk\bin\java" -Xmx200M -Djava.library.path=./runtime -cp "./lib/melita.jar
    ;./lib/jRegistryKey.jar;D:\j2sdk/lib/tools.jar;./lib/jena.jar;./lib/icu4j.jar;./
    lib/gate.jar;./lib/guk.jar;./lib/amilcare.jar" melitaserver.MelitaServer
    Rmiregistry located at D:\Program Files\Java\jre1.5.0_05\bin\rmiregistry.exe and
    launched !
    Information found in path: file:/D:/Documents%20and%20Settings/Dena/Desktop/meli
    ta/melita2.0/lib/melita.jar
    Amilcare being initialised ...
    Amilcare Server exception: error during JRMP connection establishment; nested ex
    ception is:
    java.net.SocketTimeoutException: Read timed out
    java.rmi.ConnectIOException: error during JRMP connection establishment; nested
    exception is:
    java.net.SocketTimeoutException: Read timed out
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:274
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
    at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Naming.java:160)
    at melitaserver.MelitaServer.main(MelitaServer.java:149)
    Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
    at java.io.DataInputStream.readByte(DataInputStream.java:331)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:215
    ... 5 more
    Can anyone help me?
    Best regards

    Hello!
    Have you figured out the cause of problem for that exception? I also encountered that, the difference only is I use IBM Websphere.
    What did you do to solve it? Hope you can reply.
    Thanks!

  • BInd objects on non-local rmiregistry?

    As I understand, every remote object should be registred on his own(local) rmiregistry.
    I use JNDI like this:
    /////////// Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory" );
    env.put(Context.PROVIDER_URL, "rmi://localhost"); Context ctx = new InitialContext(env);
    String rmiurl = "rmi://192.168.0.48/1.IObj";
    Reference ref = new Reference("IObj", new StringRefAddr("URL", rmiurl)); ctx.rebind("JNDI_OBJ", ref); //////////
    and this works out. But only with my local rmiregistry.
    When I change PROVIDER_URL property I catch javax.naming.NoPermissionException. Is it possible to bind my objects on another rmiregistry.
    I will be very appreciated, if you help me. Thank you.

    The problem is the standard RMI initial context factory. With the standard RMI registry you are only allowed to bind to a local RMI registry. However you can use any Naming service to bind your object. This means you can use CAROL, JBossNS, or any other naming service of your liking. You just have to use the appropriate initial context factory in your initial context.
    Cliff

Maybe you are looking for

  • New install ZH77A-G43 with cloned Server 2003 won't boot in Safe mode

    Hello, I just installed a ZH77A-G43 into an existing PC box, new Core i3, new SATA CD and 500G drive, existing tape backup connected to a SCSI card. I cloned the new harddrive into 2 partitions, the first one being a bootable Server 2003. I installed

  • Export data in cloumn format in Essbase v11.1.1

    Hi Everybody, I have installed essbase 11.1.1 in my personal desktop recently, to understand the new features and I observe dataexport in column format is not working as intended. When i select option called "export in column format" data is not expo

  • Can you help with the coding please? I am trying to create a moveable pin by clicking and dragging.

    import mx.transitions.Tween; import mx.transitions.easing.*; /* Mouse Click Event Clicking on the specified symbol instance executes a function in which you can add your own custom code. Instructions: 1. Add your custom code on a new line after the l

  • Problem evaluating a condition

    Hi I'm getting an error in the receiver determination when I'm using a context object. The error is "Problem extracting values from the Payload: Check line 2 column 1 of the XML document". This is my paylod "<?xml version="1.0" encoding="utf-8"?> <ns

  • Import  into an other  table

    Hi , I want to import a table from a user to another user but i have also to change the name of the table . Exemple : user 1 table 1 I want to launch the import and have another table (table 2) for the user 2. thanks for helping.