Couldn't connect to 'localhost' with origin from 'local_classpath_classes'

I have installed jconnect30 and JDK115 on windows NT using netscape
navigator404. After running httpd script, I ran the sample applet isql
in navigator through URL: http://localhost:8000/sample/gateway.html.
But I got the Unexpected Exception:
netscape.security.AppletSecurityException: security.Couldn't connect
to 'localhost' with origin from 'local-classpath-classes'.

please help me

E-mail:  mlsun@public1.sdjnptt.net.cn




0
mlsun
5/30/1998 11:06:05 AM
sybase.jconnect30 552 articles. 0 followers. Follow

4 Replies
412 Views

Similar Articles

[PageSpeed] 33

This is being caused by Communicator finding the SybDriver class locally
rather than downloading it via HTTP.  Start communicator by the command
line after setting CLASSPATH to empty, this should resolve this issue.

Dave Wolf
Sybase Professional Services

mlsun wrote:

> I have installed jconnect30 and JDK115 on windows NT using netscape
> navigator404. After running httpd script, I ran the sample applet isql
> in navigator through URL: http://localhost:8000/sample/gateway.html.
> But I got the Unexpected Exception:
> netscape.security.AppletSecurityException: security.Couldn't connect
> to 'localhost' with origin from 'local-classpath-classes'.
>
> please help me
>
> E-mail:  mlsun@public1.sdjnptt.net.cn



0
David
5/30/1998 10:44:57 PM
I'm having the same problem, with Communicator 4.05. IE4.01 manifests other
problems, probably rights-related from what I can tell from other messages
in these groups. I tried the solution you sugest below, but got the same
result. Any further thoughts?

Here are my connect strings:

    public String conString = new
String("jdbc:sybase:Tds:defiant.cbord.com:8889/mycbord");
    public String conDriver = new String("com.sybase.jdbc.SybDriver");

I can successfully connect if I set the run options to view the applet in
the applet viewer. Setting the run options for NetScape viewing yields the
previously reported error:

netscape.security.AppletSecurityException: security.Couldn't connect to
'defiant.cbord.com' with origin from 'local-classpath-classes'.

Then I open up a DOS box and go to my NetScape directory and do a

    SET CLASSPATH =

followed by

    NETSCAPE.EXE <path to html with applett>

at which point I get the following error in the java console:

# Applet exception: error: java.lang.NoClassDefFoundError: Form1
java.lang.NoClassDefFoundError: Form1

.... which I guess makes sense, since the classpath is not defined....

Any thoughts? I got a Visual Cafe / DBAnywhere applet based on the same
stuff written and deployed in less than a week; I've spent three weeks
banging my head against Sybase's offerings, and haven't gotten any DB
connectivity to work outside the IDE....

David Lance Wolf wrote in message <35708BE9.BFA48303@sybase.com>...
>This is being caused by Communicator finding the SybDriver class locally
>rather than downloading it via HTTP.  Start communicator by the command
>line after setting CLASSPATH to empty, this should resolve this issue.
>
>Dave Wolf
>Sybase Professional Services
>
>mlsun wrote:
>
>> I have installed jconnect30 and JDK115 on windows NT using netscape
>> navigator404. After running httpd script, I ran the sample applet isql
>> in navigator through URL: http://localhost:8000/sample/gateway.html.
>> But I got the Unexpected Exception:
>> netscape.security.AppletSecurityException: security.Couldn't connect
>> to 'localhost' with origin from 'local-classpath-classes'.
>>
>> please help me
>>
>> E-mail:  mlsun@public1.sdjnptt.net.cn
>
>
>


0
Jonathan
6/3/1998 3:23:12 PM
This is a multi-part message in MIME format.
--------------45FF8125CA59DB6DFF5F4C7D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The NoClassDefFoundException is being casued by there being missing classes in
the web directory you are downloading from.  At least, I'm assuming your doing
a http:// URL and not a file:// URL.  Make sure you have all the required
classes installed and the <CODEBASE> configured correctly.  This issue only
affects the developers who have the driver locally, and will manifest itself
with any JDBC driver and Comminicator 4 if you have the driver within your
classpath.  You could also rather than setting the classpath to empty, just
remove any referecnces that would let it find the jConenct classes.

