On Mon, 6 Aug 2001, storck wrote:

> Hi,
> 
> the only thing I have done till now is to deploy the InterestBean from the
> demos of JBoss. The deploying seem to work cause JBoss wrote that it is
> deploying interest.jar
> Now I have tried to access that bean with the following client. The
> JNDI -Name of my bean is Interest
> 
> public static void main(java.lang.String[] args) {
>       // Insert code to start the application here.
>       try {
>               Properties p = System.getProperties();
>               p.put(Context.INITIAL_CONTEXT_FACTORY,
> "org.jnp.interfaces.NamingContextFactory");
>               p.put(Context.PROVIDER_URL, "localhost:1099");
>               p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
>               InitialContext jndiContext = new InitialContext(p);
>               System.out.println("Got context");
> 
>               // Get a reference to the Interest Bean
>               Object ref = jndiContext.lookup("Interest");
>               System.out.println("Got reference");
>       } catch (Exception e) {
>               e.printStackTrace();
>       }
> }
> 
> If I run that client I get the following exception:
> 
> javax.naming.CommunicationException.  Root exception is
> java.io.StreamCorruptedException: Type code out of range, is 125

My guess is that the client and server is not running the same Java
version. I know that if you've got a 1.2 client and a 1.3 server you get
this exception. There is some system property you can set to get the 1.3
VM to run as 1.2. Search the archive for, it's in there somewhere.

Regards, Per

-----------------------------------------------------------------------
Per Lewau ([EMAIL PROTECTED]) 

"Why waste time learning, when ignorance is instantaneous?"
                                                - Hobbes


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to