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.

[ASE15.5] No class def found when using select java.net.InetAddress.select java.net.InetAddress.getLocalHost()

5 posts in General Discussion Last posting was on 2011-04-05 16:43:30.0Z
blured Posted on 2011-03-30 20:59:22.0Z
Sender: 62bf.4d93750e.1804289383@sybase.com
From: blured
Newsgroups: sybase.public.ase.general
Subject: [ASE15.5] No class def found when using select java.net.InetAddress.select java.net.InetAddress.getLocalHost()
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4d9399aa.6924.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 30 Mar 2011 12:59:22 -0800
X-Trace: forums-1-dub 1301518762 10.22.241.41 (30 Mar 2011 12:59:22 -0800)
X-Original-Trace: 30 Mar 2011 12:59:22 -0800, 10.22.241.41
Lines: 23
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30084
Article PK: 79313

Hi,

Using the following statement (select
java.net.InetAddress.getLocalHost()) with of course java
activated on ASE 15.5, I've got the following error :
<<
Impossible d'exécuter l'instruction.
Unhandled Java Exception:
java.lang.NoClassDefFoundError: Could not
initialize class java.net.InetAddress
.
Code d'erreur Sybase=10707
Severity Level=16, State=1, Transaction State=1
Ligne 55
>>

It seems strange cause java.net.InetAddress is normally
present in the standard JRE.

Have you got any clues for that point ?

Regards,
Blured.


J Posted on 2011-03-31 15:28:22.0Z
From: jtotally_bogus@sbcglobal.net (J)
Newsgroups: sybase.public.ase.general
Subject: Re: [ASE15.5] No class def found when using select java.net.InetAddress.select java.net.InetAddress.getLocalHost()
Reply-To: J@bogusemailAddress.com
Message-ID: <4d949cd0.423036265@forums.sybase.com>
References: <4d9399aa.6924.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 31 Mar 2011 07:28:22 -0800
X-Trace: forums-1-dub 1301585302 10.22.241.152 (31 Mar 2011 07:28:22 -0800)
X-Original-Trace: 31 Mar 2011 07:28:22 -0800, vip152.sybase.com
Lines: 36
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30087
Article PK: 79316

On 30 Mar 2011 12:59:22 -0800, blured wrote:

Check sp_configure "enable java". Is it enabled? Check the
dataserver's log for messages related to pci and java.

What platform and version are you talking about? (select @@version).

You have enabled pci, set up the sybpcidb database and have good run
values for "enable pci" and "enable java" ??

Jay

>Hi,
>
>Using the following statement (select
>java.net.InetAddress.getLocalHost()) with of course java
>activated on ASE 15.5, I've got the following error :
><<
>Impossible d'ex=e9cuter l'instruction.
>Unhandled Java Exception:
>java.lang.NoClassDefFoundError: Could not
>initialize class java.net.InetAddress
>.
>Code d'erreur Sybase=3d10707
>Severity Level=3d16, State=3d1, Transaction State=3d1
>Ligne 55
>>>
>
>It seems strange cause java.net.InetAddress is normally
>present in the standard JRE.
>
>Have you got any clues for that point ?
>
>Regards,
>Blured.


blured Posted on 2011-04-04 12:51:17.0Z
Sender: 4d85.4d997ede.1804289383@sybase.com
From: blured
Newsgroups: sybase.public.ase.general
Subject: Re: [ASE15.5] No class def found when using select java.net.InetAddress.select java.net.InetAddress.getLocalHost()
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4d99bec5.554a.1681692777@sybase.com>
References: <4d949cd0.423036265@forums.sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Apr 2011 05:51:17 -0700
X-Trace: forums-1-dub 1301921477 10.22.241.41 (4 Apr 2011 05:51:17 -0700)
X-Original-Trace: 4 Apr 2011 05:51:17 -0700, 10.22.241.41
Lines: 46
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30091
Article PK: 79320


> On 30 Mar 2011 12:59:22 -0800, blured wrote:
>
> Check sp_configure "enable java". Is it enabled? Check
> the dataserver's log for messages related to pci and java.
>

Yes. No error inside dataserver logs message

> What platform and version are you talking about? (select
> @@version).
Adaptive Server Enterprise/15.5/EBF 18157 SMP ESD#2/P/NT
(IX86)/Windows 2003/asear155/2514/32-bit/OPT/Wed Aug 25
05:31:40 2010
>
> You have enabled pci, set up the sybpcidb database and
> have good run values for "enable pci" and "enable java" ??
>
Yes

Still got the ClassNotFound .

> Jay
>
> >Hi,
> >
> >Using the following statement (select
> >java.net.InetAddress.getLocalHost()) with of course java
> >activated on ASE 15.5, I've got the following error :
> ><<
> >Impossible d'ex=e9cuter l'instruction.
> >Unhandled Java Exception:
> >java.lang.NoClassDefFoundError: Could not
> >initialize class java.net.InetAddress
> >.
> >Code d'erreur Sybase=3d10707
> >Severity Level=3d16, State=3d1, Transaction State=3d1
> >Ligne 55
> >>>
> >
> >It seems strange cause java.net.InetAddress is normally
> >present in the standard JRE.
> >
> >Have you got any clues for that point ?
> >
> >Regards,
> >Blured.
>


