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.

JVM in ASE can't support java.net ?

6 posts in General Discussion Last posting was on 2012-02-21 02:03:40.0Z
Eisen Posted on 2012-02-17 06:49:47.0Z
Sender: 3b8.4f3df3c8.1804289383@sybase.com
From: Eisen
Newsgroups: sybase.public.ase.general
Subject: JVM in ASE can't support java.net ?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f3df88b.4f1.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 16 Feb 2012 22:49:47 -0800
X-Trace: forums-1-dub 1329461387 172.20.134.41 (16 Feb 2012 22:49:47 -0800)
X-Original-Trace: 16 Feb 2012 22:49:47 -0800, 172.20.134.41
Lines: 17
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30923
Article PK: 73813

Dear all
Today, I wrote a little java class to send email, I use
installjava to pack it into a ASE15.0.3 ESD#4 successfully,
but when I run it, there's error raised --
java.lang.NoClassDefFoundError: java.net.SocksSocketImpl
(initialization failure)

But as I checked the manual -- Java in Apative Server
Enterise -- it was said "Adaptive Server supports all
standard Java classes in the database. " and the java.net is
abusolutely a standard java classes in JDK1.6. I think it
should be due to my configuration. But I've already enabled
both PCI and JAVA with sp_configure, I don't know what to do
next. Woud anyone help to solve this issue? Thanks a lot.

Best Regards
Eisen


Eisen Posted on 2012-02-17 08:26:36.0Z
Sender: 3b8.4f3df3c8.1804289383@sybase.com
From: Eisen
Newsgroups: sybase.public.ase.general
Subject: Re: JVM in ASE can't support java.net ?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f3e0f3c.992.1681692777@sybase.com>
References: <4f3df88b.4f1.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 17 Feb 2012 00:26:36 -0800
X-Trace: forums-1-dub 1329467196 172.20.134.41 (17 Feb 2012 00:26:36 -0800)
X-Original-Trace: 17 Feb 2012 00:26:36 -0800, 172.20.134.41
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30924
Article PK: 73815

I made some check myself -- I checked the jar in the Manual
said-- when I checked the
$SYBASE/shared/<jre_directory>/lib/rt.jar
I found the java.net package were actually inside this
jar...
it surely appeared that some configuration is incorrect
while I enabled PCI and JAVA in ASE...
Best Regards
Eisen

> Dear all
> Today, I wrote a little java class to send email, I use
> installjava to pack it into a ASE15.0.3 ESD#4 successfully
> , but when I run it, there's error raised --
> java.lang.NoClassDefFoundError: java.net.SocksSocketImpl
> (initialization failure)
>
> But as I checked the manual -- Java in Apative Server
> Enterise -- it was said "Adaptive Server supports all
> standard Java classes in the database. " and the java.net
> is abusolutely a standard java classes in JDK1.6. I think
> it should be due to my configuration. But I've already
> enabled both PCI and JAVA with sp_configure, I don't know
> what to do next. Woud anyone help to solve this issue?
> Thanks a lot.
>
> Best Regards
> Eisen


Rob V Posted on 2012-02-17 13:21:19.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: JVM in ASE can't support java.net ?
References: <4f3df88b.4f1.1681692777@sybase.com> <4f3e0f3c.992.1681692777@sybase.com>
In-Reply-To: <4f3e0f3c.992.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f3e544f$1@forums-1-dub>
Date: 17 Feb 2012 05:21:19 -0800
X-Trace: forums-1-dub 1329484879 10.22.241.152 (17 Feb 2012 05:21:19 -0800)
X-Original-Trace: 17 Feb 2012 05:21:19 -0800, vip152.sybase.com
Lines: 63
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30925
Article PK: 73814


On 17-Feb-2012 09:26, Eisen wrote:
> I made some check myself -- I checked the jar in the Manual
> said-- when I checked the
> $SYBASE/shared/<jre_directory>/lib/rt.jar
> I found the java.net package were actually inside this
> jar...
> it surely appeared that some configuration is incorrect
> while I enabled PCI and JAVA in ASE...
> Best Regards
> Eisen
>> Dear all
>> Today, I wrote a little java class to send email, I use
>> installjava to pack it into a ASE15.0.3 ESD#4 successfully
>> , but when I run it, there's error raised --
>> java.lang.NoClassDefFoundError: java.net.SocksSocketImpl
>> (initialization failure)
>>
>> But as I checked the manual -- Java in Apative Server
>> Enterise -- it was said "Adaptive Server supports all
>> standard Java classes in the database. " and the java.net
>> is abusolutely a standard java classes in JDK1.6. I think
>> it should be due to my configuration. But I've already
>> enabled both PCI and JAVA with sp_configure, I don't know
>> what to do next. Woud anyone help to solve this issue?
>> Thanks a lot.
>>
>> Best Regards
>> Eisen

