The Artima Developer Community
Sponsored Link

Java Answers Forum
Difficulties on Java2 RMI application

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
LS

Posts: 1
Nickname: lukaszshen
Registered: Apr, 2003

Difficulties on Java2 RMI application Posted: Apr 15, 2003 11:29 AM
Reply to this message Reply
Advertisement
Greetings,

We are MSU students working on a project called Web-based robot control by using Java2 RMI. We are currently using the Java2 SDK 1.4.1_01, commapi (for port communication) and ACL robot control. However, with our limited knowledge on Java programming language, we encounter some problems. I wish to get help from any user who could help.

You can downloaded our code from the following http://www.geocities.com/lukaszshen/WBRC.html


The following are the steps we have done:

1. Write and compile code. The attachment contains the 5 parts of the program:
- Robot.java (interface)
- Move.java(interface)
- RobotEngine(server)
- RobotMove(client)
- Sendtorobot(serial communication)
2. Running the program:
a. We start the rmiregisty from the folder were our program is located
b. In the next DOS-PROMT Window, first we set out class paths to:

CLASSPATH=c:\RobotProject; c:\RobotProject\robot.jar; c:\j2sdk1.4.1_02\lib\comm.jar

Second, we run our startserv.bat file to start the server.

3. We run the client by first setting up the class paths:

CLASSPATH=c:\RobotProject; c:\RobotProject\robot.jar; c:\j2sdk1.4.1_02\lib\comm.jar

Second we run the startserver.bat file.

The following are the problems occur while running the client,

C:\Robot>startclient.bat

C:\Robot>java -Djava.rmi.server.codebase=file:/c:\Robot/ -Djava.security.policy=java.policy client.RobotMove localhost con
RobotMove exception: Error occurred in server thread; nested exception is:
java.lang.NoClassDefFoundError
java.rmi.ServerError: Error occurred in server thread; nested exception is:
java.lang.NoClassDefFoundError
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:289)
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:536)
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 engine.RobotEngine_Stub.executeTask(Unknown Source)
at client.RobotMove.main(RobotMove.java:19)
Caused by: java.lang.NoClassDefFoundError
at client.Sendtorobot.doit(Sendtorobot.java:26)
at client.Sendtorobot.execute(Sendtorobot.java:22)
at engine.RobotEngine.executeTask(RobotEngine.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va: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:536)
C:\Robot>


The following is the alternative we tried:

Another alternative we tried was to simplify the program only to serial communication. The serial communication called SimpleWrite and its compiled class is attached in the SW folder.
Below is the problem that occurred. Port COM1 not found. We also tried to run java BlackBox from commapi directory to search for ports but again the massage came up to be no ports found.

C:\j2sdk1.4.1_02\bin>java SimpleWrite
port COM1 not found.

We would like to ask for help with the above problems. Thank you very much!!

Thank you very much!!

Regards,
Lukasz & Shen

Topic: Help - Heap file implementation Previous Topic   Next Topic Topic: CLIENT SERVER PROBLEM

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use