J Posted on 2011-04-04 17:35:51.0Z
From: jtotally_bogus@sbcglobal.net (J)
Newsgroups: sybase.public.ase.general
Subject: Re: [ASE15.5] No class def found when using select java.net.InetAddress.select java.net.InetAddress.getLocalHost()
Reply-To: J@bogusemailAddress.com
Message-ID: <4d99e38e.768826531@forums.sybase.com>
References: <4d949cd0.423036265@forums.sybase.com> <4d99bec5.554a.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 4 Apr 2011 10:35:51 -0700
X-Trace: forums-1-dub 1301938551 10.22.241.152 (4 Apr 2011 10:35:51 -0700)
X-Original-Trace: 4 Apr 2011 10:35:51 -0700, vip152.sybase.com
Lines: 130
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30092
Article PK: 79321

On 4 Apr 2011 05:51:17 -0700, blured wrote:

Ok. I tried your particular version and I had a permissions problem
also but it was not ClassnotFound error. After the initial
permissions Exception, I would get "Class not found".

1> select java.net.InetAddress.getLocalHost()
2> go
java.lang.ExceptionInInitializerError
Caused by: java.lang.SecurityException: Cannot load native libraries
from within a user Task!

java.lang.ExceptionInInitializerError
Caused by: java.lang.SecurityException: Cannot load native libraries
from within

a user Task!
at
sybase.aseutils.PCAJvmSecurityManager.checkLink(PCAJvmSecurityManager.java:123)
at java.lang.Runtime.loadLibrary0(Runtime.java:817)
at java.lang.System.loadLibrary(System.java:1030)
at
sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.InetAddress.<clinit>(InetAddress.java:215)
Msg 10707, Level 16, State 1:
Server 'JANDERSXP_155', Line 1:
Unhandled Java Exception:
java.lang.ExceptionInInitializerError
Caused by:
java.lang.SecurityException: Cannot load native libraries from within
a user
Task!
at
sybase.aseutils.PCAJvmSecurityManager.checkLink(PCAJvmSecurityManager.java:123)
at java.lang.Runtime.loadLibrary0(Runtime.java:817)
at java.lang.System.loadLibrary(System.java:1030)
at
sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Met.


Even after this error I could perform other java operations in the
dataserver. e.g.

1> select java.lang.Math.sqrt(2)
2> go

---------------------------
1.414214

(1 row affected)

After a bit more reseach I found that I needed to do the following:

1> use sybpcidb
2> go
1> sp_jreconfig "add", "pca_jvm_java_option",
"-Dsybase.allow.native.lib=true"
2> go
(return status = 0)
1> shutdown
2> go
Server SHUTDOWN by request.
ASE is terminating this process.
CT-LIBRARY error:
ct_results(): network packet layer: internal net library
error: Net-Libr
ary operation terminated due to disconnect\

recycle server at this point.

C:\sybase\ase155\ASE-15_0\scripts>isql -Usa -P -Sjandersxp_155
1> select java.net.InetAddress.getLocalHost()
2> go

--------------------------------------------------
JANDERS-XP/10.22.79.104

(1 row affected)

Jay

>> On 30 Mar 2011 12:59:22 -0800, blured wrote:
>>
>> Check sp_configure "enable java". Is it enabled? Check
>> the dataserver's log for messages related to pci and java.
>>
>Yes. No error inside dataserver logs message
>
>> What platform and version are you talking about? (select
>> @@version).
>Adaptive Server Enterprise/15.5/EBF 18157 SMP ESD#2/P/NT
>(IX86)/Windows 2003/asear155/2514/32-bit/OPT/Wed Aug 25
>05:31:40 2010
>>
>> You have enabled pci, set up the sybpcidb database and
>> have good run values for "enable pci" and "enable java" ??
>>
>Yes
>
>Still got the ClassNotFound .
>
>> Jay
>>
>> >Hi,
>> >
>> >Using the following statement (select
>> >java.net.InetAddress.getLocalHost()) with of course java
>> >activated on ASE 15.5, I've got the following error :
>> ><<
>> >Impossible d'ex=e9cuter l'instruction.
>> >Unhandled Java Exception:
>> >java.lang.NoClassDefFoundError: Could not
>> >initialize class java.net.InetAddress
>> >.
>> >Code d'erreur Sybase=3d10707
>> >Severity Level=3d16, State=3d1, Transaction State=3d1
>> >Ligne 55
>> >>>
>> >
>> >It seems strange cause java.net.InetAddress is normally
>> >present in the standard JRE.
>> >
>> >Have you got any clues for that point ?
>> >
>> >Regards,
>> >Blured.
>>


