No suck luck. I still get the NPE at the same spot. Still perplexing.
-john
-----Original Message-----
From: John McDonald [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 01, 2000 8:38 AM
To: 'jBoss'
Subject: RE: [jBoss-User] perplexing problem
>What you are saying is not what the JNP code is saying, so something is
strange, that's for
>sure.
Well, here's my class. I'm adding the Referenceable Interface and the
getReference() method and I'll give it another shot. I'll let you know of
the results.
-john
<CLASS>
public class AppletServer extends UnicastRemoteObject implements
AppletServerInterface {
public AppletClient app = null;
private ObjectSignature signature = null;
private String namingURL = null;
public AppletServer(AppletClient theApp) throws RemoteException{
super();
app = theApp;
}
public AppletServer() throws RemoteException { super(); }
// EventNotification event
public boolean notifyMember(EventNotification en) throws RemoteException
{
System.out.println("event type=" + en.getEventType());
if(en != null){
System.out.println("EventNotification is NOT NULL!!");
System.out.println("Recipient=" + en.getRecipientPK());
System.out.println("Provider=" + en.getProviderPK());
System.out.println("EventType" + en.getEventType());
System.out.println("TimeStamp=" + en.getTimeStamp());
}
if(app == null){ System.out.println("APP IS NULL!!!!"); }
app.addTableRow(en.getVector());
return true;
}
public void setSignature(ObjectSignature sig){ signature = sig; }
public void setNamingURL(String url) { namingURL = url; }
public AppletServer getServer() { return this; }
public void bindObject(){
try{
if(System.getSecurityManager() == null){
System.setSecurityManager(new RMISecurityManager());
}
System.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url", "63.199.148.48:2101");
Context ctx = (Context)new InitialContext();
// Create subcontext
Context test = ctx.createSubcontext("applet");
System.out.println("test created:"+test);
// Bind object
ctx.bind("/applet/" + signature.getSignature(), this);
System.out.println("this/server bound");
System.out.println("AppletServer bound and running..");
}catch(Exception e){e.printStackTrace();}
}
}
</CLASS>
-----Original Message-----
From: Rickard �berg [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 01, 2000 8:35 AM
To: jBoss
Subject: Re: [jBoss-User] perplexing problem
John McDonald wrote:
>
> Rickard,
> Actually, these classes are "left over" from the RMI I had implimented
prior
> to moving to JNP(in Jboss). Which means the object that I'm passing
extends
> UnicastRemoteObject and implements my remote interface. In the case of
> jndi(which I am new to ) must I impliment the Referenceable interface,
> instead of the remote interface? Also, I only recieve this NPE when I
> attempt to bind remotely. All is well when I bind on the same machine as
the
> JNP.
>
> What do you think?
Well.. uhm, the line where the NPE was thrown from is trying to use a
Reference since the bound object was a Referenceable. And the obtained
Reference is null. That is what the code is saying. What you are saying
is not what the JNP code is saying, so something is strange, that's for
sure.
Hmm.....
/Rickard
--
Rickard �berg
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]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]