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.

Problems Java Option

3 posts in General Discussion Last posting was on 2005-07-31 18:13:12.0Z
Edgar Rodriguez Posted on 2005-07-30 23:49:36.0Z
Sender: 6d58.42ec0d74.1804289383@sybase.com
From: Edgar Rodriguez
Newsgroups: ianywhere.public.general
Subject: Problems Java Option
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <42ec120d.6d78.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 30 Jul 2005 16:49:33 -0700, 10.22.241.42
Lines: 19
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 30 Jul 2005 16:49:34 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 30 Jul 2005 16:49:36 -0700
X-Trace: forums-1-dub 1122767376 10.22.108.75 (30 Jul 2005 16:49:36 -0700)
X-Original-Trace: 30 Jul 2005 16:49:36 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4657
Article PK: 8464

I working with SQL Anywhere 9. The version of the plugin
Adaptative Server Anywhere 9.0.1.1751. I then obtained the
key to install Java in the database. After activate the Java
option load my test class success. I then tried to check
that Java would run in the database by executing SELECT
java.lang.Math.abs(-342), which resulted in the following
ISQL error:

Could not execute the statement.
'java.lang.Math.abs' is not a public Java reference, and
cannot be referenced from SQL
SQLCODE=-763, ODBC 3 State="HY000"

So, what do I need to do to get Java working in the
database?

Thanking for its quick answer

Lic. Edgar J. Rodriguez


Shuchit Posted on 2005-07-31 03:03:03.0Z
Newsgroups: ianywhere.public.general
Subject: Re: Problems Java Option
From: Shuchit <me@privacy.net>
References: <42ec120d.6d78.1681692777@sybase.com>
Message-ID: <Xns96A3EA711C050svelkarprivacynet@127.0.0.1>
User-Agent: Xnews/??.01.30 Hamster/2.0.6.0
X-Original-NNTP-Posting-Host: cpe0080c6ee7d81-cm024340006571.cpe.net.cable.rogers.com
X-Original-Trace: 30 Jul 2005 20:03:00 -0700, cpe0080c6ee7d81-cm024340006571.cpe.net.cable.rogers.com
Lines: 23
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 30 Jul 2005 20:03:01 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 30 Jul 2005 20:03:03 -0700
X-Trace: forums-1-dub 1122778983 10.22.108.75 (30 Jul 2005 20:03:03 -0700)
X-Original-Trace: 30 Jul 2005 20:03:03 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4659
Article PK: 8463


Edgar Rodriguez wrote in news:42ec120d.6d78.1681692777@sybase.com:

> I working with SQL Anywhere 9. The version of the plugin
> Adaptative Server Anywhere 9.0.1.1751. I then obtained the
> key to install Java in the database. After activate the Java
> option load my test class success. I then tried to check
> that Java would run in the database by executing SELECT
> java.lang.Math.abs(-342), which resulted in the following
> ISQL error:
>
> Could not execute the statement.
> 'java.lang.Math.abs' is not a public Java reference, and
> cannot be referenced from SQL
> SQLCODE=-763, ODBC 3 State="HY000"
>
> So, what do I need to do to get Java working in the
> database?
>

How did you build the database ? You need to explicitly specify option to
include java clases when creating the database.

Shuchit


Edgar Rodriguez Posted on 2005-07-31 18:13:12.0Z
Sender: 6d58.42ec0d74.1804289383@sybase.com
From: Edgar Rodriguez
Newsgroups: ianywhere.public.general
Subject: Re: Problems Java Option
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <42ed14b2.111d.1681692777@sybase.com>
References: <Xns96A3EA711C050svelkarprivacynet@127.0.0.1>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 31 Jul 2005 11:13:06 -0700, 10.22.241.42
Lines: 39
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 31 Jul 2005 11:13:09 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 31 Jul 2005 11:13:12 -0700
X-Trace: forums-1-dub 1122833592 10.22.108.75 (31 Jul 2005 11:13:12 -0700)
X-Original-Trace: 31 Jul 2005 11:13:12 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4660
Article PK: 8466

The tool that I am using is Sybase Central. There it appears
a folder whereupon it contains all the classes that are
installed in the data base, including java.lang.Math.

To execute the instruction "SELECT java.lang.Math.abs(-342)"
I use Interactive SQL. I do not understand that other
information needs, since this class comes installed when
activating the option Java.

Thanks for their answer and would thank too much for a guide
to use Java objects directly in the data base.

Lic. Edgar José Rodriguez Rivero

> Edgar Rodriguez wrote in
> news:42ec120d.6d78.1681692777@sybase.com:
>
> > I working with SQL Anywhere 9. The version of the plugin
> > Adaptative Server Anywhere 9.0.1.1751. I then obtained
> > the key to install Java in the database. After activate
> > the Java option load my test class success. I then tried
> > to check that Java would run in the database by
> > executing SELECT java.lang.Math.abs(-342), which
> > resulted in the following ISQL error:
> >
> > Could not execute the statement.
> > 'java.lang.Math.abs' is not a public Java reference, and
> > cannot be referenced from SQL
> > SQLCODE=-763, ODBC 3 State="HY000"
> >
> > So, what do I need to do to get Java working in the
> > database?
> >
>
> How did you build the database ? You need to explicitly
> specify option to include java clases when creating the
> database.
>
> Shuchit