As for the problems in IE.  Please note, as shown in several threads here by
Dave Clegg, that Microsofts VM does not allow you to create the connection
object from the static method call on DriverManager, so:

Class.forName("com.sybase.jdbc.SybDriver");
Connection _con = DriverManager.getConnection(properties);

wont work.  Dave has published a workaround that should be more portable across
VM's.  Again, this will affect any JDBC implementation that builds it
connection objects from static method calls.

Dave Wolf
Sybase Professional Services

Jonathan A. Hochberg wrote:

> I'm having the same problem, with Communicator 4.05. IE4.01 manifests other
> problems, probably rights-related from what I can tell from other messages
> in these groups. I tried the solution you sugest below, but got the same
> result. Any further thoughts?
>
> Here are my connect strings:
>
>     public String conString = new
> String("jdbc:sybase:Tds:defiant.cbord.com:8889/mycbord");
>     public String conDriver = new String("com.sybase.jdbc.SybDriver");
>
> I can successfully connect if I set the run options to view the applet in
> the applet viewer. Setting the run options for NetScape viewing yields the
> previously reported error:
>
> netscape.security.AppletSecurityException: security.Couldn't connect to
> 'defiant.cbord.com' with origin from 'local-classpath-classes'.
>
> Then I open up a DOS box and go to my NetScape directory and do a
>
>     SET CLASSPATH =
>
> followed by
>
>     NETSCAPE.EXE <path to html with applett>
>
> at which point I get the following error in the java console:
>
> # Applet exception: error: java.lang.NoClassDefFoundError: Form1
> java.lang.NoClassDefFoundError: Form1
>
> ... which I guess makes sense, since the classpath is not defined....
>
> Any thoughts? I got a Visual Cafe / DBAnywhere applet based on the same
> stuff written and deployed in less than a week; I've spent three weeks
> banging my head against Sybase's offerings, and haven't gotten any DB
> connectivity to work outside the IDE....
>
> David Lance Wolf wrote in message <35708BE9.BFA48303@sybase.com>...
> >This is being caused by Communicator finding the SybDriver class locally
> >rather than downloading it via HTTP.  Start communicator by the command
> >line after setting CLASSPATH to empty, this should resolve this issue.
> >
> >Dave Wolf
> >Sybase Professional Services
> >
> >mlsun wrote:
> >
> >> I have installed jconnect30 and JDK115 on windows NT using netscape
> >> navigator404. After running httpd script, I ran the sample applet isql
> >> in navigator through URL: http://localhost:8000/sample/gateway.html.
> >> But I got the Unexpected Exception:
> >> netscape.security.AppletSecurityException: security.Couldn't connect
> >> to 'localhost' with origin from 'local-classpath-classes'.
> >>
> >> please help me
> >>
> >> E-mail:  mlsun@public1.sdjnptt.net.cn
> >
> >
> >



--------------45FF8125CA59DB6DFF5F4C7D
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for David Wolf
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             David Wolf
n:              Wolf;David
org:            Sybase Professional Services
adr:            6550 Rock Spring Dr;;Suite 800;Bethesda;MD;20817;USA
email;internet: dwolf@sybase.com
title:          Consultant
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------45FF8125CA59DB6DFF5F4C7D--

0
David
6/3/1998 3:41:36 PM
This is a multi-part message in MIME format.
--------------0577DDBB2FEC06F52FA25B8D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Did you try the Web Application Target in PowerJ which will assemble all the
dependant classes and publish them to a web server?

Dave Wolf
Sybase Professional Services

David Lance Wolf wrote:

