EAI,Cosmo Player: getBrowser return NullPointerException! 
Author Message
 EAI,Cosmo Player: getBrowser return NullPointerException!

I try to use EAI with Netscape 4.6, Cosmo Player 2.1 running on Win NT
4.0 SP3.

But everytime the call
             browser = Browser.getBrowser(this);

returns a NullPointerException:
    java.lang.NullPointerException
         at vrml.external.Browser.getBrowser(Compiled Code)
         at vrml.external.Browser.getBrowser(Compiled Code)

Is there any workaround or patch?

Thanks for any information
Johannes



Wed, 28 Nov 2001 03:00:00 GMT  
 EAI,Cosmo Player: getBrowser return NullPointerException!
i had a lot of similar errors trying to get the EAI to work with N4.05, Cosmo 2.1, NT,  also IE4, also N4 on sgi - i don't know what the deal is with that
API it seems designed to infuriate.  the solution that worked out for me on
NT was actually just to have all the right classes installed in the netscape
java folder to make them accessible at runtime as well as at compile time. (?)
at least i think that's what is going on.  

so in C:\Program Files\Netscape\Communicator\Program\Java\Classes
i've got

java40.jar jae40.jar ifc11.jar iiop10.jar jio40.jar jsd10.jar ldap10.jar scd10.jar   (standard - java40.jar is supposedly the important one.)
also the folders netscape and vrml
netscape contains plugin and security
this gives you netscape.plugin.Plugin

vrml contains _i think_ the EAI _and_ the CP classes, though i'm not sure:

BaseNode, Browser, CacheObject,Event,Field,IECosmoClassLoader, some other classes like that

\cosmo : Browser, MF and SF types classes
\field, \node : Node and Field type classes

THEN there's \external which also has
Browser.class, Node.class, \exception, \field.

All of that {*filter*}was created by unzipping npcosmop21.  just putting it in in
.zip form didn't seem to work

hope this helps

--ben chang

: I try to use EAI with Netscape 4.6, Cosmo Player 2.1 running on Win NT
: 4.0 SP3.

: But everytime the call
:              browser = Browser.getBrowser(this);

: returns a NullPointerException:
:     java.lang.NullPointerException
:          at vrml.external.Browser.getBrowser(Compiled Code)
:          at vrml.external.Browser.getBrowser(Compiled Code)

: Is there any workaround or patch?

: Thanks for any information
: Johannes



Fri, 30 Nov 2001 03:00:00 GMT  
 EAI,Cosmo Player: getBrowser return NullPointerException!
: THEN there's \external which also has
: Browser.class, Node.class, \exception, \field.

: All of that {*filter*}was created by unzipping npcosmop21.  just putting it in in
: .zip form didn't seem to work

I don't think you have to unzip npcosmop21.zip. In fact, I think we are not
supposed to. Just put the zip file in your netscape's Java/classes directory
will do.

---
yong bing



Sat, 01 Dec 2001 03:00:00 GMT  
 EAI,Cosmo Player: getBrowser return NullPointerException!
Hi Ben,

thank your for the answer. I tried your suggestion and copied npcosmop21 to the Netscape classes directory. Doing that will crash N4.51 with Java PlugIn 1.2.1
and i ended up in Dr. Watson.
Did you see similar effects?

Cheers Johannes

"Trespassers W." schrieb:

Quote:
> i had a lot of similar errors trying to get the EAI to work with N4.05, Cosmo 2.1, NT,  also IE4, also N4 on sgi - i don't know what the deal is with that
> API it seems designed to infuriate.  the solution that worked out for me on
> NT was actually just to have all the right classes installed in the netscape
> java folder to make them accessible at runtime as well as at compile time. (?)
> at least i think that's what is going on.

> so in C:\Program Files\Netscape\Communicator\Program\Java\Classes
> i've got

> java40.jar jae40.jar ifc11.jar iiop10.jar jio40.jar jsd10.jar ldap10.jar scd10.jar   (standard - java40.jar is supposedly the important one.)
> also the folders netscape and vrml
> netscape contains plugin and security
> this gives you netscape.plugin.Plugin

> vrml contains _i think_ the EAI _and_ the CP classes, though i'm not sure:

> BaseNode, Browser, CacheObject,Event,Field,IECosmoClassLoader, some other classes like that

> \cosmo : Browser, MF and SF types classes
> \field, \node : Node and Field type classes

> THEN there's \external which also has
> Browser.class, Node.class, \exception, \field.

> All of that {*filter*}was created by unzipping npcosmop21.  just putting it in in
> .zip form didn't seem to work

> hope this helps

> --ben chang


> : I try to use EAI with Netscape 4.6, Cosmo Player 2.1 running on Win NT
> : 4.0 SP3.

> : But everytime the call
> :              browser = Browser.getBrowser(this);