The way you should do this is by using the native libraries as follows:

sp_jreconfig 'enable', 'pca_jvm_netio'
go

sp_jreconfig "add", "pca_jvm_java_option", "-Dsybase.allow.native.lib=true"
go

... and then reboot your ASE server.

See the documentation at
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc31652.1570/html/java/CHDBDBDI.htm
.


--
HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide" (new!)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


Eisen Posted on 2012-02-20 01:55:31.0Z
Sender: 3f07.4f41994e.1804289383@sybase.com
From: Eisen
Newsgroups: sybase.public.ase.general
Subject: Re: JVM in ASE can't support java.net ?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f41a813.4124.1681692777@sybase.com>
References: <4f3e544f$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 19 Feb 2012 17:55:31 -0800
X-Trace: forums-1-dub 1329702931 172.20.134.41 (19 Feb 2012 17:55:31 -0800)
X-Original-Trace: 19 Feb 2012 17:55:31 -0800, 172.20.134.41
Lines: 99
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30926
Article PK: 73816

Hi Rob
Thanks a lot for your help. It works. But my Java still
failed due to some unknow issue -- for the error message
were truncated as:
Msg 10707, Level 16, State 1:
Server 'sybwpmdr00', Line 3:
Unhandled Java Exception:
org.apache.commons.mail.EmailException: Sending the
email to the following server failed :
shadcmail01.wpmikz.com.cn:25
at
org.apache.commons.mail.Email.sendMimeMessage(Email.java:1138)
at
org.apache.commons.mail.Email.send(Email.java:1163)
at
eisen.util.MailManager.mailto(MailManager.java:82)
at
eisen.util.MailManager.mailto(MailManager.java:103)
Caused by:
javax.mail.MessagingException: IOException while sending
message;
nested
exception is:
ja.

Would you please tell me how to set the error message's
max lengthe? Thanks

Best Regards
Eisen

