cancel
Showing results for 
Search instead for 
Did you mean: 

Sybase: Error 141 - Table not Found

Former Member
4,238

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.

chris_keating
Product and Topic Expert
Product and Topic Expert
0 Kudos

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?

Breck_Carter
Participant
0 Kudos

> 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!

VolkerBarth
Contributor
0 Kudos

@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:)

Accepted Solutions (0)

Answers (0)