> : returns a NullPointerException:
> :     java.lang.NullPointerException
> :          at vrml.external.Browser.getBrowser(Compiled Code)
> :          at vrml.external.Browser.getBrowser(Compiled Code)

> : Is there any workaround or patch?

> : Thanks for any information
> : Johannes



Sun, 02 Dec 2001 03:00:00 GMT  
 EAI,Cosmo Player: getBrowser return NullPointerException!
Hi Johannes,

I think there are a couple of issues.

I believe that Netscape 4.6 is known not to work with the EAI. Netscape 4.6 broke LiveConnect - which the browser class uses to get the connection between the EAI
applet and the VRML plug-in. The symptom of this is a checkcreateclass loader exception. I have successfully used Netscape 4.5 and 4.5.1.

It is recommended that the getBrowser call be enclosed in a loop waiting for a non-null return in case the applet is loaded and started before the wrl.

I use the following:

// get the browser instance - the following sequence is 'recommended', but my experience
// is that if we don't get the browser's handle on the first try we NEVER will. the 'only'
// option is to shutdown the entire browser, restart it and reload the applet & wrl.
//
        Browser tmp_browser = null;
        for (int i = 0; i < 10; i++)
        {
           try
           {
              tmp_browser = (Browser)Browser.getBrowser( thisApplet, "visualization", 0 );
           }
           catch ( NullPointerException npe )
           {
              System.out.println( "NullPointerException getting browser" );
           }
           if ( tmp_browser != null ) { break; }

           try { Thread.sleep ( 500 ); }
           catch ( InterruptedException ie ) { }
           System.out.println( "null browser, retry " + i );
        }
        if ( tmp_browser == null )  { throw new Error ("getBrowser failed"); }
        else if ( tmp_browser != browser) // detect if plugin reloaded
        {
           browser = tmp_browser;
        }

In addition, when running from the local file system rather than loading the world from across the net, I have always had to start Netscape first before loading
the world. Just double clicking on the html file in the Windows explorer, without first having Netscape running has always failed ( on NS 4.5 & 4.5.1 ) with a
null pointer exception.

Hope that helps, good luck -

-Rex

Quote:

> Hi Ben,

> thank your for the answer. I tried your suggestion and copied npcosmop21 to the Netscape classes directory. Doing that will crash N4.51 with Java PlugIn 1.2.1
> and i ended up in Dr. Watson.
> Did you see similar effects?

> Cheers Johannes

> "Trespassers W." schrieb:

> > i had a lot of similar errors trying to get the EAI to work with N4.05, Cosmo 2.1, NT,  also IE4, also N4 on sgi - i don't know what the deal is with that
> > API it seems designed to infuriate.  the solution that worked out for me on
> > NT was actually just to have all the right classes installed in the netscape
> > java folder to make them accessible at runtime as well as at compile time. (?)
> > at least i think that's what is going on.

> > so in C:\Program Files\Netscape\Communicator\Program\Java\Classes
> > i've got

> > java40.jar jae40.jar ifc11.jar iiop10.jar jio40.jar jsd10.jar ldap10.jar scd10.jar   (standard - java40.jar is supposedly the important one.)
> > also the folders netscape and vrml
> > netscape contains plugin and security
> > this gives you netscape.plugin.Plugin

> > vrml contains _i think_ the EAI _and_ the CP classes, though i'm not sure:

> > BaseNode, Browser, CacheObject,Event,Field,IECosmoClassLoader, some other classes like that

> > \cosmo : Browser, MF and SF types classes
> > \field, \node : Node and Field type classes

> > THEN there's \external which also has
> > Browser.class, Node.class, \exception, \field.

> > All of that {*filter*}was created by unzipping npcosmop21.  just putting it in in
> > .zip form didn't seem to work

> > hope this helps

> > --ben chang


> > : I try to use EAI with Netscape 4.6, Cosmo Player 2.1 running on Win NT
> > : 4.0 SP3.

> > : But everytime the call
> > :              browser = Browser.getBrowser(this);

> > : returns a NullPointerException:
> > :     java.lang.NullPointerException
> > :          at vrml.external.Browser.getBrowser(Compiled Code)
> > :          at vrml.external.Browser.getBrowser(Compiled Code)

> > : Is there any workaround or patch?

> > : Thanks for any information
> > : Johannes



Sun, 02 Dec 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. HELP: problem with EAI getBrowser call in COSMO 1.0

2. EAI with cosmo player problem!

3. COM EAI Cosmo Player SDK ?

4. Cosmo Player 2.1 COM EAI

5. Animations in Cosmo player return to original position

6. Problem with NullPointerException in EAI.

7. NullPointerException in EAI !!!

8. IE 4/5 with EAI received nullPointerException

9. Q: EAI - NullPointerException

10. NullPointerException with EAI

11. EAI: getBrowser

12. EAI: getBrowser(Applet,frame,index)

 

 
Powered by phpBB® Forum Software