> On 17-Feb-2012 09:26, Eisen wrote:
> > I made some check myself -- I checked the jar in the
> > Manual said-- when I checked the
> > $SYBASE/shared/<jre_directory>/lib/rt.jar
> > I found the java.net package were actually inside
> > this jar...
> > it surely appeared that some configuration is
> > incorrect while I enabled PCI and JAVA in ASE...
> > Best Regards
> > Eisen
> >> Dear all
> >> Today, I wrote a little java class to send email, I
> use >> installjava to pack it into a ASE15.0.3 ESD#4
> successfully >> , but when I run it, there's error raised
> -- >> java.lang.NoClassDefFoundError:
> java.net.SocksSocketImpl >> (initialization failure)
> >>
> >> But as I checked the manual -- Java in Apative
> Server >> Enterise -- it was said "Adaptive Server
> supports all >> standard Java classes in the database. "
> and the java.net >> is abusolutely a standard java classes
> in JDK1.6. I think >> it should be due to my
> configuration. But I've already >> enabled both PCI and
> JAVA with sp_configure, I don't know >> what to do next.
> Woud anyone help to solve this issue? >> Thanks a lot.
> >>
> >> Best Regards
> >> Eisen
>
>
> The way you should do this is by using the native
> libraries as follows:
>
> sp_jreconfig 'enable', 'pca_jvm_netio'
> go
>
> sp_jreconfig "add", "pca_jvm_java_option",
> "-Dsybase.allow.native.lib=true" go
>
> ... and then reboot your ASE server.
>
> See the documentation at
>
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc31652.1570/html/java/CHDBDBDI.htm
> .
>
>
> --
> HTH,
>
> Rob V.
> ----------------------------------------------------------
> ------- Rob Verschoor
>
> Certified Professional DBA for Sybase ASE, IQ, Replication
> Server
>
> Author of Sybase books (order online at
> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
> ASE" "The Complete Sybase IQ Quick Reference Guide" (new!)
> "The Complete Sybase ASE Quick Reference Guide"
> "The Complete Sybase Replication Server Quick Reference
> Guide"
>
> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
> Commerce 27138666
> ----------------------------------------------------------
> -------


Rob V Posted on 2012-02-20 11:27:44.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: JVM in ASE can't support java.net ?
References: <4f3e544f$1@forums-1-dub> <4f41a813.4124.1681692777@sybase.com>
In-Reply-To: <4f41a813.4124.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f422e30@forums-1-dub>
Date: 20 Feb 2012 03:27:44 -0800
X-Trace: forums-1-dub 1329737264 10.22.241.152 (20 Feb 2012 03:27:44 -0800)
X-Original-Trace: 20 Feb 2012 03:27:44 -0800, vip152.sybase.com
Lines: 127
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30928
Article PK: 73818

I consulted our JVM guru and he said the core problem here is that you
get an IOException (either due to a catch programmed by yourself or by a
condition in the existing libraries). This means the javax.mail ran into
an error while trying to send.

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide" (new!)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------

On 20-Feb-2012 02:55, Eisen wrote:
> Hi Rob
> Thanks a lot for your help. It works. But my Java still
> failed due to some unknow issue -- for the error message
> were truncated as:
> Msg 10707, Level 16, State 1:
> Server 'sybwpmdr00', Line 3:
> Unhandled Java Exception:
> org.apache.commons.mail.EmailException: Sending the
> email to the following server failed :
> shadcmail01.wpmikz.com.cn:25
> at
> org.apache.commons.mail.Email.sendMimeMessage(Email.java:1138)
> at
> org.apache.commons.mail.Email.send(Email.java:1163)
> at
> eisen.util.MailManager.mailto(MailManager.java:82)
> at
> eisen.util.MailManager.mailto(MailManager.java:103)
> Caused by:
> javax.mail.MessagingException: IOException while sending
> message;
> nested
> exception is:
> ja.
>
> Would you please tell me how to set the error message's
> max lengthe? Thanks
>
> Best Regards
> Eisen
>> On 17-Feb-2012 09:26, Eisen wrote:
>>> I made some check myself -- I checked the jar in the
>>> Manual said-- when I checked the
>>> $SYBASE/shared/<jre_directory>/lib/rt.jar
>>> I found the java.net package were actually inside
>>> this jar...
>>> it surely appeared that some configuration is
>>> incorrect while I enabled PCI and JAVA in ASE...
>>> Best Regards
>>> Eisen
>>>> Dear all
>>>> Today, I wrote a little java class to send email, I
>> use>> installjava to pack it into a ASE15.0.3 ESD#4
>> successfully>> , but when I run it, there's error raised
>> -- >> java.lang.NoClassDefFoundError:
>> java.net.SocksSocketImpl>> (initialization failure)
>>>>
>>>> But as I checked the manual -- Java in Apative
>> Server>> Enterise -- it was said "Adaptive Server
>> supports all>> standard Java classes in the database. "
>> and the java.net>> is abusolutely a standard java classes
>> in JDK1.6. I think>> it should be due to my
>> configuration. But I've already>> enabled both PCI and
>> JAVA with sp_configure, I don't know>> what to do next.
>> Woud anyone help to solve this issue?>> Thanks a lot.
>>>>
>>>> Best Regards
>>>> Eisen
>>
>>
>> The way you should do this is by using the native
>> libraries as follows:
>>
>> sp_jreconfig 'enable', 'pca_jvm_netio'
>> go
>>
>> sp_jreconfig "add", "pca_jvm_java_option",
>> "-Dsybase.allow.native.lib=true" go
>>
>> ... and then reboot your ASE server.
>>
>> See the documentation at
>>
> http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc31652.1570/html/java/CHDBDBDI.htm
>> .
>>
>>
>> --
>> HTH,
>>
>> Rob V.
>> ----------------------------------------------------------
>> ------- Rob Verschoor
>>
>> Certified Professional DBA for Sybase ASE, IQ, Replication
>> Server
>>
>> Author of Sybase books (order online at
>> www.sypron.nl/shop): "Tips, Tricks& Recipes for Sybase
>> ASE" "The Complete Sybase IQ Quick Reference Guide" (new!)
>> "The Complete Sybase ASE Quick Reference Guide"
>> "The Complete Sybase Replication Server Quick Reference
>> Guide"
>>
>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
>> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
>> Commerce 27138666
>> ----------------------------------------------------------
>> -------


Eisen Posted on 2012-02-21 02:03:40.0Z
Sender: 794b.4f42f9c1.1804289383@sybase.com
From: Eisen
Newsgroups: sybase.public.ase.general
Subject: Re: JVM in ASE can't support java.net ?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f42fb7c.7995.1681692777@sybase.com>
References: <4f422e30@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 20 Feb 2012 18:03:40 -0800
X-Trace: forums-1-dub 1329789820 172.20.134.41 (20 Feb 2012 18:03:40 -0800)
X-Original-Trace: 20 Feb 2012 18:03:40 -0800, 172.20.134.41
Lines: 146
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30930
Article PK: 73822

Hi, Rob
Thanks a lot. Yes, I know it's sth. wrong, but what I
mean is I want to catch this IOException error message, but
it seems that ASE truncated the error message, so that I
only got part of it. So I'm thinking if there any way to set
the error message's max length to show on isql or put it
into some debug table? Thanks

Best Regards
Eisen

> I consulted our JVM guru and he said the core problem here
> is that you get an IOException (either due to a catch
> programmed by yourself or by a condition in the existing
> libraries). This means the javax.mail ran into an error
> while trying to send.
>
> HTH,
>
> Rob V.
> ----------------------------------------------------------
> ------- Rob Verschoor
>
> Certified Professional DBA for Sybase ASE, IQ, Replication
> Server
>
> Author of Sybase books (order online at
> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
> ASE" "The Complete Sybase IQ Quick Reference Guide" (new!)
> "The Complete Sybase ASE Quick Reference Guide"
> "The Complete Sybase Replication Server Quick Reference
> Guide"
>
> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
> Commerce 27138666
> ----------------------------------------------------------
> -------
>
>
> On 20-Feb-2012 02:55, Eisen wrote:
> > Hi Rob
> > Thanks a lot for your help. It works. But my Java
> > still failed due to some unknow issue -- for the error
> > message were truncated as:
> > Msg 10707, Level 16, State 1:
> > Server 'sybwpmdr00', Line 3:
> > Unhandled Java Exception:
> > org.apache.commons.mail.EmailException: Sending the
> > email to the following server failed :
> > shadcmail01.wpmikz.com.cn:25
> > at
> >
> org.apache.commons.mail.Email.sendMimeMessage(Email.java:1
> > 138) at
> > org.apache.commons.mail.Email.send(Email.java:1163)
> > at
> > eisen.util.MailManager.mailto(MailManager.java:82)
> > at
> > eisen.util.MailManager.mailto(MailManager.java:103)
> > Caused by:
> > javax.mail.MessagingException: IOException while sending
> > message;
> > nested
> > exception is:
> > ja.
> >
> > Would you please tell me how to set the error
> > message's max lengthe? Thanks
> >
> > Best Regards
> > Eisen
> >> On 17-Feb-2012 09:26, Eisen wrote:
> >>> I made some check myself -- I checked the jar in the
> >>> Manual said-- when I checked the
> >>> $SYBASE/shared/<jre_directory>/lib/rt.jar
> >>> I found the java.net package were actually inside
> >>> this jar...
> >>> it surely appeared that some configuration is
> >>> incorrect while I enabled PCI and JAVA in ASE...
> >>> Best Regards
> >>> Eisen
> >>>> Dear all
> >>>> Today, I wrote a little java class to send email
> , I >> use>> installjava to pack it into a ASE15.0.3
> ESD#4 >> successfully>> , but when I run it, there's
> error raised >> -- >> java.lang.NoClassDefFoundError:
> >> java.net.SocksSocketImpl>> (initialization failure)
> >>>>
> >>>> But as I checked the manual -- Java in Apative
> >> Server>> Enterise -- it was said "Adaptive Server
> >> supports all>> standard Java classes in the database.
> " >> and the java.net>> is abusolutely a standard java
> classes >> in JDK1.6. I think>> it should be due to my
> >> configuration. But I've already>> enabled both PCI and
> >> JAVA with sp_configure, I don't know>> what to do
> next. >> Woud anyone help to solve this issue?>> Thanks a
> lot. >>>>
> >>>> Best Regards
> >>>> Eisen
> >>
> >>
> >> The way you should do this is by using the native
> >> libraries as follows:
> >>
> >> sp_jreconfig 'enable', 'pca_jvm_netio'
> >> go
> >>
> >> sp_jreconfig "add", "pca_jvm_java_option",
> >> "-Dsybase.allow.native.lib=true" go
> >>
> >> ... and then reboot your ASE server.
> >>
> >> See the documentation at
> >>
> >
>
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc31652.1570/html/java/CHDBDBDI.htm
> >> .
> >>
> >>
> >> --
> >> HTH,
> >>
> >> Rob V.
> >>
> ----------------------------------------------------------
> >> ------- Rob Verschoor >>
> >> Certified Professional DBA for Sybase ASE, IQ,
> Replication >> Server
> >>
> >> Author of Sybase books (order online at
> >> www.sypron.nl/shop): "Tips, Tricks& Recipes for Sybase
> >> ASE" "The Complete Sybase IQ Quick Reference Guide"
> (new!) >> "The Complete Sybase ASE Quick Reference Guide"
> >> "The Complete Sybase Replication Server Quick Reference
> >> Guide"
> >>
> >> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> >> @rob_verschoor Sypron B.V., The Netherlands | Chamber
> of >> Commerce 27138666
> >>
> ----------------------------------------------------------
> >> -------
>
>
>