blured Posted on 2011-04-05 16:43:30.0Z
Sender: 4d85.4d997ede.1804289383@sybase.com
From: blured
Newsgroups: sybase.public.ase.general
Subject: Re: [ASE15.5] No class def found when using select java.net.InetAddress.select java.net.InetAddress.getLocalHost()
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4d9b46b2.acd.1681692777@sybase.com>
References: <4d99e38e.768826531@forums.sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Apr 2011 09:43:30 -0700
X-Trace: forums-1-dub 1302021810 10.22.241.41 (5 Apr 2011 09:43:30 -0700)
X-Original-Trace: 5 Apr 2011 09:43:30 -0700, 10.22.241.41
Lines: 138
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30093
Article PK: 79322

Thanks it is working now

> On 4 Apr 2011 05:51:17 -0700, blured wrote:
>
> Ok. I tried your particular version and I had a
> permissions problem also but it was not ClassnotFound
> error. After the initial permissions Exception, I would
> get "Class not found".
>
> 1> select java.net.InetAddress.getLocalHost()
> 2> go
> java.lang.ExceptionInInitializerError
> Caused by: java.lang.SecurityException: Cannot load native
> libraries from within a user Task!
>
> java.lang.ExceptionInInitializerError
> Caused by: java.lang.SecurityException: Cannot load native
> libraries from within
>
> a user Task!
> at
> sybase.aseutils.PCAJvmSecurityManager.checkLink(PCAJvmSecu
> rityManager.java:123) at
> java.lang.Runtime.loadLibrary0(Runtime.java:817) at
> java.lang.System.loadLibrary(System.java:1030) at
> sun.security.action.LoadLibraryAction.run(LoadLibraryActio
> n.java:50) at
> java.security.AccessController.doPrivileged(Native Method)
> at java.net.InetAddress.<clinit>(InetAddress.java:215) Msg
> 10707, Level 16, State 1: Server 'JANDERSXP_155', Line 1:
> Unhandled Java Exception:
> java.lang.ExceptionInInitializerError
> Caused by:
> java.lang.SecurityException: Cannot load native libraries
> from within a user
> Task!
> at
> sybase.aseutils.PCAJvmSecurityManager.checkLink(PCAJvmSecu
> rityManager.java:123)
> at
> java.lang.Runtime.loadLibrary0(Runtime.java:817)
> at java.lang.System.loadLibrary(System.java:1030)
> at
> sun.security.action.LoadLibraryAction.run(LoadLibraryActio
> n.java:50)
> at
> java.security.AccessController.doPrivileged(Native Met.
>
>
> Even after this error I could perform other java
> operations in the dataserver. e.g.
>
> 1> select java.lang.Math.sqrt(2)
> 2> go
>
> ---------------------------
> 1.414214
>
> (1 row affected)
>
> After a bit more reseach I found that I needed to do the
> following:
>
> 1> use sybpcidb
> 2> go
> 1> sp_jreconfig "add", "pca_jvm_java_option",
> "-Dsybase.allow.native.lib=true"
> 2> go
> (return status = 0)
> 1> shutdown
> 2> go
> Server SHUTDOWN by request.
> ASE is terminating this process.
> CT-LIBRARY error:
> ct_results(): network packet layer: internal net
> library error: Net-Libr
> ary operation terminated due to disconnect\
>
> recycle server at this point.
>
> C:\sybase\ase155\ASE-15_0\scripts>isql -Usa -P
> -Sjandersxp_155 1> select
> java.net.InetAddress.getLocalHost() 2> go
>
> --------------------------------------------------
> JANDERS-XP/10.22.79.104
>
> (1 row affected)
>
> Jay
>
> >> On 30 Mar 2011 12:59:22 -0800, blured wrote:
> >>
> >> Check sp_configure "enable java". Is it enabled? Check
> >> the dataserver's log for messages related to pci and
> java. >>
> >Yes. No error inside dataserver logs message
> >
> >> What platform and version are you talking about?
> (select >> @@version).
> >Adaptive Server Enterprise/15.5/EBF 18157 SMP ESD#2/P/NT
> >(IX86)/Windows 2003/asear155/2514/32-bit/OPT/Wed Aug 25
> >05:31:40 2010
> >>
> >> You have enabled pci, set up the sybpcidb database and
> >> have good run values for "enable pci" and "enable java"
> ?? >>
> >Yes
> >
> >Still got the ClassNotFound .
> >
> >> Jay
> >>
> >> >Hi,
> >> >
> >> >Using the following statement (select
> >> >java.net.InetAddress.getLocalHost()) with of course
> java >> >activated on ASE 15.5, I've got the following
> error : >> ><<
> >> >Impossible d'ex=e9cuter l'instruction.
> >> >Unhandled Java Exception:
> >> >java.lang.NoClassDefFoundError: Could not
> >> >initialize class java.net.InetAddress
> >> >.
> >> >Code d'erreur Sybase=3d10707
> >> >Severity Level=3d16, State=3d1, Transaction State=3d1
> >> >Ligne 55
> >> >>>
> >> >
> >> >It seems strange cause java.net.InetAddress is
> normally >> >present in the standard JRE.
> >> >
> >> >Have you got any clues for that point ?
> >> >
> >> >Regards,
> >> >Blured.
> >>
>