Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

can't run an applet

6 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-09-30 12:17:21.0Z
Vanessa L. Sikkema Posted on 1997-09-26 16:33:32.0Z
Message-ID: <342BE3DC.778DA69C@bsr.com>
Date: Fri, 26 Sep 1997 12:33:32 -0400
From: "Vanessa L. Sikkema" <sikkema@bsr.com>
Reply-To: sikkema@bsr.com
Organization: BSR
X-Mailer: Mozilla 4.01 [en] (WinNT; I)
MIME-Version: 1.0
Subject: can't run an applet
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 24
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:230
Article PK: 251982

I am working on an applet that accesses a database on a different server
than the machine the web server is on. While we were trying to get the
proxy server working, we put a small test dB on the main server so we
could test our applet and it was a little tricky to get working - having
to copy over the sybase files ourselves, but we got it working and it
accessed this test dB just fine. Now we have the proxy server running
so we changed the code to access it and now I get an error:
Applet can't start: java.lang.NoClassDefFoundError:
jdbc/sybase/jdbc/SybConnection
Now I do have the jdbc.sybase.jdbc.SybConnection.class in the right
place for it to find it but it's not finding it. That was the Netscape
error. In IE it did start but I got an IOException that said there was
no suitable driver.

Does anyone have any suggestions for fixing this problem?
-Vanessa L. Sikkema
-Business Systems Resources, Inc.


Lance Andersen Posted on 1997-09-29 15:23:11.0Z
Message-ID: <342FC7DF.2841@sybase.com>
Date: Mon, 29 Sep 1997 11:23:11 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
To: sikkema@bsr.com
Subject: Re: can't run an applet
References: <342BE3DC.778DA69C@bsr.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 41
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:223
Article PK: 251977


Vanessa L. Sikkema wrote:
>
> I am working on an applet that accesses a database on a different server
> than the machine the web server is on. While we were trying to get the
> proxy server working, we put a small test dB on the main server so we
> could test our applet and it was a little tricky to get working - having
> to copy over the sybase files ourselves, but we got it working and it
> accessed this test dB just fine. Now we have the proxy server running
> so we changed the code to access it and now I get an error:
> Applet can't start: java.lang.NoClassDefFoundError:
> jdbc/sybase/jdbc/SybConnection
> Now I do have the jdbc.sybase.jdbc.SybConnection.class in the right
> place for it to find it but it's not finding it. That was the Netscape
> error. In IE it did start but I got an IOException that said there was
> no suitable driver.
>
> Does anyone have any suggestions for fixing this problem?
> -Vanessa L. Sikkema
> -Business Systems Resources, Inc.

The codebase for your applet must also contain the jConnect classes.

I would reccommend placing your applet in $JDBC_HOME/classes and
creating an alias to it within you webserver.
--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Technical Support Phone:(617) 564-6336
77 South Bedford Street Fax: (617) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================


Vanessa L. Sikkema Posted on 1997-09-29 17:08:19.0Z
Message-ID: <342FE083.17F402A7@bsr.com>
Date: Mon, 29 Sep 1997 13:08:19 -0400
From: "Vanessa L. Sikkema" <sikkema@bsr.com>
Reply-To: sikkema@bsr.com
Organization: BSR
X-Mailer: Mozilla 4.01 [en] (WinNT; I)
MIME-Version: 1.0
To: Lance Andersen <lancea@sybase.com>
Subject: Re: can't run an applet
X-Priority: 3 (Normal)
References: <342BE3DC.778DA69C@bsr.com> <342FC7DF.2841@sybase.com>
Content-Type: multipart/alternative; boundary="------------4551DC574132D0CC5B75CCC0"
Newsgroups: sybase.public.jdbcconnect
Lines: 47
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:220
Article PK: 251971

You suggested I put the applet in the jdbchoome\classes\ folder.  Am I right in assuming that what that accomplishes is that the jdbc class files I need will be directly off of the root directory I am running in and therefore the applet will look in these directories to find them?  If that's the case then that has already been accomplished.  I copied all of the jdbc class files to the applet's root directory (using their folders of course) so they should be in my applet's codebase already.  Any other ideas?  I keep hearing about CLASSPATH and my applet works if I set my CLASSPATH to the jdbc classes folder but I do not want all of my users to have to set their CLASSPATH's.  That is just unnecessary.  How can I solve this?
-Vanessa


