Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Christian Pazmi�o

Greenhorn
+ Follow
since Jun 07, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Christian Pazmi�o

Hi,

I'm newbie working with JSF, I'm stuck trying to resize the JSF or the h:form please I need help.

Regards.
12 years ago
JSF
Hi I have a RMI app running but now I want to know how implement my client.class on a Applet.
here is the code of my FlightCliente.class:

/************************************************************************/
import java.rmi.*;
import java.util.Vector;

public class FlightClient {
public static void main (String args[]) {
if (args.length == 0) {
System.out.println("\nUsage: java "+"-Djava.security.policy=security.policy FlightClient flightNo");
System.exit(0);
}
try {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}
FlightServer myServer = (FlightServer)
Naming.lookup("rmi://localhost:6001/FlightService";);

// Serachs For the arrival info only
String arrival = myServer.getArrivalTime(args[0]);
System.out.println("Arrival time of " + args[0] +
" is " + arrival);
} catch (NotBoundException nbe) {
System.out.println(nbe.getMessage());
} catch (java.net.MalformedURLException mfue) {
System.out.println(mfue.getMessage());
} catch (RemoteException re) {
System.out.println(re.getMessage());
}
}
}
/*************************************************************************/

On my applet there is a TextField in which i going to get the flight number, a label which display the information, and a button for submit the flight number.

Thank So much.
15 years ago
Thanks Man everything works just Perfect.
15 years ago
I Already run rmic over FlightServerImpl and It produce me the stubs.
My problem It is that in order to execute the app. I have to execute the StartFlightServer to bind the fightServerImpl class under the name FlightService to registry that runs on the same machine as the server (localhost) on port 6001

here is the source.

package pack;

import java.rmi.*;
import java.rmi.registry.LocateRegistry;

public class StartFlightServer {

public static void main (String args[]) {
try {
FlightServerImpl fsi = new FlightServerImpl();
Naming.rebind("rmi://localhost:6001/FlightService",fsi);
System.out.println("FlightService is waiting for the requests on port 6001...");
} catch(Exception ex) {
ex.printStackTrace();
}
}
}

I'm emulate 3 diferent machines.
1.- #rmiregistry 6001
2.- #java StartFLightServer
Should give something like this: FlightServer is waiting for the request on port 6001
3.-#java -Djava.security.policy=security.policy FlightClient CO1208
Arrival Time of CO1208 is 3:20PM

The error That I was alking about give on machine 2 when I try to execute StartFLightServer.

I hope this help you to help me.
And Why didn't I begin a new Thread?? I really don't know.
15 years ago
Hi, I'm working with J2EE 1.5 about 2 days I? following Java Bible. But I have a problem.

I have 3 files in order to study rmi.
FlightServer
StartFlightServer
FlightServerImpl
FlightClient

Every file is compiled with javac. the FlightServerImpl_stub is also ready.
But when I try to java StartFlightServer I got a Horrible error.

java pack.StartFlightServer
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: pack.FlightServerImpl_Stub
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
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:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)

I also try changing the CLASSPATH but nothing works. I supose that it si not finding the _stub class. But i do not what it is going on.

Please I need some help I'm using White Box Linux 3. JDK 1.5.

I compiled the java files with:

javac -cp /mnt/Flaka/Java.Bible/Chapter4/Linux_try/ StartFlightServer.java

Please I really need some help.
Sorry but I'm newbie.

PD: Sorry about my English but my native language is the Spanish. =)

nait.





15 years ago
Hi Friend, I actually found a half fix for our problem. First if you are expeiment this problem is because you are installing Websphere Studio in a new version of Linux. I installed WSS in Red Hat 9.

In order to fix this problem you have write this, each time that you run WSS:

[root@149 user]# LD_ASSUME_KERNEL=2.2.5
[root@149 user]# export LD_ASSUME_KERNEL=2.2.5

Actually this works every time that you want to install, run any aplication from Speed start your Linux app, Linux Software Evaluation Kit 2Q 2003