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.

Java Enable

7 posts in General Discussion Last posting was on 2003-11-19 07:45:49.0Z
34u Posted on 2003-11-14 02:50:32.0Z
Message-ID: <3FB44109.7F32C4B@mail.hongkong.com>
From: 34u <34u34u@mail.hongkong.com>
X-Mailer: Mozilla 4.79 [en] (Win98; U)
X-Accept-Language: en,zh-TW,zh-CN,zh
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Java Enable
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 218.189.206.171
X-Original-Trace: 13 Nov 2003 18:56:05 -0800, 218.189.206.171
Lines: 11
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 13 Nov 2003 18:41:23 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 13 Nov 2003 18:50:32 -0800
X-Trace: forums-1-dub 1068778232 10.22.108.75 (13 Nov 2003 18:50:32 -0800)
X-Original-Trace: 13 Nov 2003 18:50:32 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2082
Article PK: 4299

I upgrade my database from version 5.x to ver.7 by
alter database upgrade java on jconnect on
But it is still cannot login and give me the following message.
java.sql.SQLException: JZ00L: Login failed.
Examine the SQLWarnings chained to this exception for the reason(s).

But I can connect by create a new database.
What's wrong?
Please help me!
Thank you for your help!


Chris Keating (iAnywhere Solutions) Posted on 2003-11-14 03:07:20.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <FightSpam_keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <3FB44109.7F32C4B@mail.hongkong.com>
Subject: Re: Java Enable
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: cpe00045af8ce8c-cm012059936305.cpe.net.cable.rogers.com
Message-ID: <3fb44832$1@forums-2-dub>
X-Original-Trace: 13 Nov 2003 19:12:50 -0800, cpe00045af8ce8c-cm012059936305.cpe.net.cable.rogers.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 13 Nov 2003 18:58:10 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 13 Nov 2003 19:07:20 -0800
X-Trace: forums-1-dub 1068779240 10.22.108.75 (13 Nov 2003 19:07:20 -0800)
X-Original-Trace: 13 Nov 2003 19:07:20 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2083
Article PK: 4300

What are the SQLWarnings chained to the exception. The real details to
solving the problem are contained in those warnings. Can you also provide
details regarding your connection properties as well as the start line for
the engine (if it is already running).

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

"34u" <34u34u@mail.hongkong.com> wrote in message
news:3FB44109.7F32C4B@mail.hongkong.com...
> I upgrade my database from version 5.x to ver.7 by
> alter database upgrade java on jconnect on
> But it is still cannot login and give me the following message.
> java.sql.SQLException: JZ00L: Login failed.
> Examine the SQLWarnings chained to this exception for the reason(s).
>
> But I can connect by create a new database.
> What's wrong?
> Please help me!
> Thank you for your help!
>


34u Posted on 2003-11-14 03:15:29.0Z
Message-ID: <3FB446E6.3029FD94@mail.hongkong.com>
From: 34u <34u34u@mail.hongkong.com>
X-Mailer: Mozilla 4.79 [en] (Win98; U)
X-Accept-Language: en,zh-TW,zh-CN,zh
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Java Enable
References: <3FB44109.7F32C4B@mail.hongkong.com> <3fb44832$1@forums-2-dub>
Content-Type: multipart/alternative; boundary="------------918A0BD50FCC29E270A5532E"
NNTP-Posting-Host: 218.189.206.171
X-Original-NNTP-Posting-Host: 218.189.206.171
Date: 13 Nov 2003 19:15:29 -0800
X-Trace: forums-1-dub 1068779729 218.189.206.171 (13 Nov 2003 19:15:29 -0800)
X-Original-Trace: 13 Nov 2003 19:15:29 -0800, 218.189.206.171
Lines: 139
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2084
Article PK: 4301

This is a part of my source code:

DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());
Connection con=DriverManager.getConnection("jdbc:sybase:Tds:192.168.0.230:49152/test","dba","sql");
PreparedStatement pstmt=con.prepareStatement("select table_name from systable");
ResultSet result=pstmt.executeQuery();
while (result.next()) {
  System.out.println(result.getString(1));
}
pstmt.close();

I think the source code is no problem.
Because instead of other database (created by ver. ) is okay!

Thank you!
 
 

"Chris Keating (iAnywhere Solutions)" wrote:

