-
1. Re: I am having trouble testing EJB across network.
ashutoshjboss Sep 21, 2001 9:24 AM (in response to spatemp)The java.io.InvalidClassException is generally raised when the Serialization runtime detects a problem with a Class.
Possibly, the class at the client side does not match the serial version of the class in the stream.
You may be having two diferent versions of the either the Home or the Remote Interface on the client and the server. These classes would be required while casting the Object that u receive from either the lookup() or the create().
Ashutosh -
2. Re: I am having trouble testing EJB across network.
spatemp Sep 21, 2001 4:34 PM (in response to spatemp)The InteresetBean has not been changed at all. It comes from the documentation-example.zip from jboss (http://www.jboss.org/doco_files/). I modified the InterestClient as seen above but not the InterestBean. So, as you can see the "Got Context" message is printed and I think it blows up on the getting reference. So what do I have to change in this client code to have the "interest.calculateCompoundInterest(1000, 0.10, 2)" method called for Interest EJB running on different machine then the client. Can some one be more specific. Thanks.
-
3. Re: I am having trouble testing EJB across network.
forge Sep 21, 2001 4:54 PM (in response to spatemp)Your code is OK, but you may want to change your
java.naming.factory.url.pkgs
property to "org.jboss.naming:org.jnp.interfaces". -
4. Re: I am having trouble testing EJB across network.
spatemp Sep 22, 2001 1:28 PM (in response to spatemp)After changing the following, I am now getting this error message.
env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "jnp://theserver.domain.com:1099");
env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
-------------------
[java] Got context
[java] javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
[java] java.net.ConnectException: Connection refused: connect] -
5. Re: I am having trouble testing EJB across network.
spatemp Sep 24, 2001 2:27 PM (in response to spatemp)I found out what the problem was. It turned out to be a firewall issue. I did have successful test with another machine. I just wanted to make sure the code was ok and thanks for every one's help.