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
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.io.IOException(java.lang.String)
java.io.ObjectStreamException(java.lang.String)
java.io.StreamCorruptedException(java.lang.String)
byte java.io.ObjectInputStream.peekCode()
java.lang.Object java.io.ObjectInputStream.readObject(boolean)
java.lang.Object java.io.ObjectInputStream.readObject()
int java.io.ObjectInputStream.inputObject(boolean)
java.lang.Object java.io.ObjectInputStream.readObject(boolean)
java.lang.Object java.io.ObjectInputStream.readObject()
java.lang.Object java.rmi.MarshalledObject.get()
java.lang.Object org.jnp.interfaces.NamingContext.lookup(javax.naming.Name)
java.lang.Object org.jnp.interfaces.NamingContext.lookup(java.lang.String)
java.lang.Object javax.naming.InitialContext.lookup(java.lang.String)
void test.jdbc.TestJNDI_JBoss.main(java.lang.String [])
Can someone help me ?
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user