Hi!
Jeremy Cowgar wrote:
>
> I have been having difficulties getting my code to work properly. This is
> what I come up with when I try to run my client program (simple test program
> that has four methods, add(int a, int b), subtract, multiply, divide ...
> etc..
Which jBoss files have you placed in your client? If you use JDK1.3 you
should only have jnpserver.jar in your clients path. If you use JDK1.2
you must also have jboss-client.jar
/Rickard
>
> It looks as though the bean gets deployed and bound fine but I cannot
> resolve this issue when running the client program:
>
> Caught an unexpected exception!
> javax.naming.CommunicationException. Root exception is
> java.io.InvalidClassExce
> ption: org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy; Local class not
> compatib
> le: stream classdesc serialVersionUID=-6864165306101263222 local class
> serialVer
> sionUID=-6471019830693754831
> at java.io.ObjectStreamClass.validateLocalClass(Unknown Source)
> at java.io.ObjectStreamClass.setClass(Unknown Source)
> at java.io.ObjectInputStream.inputClassDescriptor(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at java.io.ObjectInputStream.inputClassDescriptor(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at java.io.ObjectInputStream.inputObject(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at java.io.ObjectInputStream.inputClassFields(Unknown Source)
> at java.io.ObjectInputStream.defaultReadObject(Unknown Source)
> at java.io.ObjectInputStream.inputObject(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> at java.rmi.MarshalledObject.get(Unknown Source)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:171)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:152)
> at javax.naming.InitialContext.lookup(Unknown Source)
> at Calc.main(Calc.java:25)
>
> Here is the pertient code:
>
> /*
> InitialContext ctx = new InitialContext();
> Object logObj = (Object)ctx.lookup("ejb/CalculatorBean");
> CalculatorHome home = (CalculatorHome)PortableRemoteObject.narrow(
> logObj, CalculatorHome.class);
> Calculator calc = home.create();
> */
>
> InitialContext init = new InitialContext();
> CalculatorHome home = (CalculatorHome)init.lookup("ejb/CalculatorBean");
> Calculator calc = home.create();
>
> If I use either of those, the same problem occurs. I will say that I am not
> sure what classes I should be importing to provide me my CalculatorHome and
> Calculator classes. I have recently started programming for J2EE and have
> done so in the J2EE RI only. It returns a client.jar file for use with the
> client. This exact program and bean works great in J2EE RI.
>
> Thank you for your help,
>
> Jeremy - [EMAIL PROTECTED]
> Christian Brotherhood Newsletter
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]