What are the SQLWarnings chained to the exception. The real details to
solving the problem are contained in those warnings. Can you also provide
details regarding your connection properties as well as the start line for
the engine (if it is already running).

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions  http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

"34u" <34u34u@mail.hongkong.com> wrote in message
news:3FB44109.7F32C4B@mail.hongkong.com...
> I upgrade my database from  version 5.x to ver.7 by
> alter database upgrade java on jconnect on
> But it is still cannot login and give me the following message.
> java.sql.SQLException: JZ00L: Login failed.
> Examine the SQLWarnings chained to this exception for the reason(s).
>
> But I can connect by create a new database.
> What's wrong?
> Please help me!
> Thank you for your help!
>


Chris Keating (iAnywhere Solutions) Posted on 2003-11-14 13:31:19.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <FightSpam_keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <3FB44109.7F32C4B@mail.hongkong.com> <3fb44832$1@forums-2-dub> <3FB446E6.3029FD94@mail.hongkong.com>
Subject: Re: Java Enable
Lines: 279
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_001B_01C3AA88.639B6B70"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: 172.31.141.1
Message-ID: <3fb4da75$1@forums-2-dub>
X-Original-Trace: 14 Nov 2003 05:36:53 -0800, 172.31.141.1
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 14 Nov 2003 05:22:07 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 14 Nov 2003 05:31:19 -0800
X-Trace: forums-1-dub 1068816679 10.22.108.75 (14 Nov 2003 05:31:19 -0800)
X-Original-Trace: 14 Nov 2003 05:31:19 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2085
Article PK: 4302

What are the SQLWarnings chained to the exception? The SQLWarnings will tell us what is going wrong.
 
Put this into a TRY...CATCH and catch the SQLWarnings.
 
/ck
 

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8
 
*****************************************************************************
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!
 
http://www.ianywhere.com/promos/deved/index.html
 
*****************************************************************************
 
iAnywhere Solutions  http://www.iAnywhere.com
 
** Please only post to the newsgroup
 
** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com
 
*****************************************************************************
"34u" <34u34u@mail.hongkong.com> wrote in message news:3FB446E6.3029FD94@mail.hongkong.com...
This is a part of my source code:

DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());
Connection con=DriverManager.getConnection("jdbc:sybase:Tds:192.168.0.230:49152/test","dba","sql");
PreparedStatement pstmt=con.prepareStatement("select table_name from systable");
ResultSet result=pstmt.executeQuery();
while (result.next()) {
  System.out.println(result.getString(1));
}
pstmt.close();

I think the source code is no problem.
Because instead of other database (created by ver. ) is okay!

Thank you!
 
 

"Chris Keating (iAnywhere Solutions)" wrote:

What are the SQLWarnings chained to the exception. The real details to
solving the problem are contained in those warnings. Can you also provide
details regarding your connection properties as well as the start line for
the engine (if it is already running).

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions  http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

"34u" <34u34u@mail.hongkong.com> wrote in message
news:3FB44109.7F32C4B@mail.hongkong.com...
> I upgrade my database from  version 5.x to ver.7 by
> alter database upgrade java on jconnect on
> But it is still cannot login and give me the following message.
> java.sql.SQLException: JZ00L: Login failed.
> Examine the SQLWarnings chained to this exception for the reason(s).
>
> But I can connect by create a new database.
> What's wrong?
> Please help me!
> Thank you for your help!
>


34u Posted on 2003-11-17 08:09:31.0Z
Message-ID: <3FB88009.29542E41@mail.hongkong.com>
From: 34u <34u34u@mail.hongkong.com>
X-Mailer: Mozilla 4.79 [en] (Win98; U)
X-Accept-Language: en,zh-TW,zh-CN,zh
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Java Enable
References: <3FB44109.7F32C4B@mail.hongkong.com> <3fb44832$1@forums-2-dub> <3FB446E6.3029FD94@mail.hongkong.com> <3fb4da75$1@forums-2-dub>
Content-Type: multipart/alternative; boundary="------------E0B29DE7AA5EA7AB52A22574"
X-Original-NNTP-Posting-Host: 218.189.206.171
X-Original-Trace: 17 Nov 2003 00:15:14 -0800, 218.189.206.171
Lines: 292
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 17 Nov 2003 00:00:04 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 17 Nov 2003 00:09:31 -0800
X-Trace: forums-1-dub 1069056571 10.22.108.75 (17 Nov 2003 00:09:31 -0800)
X-Original-Trace: 17 Nov 2003 00:09:31 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2091
Article PK: 4308

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.sql.*;
 

public class test {
  public static void main(String args[]) {

     try {
        DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());

        System.out.println("login: running");
        Connection con=DriverManager.getConnection("jdbc:sybase:Tds:192.168.0.230:2638","dba","sql");
        System.out.println("login: passed");

        PreparedStatement pstmt=con.prepareStatement("select table_name from systable");
        ResultSet result=pstmt.executeQuery();
        while (result.next()) {
          System.out.println(result.getString(1));
        }
        pstmt.close();
     }
     catch (SQLException e) {
        System.out.println("Err");
        System.out.println(e.toString());
     }
  }
}

Result:
login: running
Err
java.sql.SQLException: JZ00L: Login failed.  Examine the SQLWarnings chained to this exception for the reason(s).
 
 
 

"Chris Keating (iAnywhere Solutions)" wrote:

What are the SQLWarnings chained to the exception? The SQLWarnings will tell us what is going wrong. Put this into a TRY...CATCH and catch the SQLWarnings. /ck  
--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8 *****************************************************************************
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free! http://www.ianywhere.com/promos/deved/index.html ***************************************************************************** iAnywhere Solutions  http://www.iAnywhere.com ** Please only post to the newsgroup ** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com *****************************************************************************

"34u" <34u34u@mail.hongkong.com> wrote in message news:3FB446E6.3029FD94@mail.hongkong.com...This is a part of my source code:

DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());
Connection con=DriverManager.getConnection("jdbc:sybase:Tds:192.168.0.230:49152/test","dba","sql");
PreparedStatement pstmt=con.prepareStatement("select table_name from systable");
ResultSet result=pstmt.executeQuery();
while (result.next()) {
  System.out.println(result.getString(1));
}
pstmt.close();

I think the source code is no problem.
Because instead of other database (created by ver. ) is okay!

Thank you!
 
 

"Chris Keating (iAnywhere Solutions)" wrote:

What are the SQLWarnings chained to the exception. The real details to
solving the problem are contained in those warnings. Can you also provide
details regarding your connection properties as well as the start line for
the engine (if it is already running).

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions  http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

"34u" <34u34u@mail.hongkong.com> wrote in message
news:3FB44109.7F32C4B@mail.hongkong.com...
> I upgrade my database from  version 5.x to ver.7 by
> alter database upgrade java on jconnect on
> But it is still cannot login and give me the following message.
> java.sql.SQLException: JZ00L: Login failed.
> Examine the SQLWarnings chained to this exception for the reason(s).
>
> But I can connect by create a new database.
> What's wrong?
> Please help me!
> Thank you for your help!
>


Chris Keating (iAnywhere Solutions) Posted on 2003-11-19 02:28:46.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <FightSpam_keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <3FB44109.7F32C4B@mail.hongkong.com> <3fb44832$1@forums-2-dub> <3FB446E6.3029FD94@mail.hongkong.com> <3fb4da75$1@forums-2-dub> <3FB88009.29542E41@mail.hongkong.com>
Subject: Re: Java Enable
Lines: 446
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0017_01C3AE19.9783F990"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: vpn-concord-041.sybase.com
Message-ID: <3fbad6bc@forums-2-dub>
X-Original-Trace: 18 Nov 2003 18:34:36 -0800, vpn-concord-041.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 18 Nov 2003 18:19:07 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 18 Nov 2003 18:28:46 -0800
X-Trace: forums-1-dub 1069208926 10.22.108.75 (18 Nov 2003 18:28:46 -0800)
X-Original-Trace: 18 Nov 2003 18:28:46 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2100
Article PK: 4316

You still have not captured the SQLWarnings. All you have captured is the
SQLException.

See
http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/SQLErr/


--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8
 
*****************************************************************************
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!
 
http://www.ianywhere.com/promos/deved/index.html
 
*****************************************************************************
 
iAnywhere Solutions  http://www.iAnywhere.com
 
** Please only post to the newsgroup
 
** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com
 
*****************************************************************************
"34u" <34u34u@mail.hongkong.com> wrote in message news:3FB88009.29542E41@mail.hongkong.com...
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.sql.*;
 

public class test {
  public static void main(String args[]) {

     try {
        DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());

        System.out.println("login: running");
        Connection con=DriverManager.getConnection("jdbc:sybase:Tds:192.168.0.230:2638","dba","sql");
        System.out.println("login: passed");

        PreparedStatement pstmt=con.prepareStatement("select table_name from systable");
        ResultSet result=pstmt.executeQuery();
        while (result.next()) {
          System.out.println(result.getString(1));
        }
        pstmt.close();
     }
     catch (SQLException e) {
        System.out.println("Err");
        System.out.println(e.toString());
     }
  }
}

Result:
login: running
Err
java.sql.SQLException: JZ00L: Login failed.  Examine the SQLWarnings chained to this exception for the reason(s).
 
 
 

"Chris Keating (iAnywhere Solutions)" wrote:

What are the SQLWarnings chained to the exception? The SQLWarnings will tell us what is going wrong. Put this into a TRY...CATCH and catch the SQLWarnings. /ck  
--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8 *****************************************************************************
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free! http://www.ianywhere.com/promos/deved/index.html ***************************************************************************** iAnywhere Solutions  http://www.iAnywhere.com ** Please only post to the newsgroup ** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com *****************************************************************************

"34u" <34u34u@mail.hongkong.com> wrote in message news:3FB446E6.3029FD94@mail.hongkong.com...This is a part of my source code:

DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());
Connection con=DriverManager.getConnection("jdbc:sybase:Tds:192.168.0.230:49152/test","dba","sql");
PreparedStatement pstmt=con.prepareStatement("select table_name from systable");
ResultSet result=pstmt.executeQuery();
while (result.next()) {
  System.out.println(result.getString(1));
}
pstmt.close();

I think the source code is no problem.
Because instead of other database (created by ver. ) is okay!

Thank you!
 
 

"Chris Keating (iAnywhere Solutions)" wrote:

What are the SQLWarnings chained to the exception. The real details to
solving the problem are contained in those warnings. Can you also provide
details regarding your connection properties as well as the start line for
the engine (if it is already running).

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions  http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

"34u" <34u34u@mail.hongkong.com> wrote in message
news:3FB44109.7F32C4B@mail.hongkong.com...
> I upgrade my database from  version 5.x to ver.7 by
> alter database upgrade java on jconnect on
> But it is still cannot login and give me the following message.
> java.sql.SQLException: JZ00L: Login failed.
> Examine the SQLWarnings chained to this exception for the reason(s).
>
> But I can connect by create a new database.
> What's wrong?
> Please help me!
> Thank you for your help!
>


34u Posted on 2003-11-19 07:45:49.0Z
Message-ID: <3FBB1D7C.4A3405ED@mail.hongkong.com>
From: 34u <34u34u@mail.hongkong.com>
X-Mailer: Mozilla 4.79 [en] (Win98; U)
X-Accept-Language: en,zh-TW,zh-CN,zh
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Java Enable
References: <3FB44109.7F32C4B@mail.hongkong.com> <3fb44832$1@forums-2-dub> <3FB446E6.3029FD94@mail.hongkong.com> <3fb4da75$1@forums-2-dub> <3FB88009.29542E41@mail.hongkong.com> <3fbad6bc@forums-2-dub>
Content-Type: multipart/alternative; boundary="------------0EB65D38BD375BE302B5BF99"
NNTP-Posting-Host: 218.189.206.171
X-Original-NNTP-Posting-Host: 218.189.206.171
Date: 18 Nov 2003 23:45:49 -0800
X-Trace: forums-1-dub 1069227949 218.189.206.171 (18 Nov 2003 23:45:49 -0800)
X-Original-Trace: 18 Nov 2003 23:45:49 -0800, 218.189.206.171
Lines: 469
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2101
Article PK: 4317

Thank you for your help!!
But I modify a catch part by:
     catch (SQLException ex) {
        System.out.println("Err");
        System.out.println(ex.toString());

     // SQLException occured.
     // There could be multiple error objects chained together
     System.out.println ("*** SQLException caught ***");

     while (ex != null) {
       System.out.println ("SQLState: " + ex.getSQLState () + "");
       System.out.println ("Message: " + ex.getMessage() + "");
       System.out.println ("Vendor ErrorCode: " + ex.getErrorCode() + "");
       ex = ex.getNextException();
       System.out.println("");
       }
 
     }
     catch (java.lang.Exception ex) {
     // Some other type of exception occurred
     System.out.println("*** Exception caught ***");
     System.out.println(ex.getMessage()+ "");
     }