David Clegg Posted on 1997-09-29 17:49:40.0Z
Message-ID: <342FEA34.71347BD1@sybase.com>
Date: Mon, 29 Sep 1997 10:49:40 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 3.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: sikkema@bsr.com
Subject: Re: can't run an applet
References: <342BE3DC.778DA69C@bsr.com> <342FC7DF.2841@sybase.com> <342FE083.17F402A7@bsr.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 48
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:218
Article PK: 251969

CODEBASE should be an absolute path (starts with '/') which finds
the top of your classfile package hierarchy relative to your
webserver's "root" directory for html documents. If you put
the entire classfile tree under the same directory as the .html
file which contains your APPLET tag, then you don't need to specify
CODEBASE (codebase defaults to the path of the .html file that
contains the applet tag).

I'd recommend doing something like:



...
\
htmlRoot
/ \
classes applets
/ \ \
com localApplets myApplet.html
/ \
sybase MyApplet.class
/ | \
jdbc ...
/
SybDriver.class, ...

The file myApplet.html would contain
<APPLET
CODE=localApplets.MyApplet.class
CODEBASE=/classes
WIDTH=X, HEIGHT=Y> ... </APPLET>

Your applet would start with 'package localApplets;'
and your users would launch the MyApplet applet via the URL
http:<yourwebserver>/applets/myApplet.html


dave

> You suggested I put the applet in the jdbchoome\classes\ folder. Am I
> right in assuming that what that accomplishes is that the jdbc class
> files I need will be directly off of the root directory I am running
> in and therefore the applet will look in these directories to find
> them? If that's the case then that has already been accomplished. I
> copied all of the jdbc class files to the applet's root directory
> (using their folders of course) so they should be in my applet's
> codebase already. Any other ideas? I keep hearing about CLASSPATH
> and my applet works if I set my CLASSPATH to the jdbc classes folder
> but I do not want all of my users to have to set their CLASSPATH's.
> That is just unnecessary. How can I solve this?
> -Vanessa


Vanessa L. Sikkema Posted on 1997-09-29 18:10:03.0Z
Message-ID: <342FEEFB.B0022D6F@bsr.com>
Date: Mon, 29 Sep 1997 14:10:03 -0400
From: "Vanessa L. Sikkema" <sikkema@bsr.com>
Reply-To: sikkema@bsr.com
Organization: BSR
X-Mailer: Mozilla 4.01 [en] (WinNT; I)
MIME-Version: 1.0
To: David Clegg <davec@sybase.com>
Subject: Re: can't run an applet
X-Priority: 3 (Normal)
References: <342BE3DC.778DA69C@bsr.com> <342FC7DF.2841@sybase.com> <342FE083.17F402A7@bsr.com> <342FEA34.71347BD1@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 16
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:217
Article PK: 251968

That is a nice way to set up the applets but since I am not the
webmaster I do not have much control over it. Also, this still does not
explain why my applet is not working. Here is the directory right now:

WWWRoot:
--->AppletRoot including applet.html and applet.jar, etc.
--->jdbc
--->sybase
--->jdbc w/ class files
--->other jdbc subdirectories
--->sunw
--->powersoft

Also, when I set my classpath the applet works. Do you know of any way
to set the classpath for wherever the applet is being run?
-Vanessa


Lance Andersen Posted on 1997-09-30 12:17:21.0Z
Message-ID: <3430EDD1.1FC3@sybase.com>
Date: Tue, 30 Sep 1997 08:17:21 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
To: sikkema@bsr.com
Subject: Re: can't run an applet
References: <342BE3DC.778DA69C@bsr.com> <342FC7DF.2841@sybase.com> <342FE083.17F402A7@bsr.com> <342FEA34.71347BD1@sybase.com> <342FEEFB.B0022D6F@bsr.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 33
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:212
Article PK: 251963


Vanessa L. Sikkema wrote:
>
> That is a nice way to set up the applets but since I am not the
> webmaster I do not have much control over it. Also, this still does not
> explain why my applet is not working. Here is the directory right now:
>
> WWWRoot:
> --->AppletRoot including applet.html and applet.jar, etc.
> --->jdbc
> --->sybase
> --->jdbc w/ class files
> --->other jdbc subdirectories
> --->sunw
> --->powersoft
>
> Also, when I set my classpath the applet works. Do you know of any way
> to set the classpath for wherever the applet is being run?
> -Vanessa

You need to have the jConnect classes within your codebase as
dave or I described. I am not aware of any webservers that allow
you to set a CLASSPATH that will be used for applets that it is serving.

regards,

-lance
--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Technical Support Phone:(617) 564-6336
77 South Bedford Street Fax: (617) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================