> The NoClassDefFoundException is being casued by there being missing classes in
> the web directory you are downloading from.  At least, I'm assuming your doing
> a http:// URL and not a file:// URL.  Make sure you have all the required
> classes installed and the <CODEBASE> configured correctly.  This issue only
> affects the developers who have the driver locally, and will manifest itself
> with any JDBC driver and Comminicator 4 if you have the driver within your
> classpath.  You could also rather than setting the classpath to empty, just
> remove any referecnces that would let it find the jConenct classes.
>
> As for the problems in IE.  Please note, as shown in several threads here by
> Dave Clegg, that Microsofts VM does not allow you to create the connection
> object from the static method call on DriverManager, so:
>
> Class.forName("com.sybase.jdbc.SybDriver");
> Connection _con = DriverManager.getConnection(properties);
>
> wont work.  Dave has published a workaround that should be more portable across
> VM's.  Again, this will affect any JDBC implementation that builds it
> connection objects from static method calls.
>
> Dave Wolf
> Sybase Professional Services
>
> Jonathan A. Hochberg wrote:
>
> > I'm having the same problem, with Communicator 4.05. IE4.01 manifests other
> > problems, probably rights-related from what I can tell from other messages
> > in these groups. I tried the solution you sugest below, but got the same
> > result. Any further thoughts?
> >
> > Here are my connect strings:
> >
> >     public String conString = new
> > String("jdbc:sybase:Tds:defiant.cbord.com:8889/mycbord");
> >     public String conDriver = new String("com.sybase.jdbc.SybDriver");
> >
> > I can successfully connect if I set the run options to view the applet in
> > the applet viewer. Setting the run options for NetScape viewing yields the
> > previously reported error:
> >
> > netscape.security.AppletSecurityException: security.Couldn't connect to
> > 'defiant.cbord.com' with origin from 'local-classpath-classes'.
> >
> > Then I open up a DOS box and go to my NetScape directory and do a
> >
> >     SET CLASSPATH =
> >
> > followed by
> >
> >     NETSCAPE.EXE <path to html with applett>
> >
> > at which point I get the following error in the java console:
> >
> > # Applet exception: error: java.lang.NoClassDefFoundError: Form1
> > java.lang.NoClassDefFoundError: Form1
> >
> > ... which I guess makes sense, since the classpath is not defined....
> >
> > Any thoughts? I got a Visual Cafe / DBAnywhere applet based on the same
> > stuff written and deployed in less than a week; I've spent three weeks
> > banging my head against Sybase's offerings, and haven't gotten any DB
> > connectivity to work outside the IDE....
> >
> > David Lance Wolf wrote in message <35708BE9.BFA48303@sybase.com>...
> > >This is being caused by Communicator finding the SybDriver class locally
> > >rather than downloading it via HTTP.  Start communicator by the command
> > >line after setting CLASSPATH to empty, this should resolve this issue.
> > >
> > >Dave Wolf
> > >Sybase Professional Services
> > >
> > >mlsun wrote:
> > >
> > >> I have installed jconnect30 and JDK115 on windows NT using netscape
> > >> navigator404. After running httpd script, I ran the sample applet isql
> > >> in navigator through URL: http://localhost:8000/sample/gateway.html.
> > >> But I got the Unexpected Exception:
> > >> netscape.security.AppletSecurityException: security.Couldn't connect
> > >> to 'localhost' with origin from 'local-classpath-classes'.
> > >>
> > >> please help me
> > >>
> > >> E-mail:  mlsun@public1.sdjnptt.net.cn
> > >
> > >
> > >
>
>   ------------------------------------------------------------------------
>
>   David Wolf <dwolf@sybase.com>
>   Consultant
>   Sybase Professional Services
>
>   David Wolf
>   Consultant                    <dwolf@sybase.com>
>   Sybase Professional Services
>   6550 Rock Spring Dr           Netscape Conference Address
>   Suite 800                     Netscape Conference DLS Server
>   Bethesda
>   MD
>   20817
>   USA
>   Additional Information:
>   Last Name      Wolf
>   First Name     David
>   Version        2.1



--------------0577DDBB2FEC06F52FA25B8D
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for David Wolf
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             David Wolf
n:              Wolf;David
org:            Sybase Professional Services
adr:            6550 Rock Spring Dr;;Suite 800;Bethesda;MD;20817;USA
email;internet: dwolf@sybase.com
title:          Consultant
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------0577DDBB2FEC06F52FA25B8D--

0
David
6/3/1998 3:45:29 PM
Reply: