Hi Everyone,

I am receiving a Sybase error message in Java, I will explain in details if it helps to find a solution to the problem. The Sybase database is wrapped around a third party software called Wincati developed by Sawtooth technologies( http://www.sawtooth.com/ ). This software has has a number of studies loaded and is primarily used in Survey Labs to interview and gather data. Each study folder has <studyname>.db file which can be accessed from the SQL Anywhere ISQL 2 prompt. Once the sybase connection is successful, queries can be executed.

We have an internal Java software which makes a connection to the Sybase Database to gather data which is thereby used in displaying different performance reports. We are currently in the process of switching from Wincati version 4 (backend Sybase version 9) to Wincati version 6 (backend Sybase version 11.0.1.2627).

Wincati 4 has been running for a long time and our internal Java software never had issues making a successful database connection with Sybase. However, with Wincati 6 version, it errors out in while creating the connection, as below-

Exception in thread "main" com.sybase.jdbc3.jdbc.SybSQLException: SQL Anywhere Error -141: Table 'attempt' not found at com.sybase.jdbc3.tds.Tds.a(Unknown Source) at com.sybase.jdbc3.tds.Tds.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.ResultGetter.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.nextResult(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.queryLoop(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.executeQuery(Unknown Source) at com.sybase.jdbc3.jdbc.SybStatement.executeQuery(Unknown Source) at example.SybaseConnectivity.makeConnection(SybaseConnectivity.java:30) at example.SybaseConnectivity.main(SybaseConnectivity.java:50)

The credentials, IP, port and database name are set correctly. We are using the jconn3 JDBC library to create the connection between Java & Sybase.

It gives a "Table not found" error for all tables with the Sybase version 11 DB when trying to run a query in Java. But running the same query directly from the sybase console returns the results correctly.

Maybe it has to do something with the JDBC library which may not be compatible with Sybase version 11? (The same queries run fine with Sybase version 9 inside the Java source code)

Any help will be greatly appreciated! Please let me know, if you have any queries regarding the information provided.

Warm Regards,

-Rajarshi.

asked 19 Jun, 13:19

Raj's gravatar image

Raj
414
accept rate: 0%

I suspect that this is simply a visibility issue. If the owner of the table 'attempt' is not the currently logged in user, the table 'attempt' may not be visible without qualifying the table with its owner i.e.:

select * from owner.attempt

Can you check if qualifying with the owner causes this error to be avoided?

(19 Jun, 14:06) Chris Keating

> an internal Java software which makes a connection to the Sybase Database

(1) Please show us the exact Java code that makes the connection, including the user id (you can x-out the password).

(2) Please tell us the user id that owns (created) the table "attempt".

(3) Please show us the connection string used by the "sybase console" (whatever that is, presumably dbisql).

Thanks!

(19 Jun, 14:13) Breck Carter

@Raj: FWIW, is that related to that older question from the SAP Community?

JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s)

If so, others might check the many comments there (hidden by default, what a great community feature...) and what suggestions have already been tested.


Either way, you're very welcome here:)

(20 Jun, 05:43) Volker Barth
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×103

question asked: 19 Jun, 13:19

question was seen: 171 times

last updated: 20 Jun, 05:45