Result:
java.sql.SQLException: JZ00L: Login failed.  Examine the SQLWarnings chained to this exception for the reason(s).
*** SQLException caught ***
SQLState: JZ00L
Message: JZ00L: Login failed.  Examine the SQLWarnings chained to this exception for the reason(s).
Vendor ErrorCode: 0

SQLState: JZ0I5
Message: JZ0I5: An unrecognized CHARSET property was specified: eucb5.
Vendor ErrorCode: 0

SQLState: JZ006
Message: JZ006: Caught IOException: java.io.CharConversionException: java.io.UnsupportedEncodingException: UnsupportedCharset
Vendor ErrorCode: 0

SQLState: JZ0I5
Message: JZ0I5: An unrecognized CHARSET property was specified: eucb5.
Vendor ErrorCode: 0

SQLState: JZ006
Message: JZ006: Caught IOException: java.io.CharConversionException: java.io.UnsupportedEncodingException: UnsupportedCharset
Vendor ErrorCode: 0
 
 
 

"Chris Keating (iAnywhere Solutions)" wrote:

 You still have not captured the SQLWarnings. All you have captured is the
SQLException.

See
http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/exercises/SQLErr/
  
--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8 *****************************************************************************
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free! http://www.ianywhere.com/promos/deved/index.html ***************************************************************************** iAnywhere Solutions  http://www.iAnywhere.com ** Please only post to the newsgroup ** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com *****************************************************************************

"34u" <34u34u@mail.hongkong.com> wrote in message news:3FB88009.29542E41@mail.hongkong.com...import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.sql.*;
 

public class test {
  public static void main(String args[]) {

     try {
        DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());

        System.out.println("login: running");
        Connection con=DriverManager.getConnection("jdbc:sybase:Tds:192.168.0.230:2638","dba","sql");
        System.out.println("login: passed");

        PreparedStatement pstmt=con.prepareStatement("select table_name from systable");
        ResultSet result=pstmt.executeQuery();
        while (result.next()) {
          System.out.println(result.getString(1));
        }
        pstmt.close();
     }
     catch (SQLException e) {
        System.out.println("Err");
        System.out.println(e.toString());
     }
  }
}

Result:
login: running
Err
java.sql.SQLException: JZ00L: Login failed.  Examine the SQLWarnings chained to this exception for the reason(s).
 
 
 

"Chris Keating (iAnywhere Solutions)" wrote:

What are the SQLWarnings chained to the exception? The SQLWarnings will tell us what is going wrong. Put this into a TRY...CATCH and catch the SQLWarnings. /ck
--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8 *****************************************************************************
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free! http://www.ianywhere.com/promos/deved/index.html ***************************************************************************** iAnywhere Solutions  http://www.iAnywhere.com ** Please only post to the newsgroup ** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com *****************************************************************************

"34u" <34u34u@mail.hongkong.com> wrote in message news:3FB446E6.3029FD94@mail.hongkong.com...This is a part of my source code:

DriverManager.registerDriver(new com.sybase.jdbc2.jdbc.SybDriver());
Connection con=DriverManager.getConnection("jdbc:sybase:Tds:192.168.0.230:49152/test","dba","sql");
PreparedStatement pstmt=con.prepareStatement("select table_name from systable");
ResultSet result=pstmt.executeQuery();
while (result.next()) {
  System.out.println(result.getString(1));
}
pstmt.close();

I think the source code is no problem.
Because instead of other database (created by ver. ) is okay!

Thank you!
 
 

"Chris Keating (iAnywhere Solutions)" wrote:

What are the SQLWarnings chained to the exception. The real details to
solving the problem are contained in those warnings. Can you also provide
details regarding your connection properties as well as the start line for
the engine (if it is already running).

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions  http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

"34u" <34u34u@mail.hongkong.com> wrote in message
news:3FB44109.7F32C4B@mail.hongkong.com...
> I upgrade my database from  version 5.x to ver.7 by
> alter database upgrade java on jconnect on
> But it is still cannot login and give me the following message.
> java.sql.SQLException: JZ00L: Login failed.
> Examine the SQLWarnings chained to this exception for the reason(s).
>
> But I can connect by create a new database.
> What's wrong?
> Please help me!
> Thank you for your help!
>