Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Problem with JDBC for Sybase connection

Avatar of iquiqu
iquiqu asked on
Sybase DatabaseJava
16 Comments1 Solution1418 ViewsLast Modified:
We are using 24x7 version 4.4 (from www.softtreetech.com) on Windows 2003 server. We created two database profiles, one based on ODBC and other on SYBASE to connect to a Sybase ASE 12.5 server running on a HPUX machine. We tried to run simple SQL jobs such as "SELECT column name FROM table name". The job based on SYBASE profile always returns the error message "Job completed with exit code -1.....". The message is the same even if we change the table name to something which does not exist. On the other hand, if ODBC based profile is used, then, if the SELECT statement is correct, it does not return any error message and if it is not okay (such as non-existing table name) it returns the correct error message.

Here is the listing of a jdbc.log created when we give a SELECT statement with correct table name.

DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver: driver[className=com.sybase.jdbc3.jdbc.SybDriver,com.sybase.jdbc3.jdbc.SybDriver@c2ff5]
registerDriver: driver[className=com.sybase.jdbc3.jdbc.SybDriver,com.sybase.jdbc3.jdbc.SybDriver@20be79]
DriverManager.deregisterDriver: com.sybase.jdbc3.jdbc.SybDriver@c2ff5
java.sql.SQLException: JZ0C0: Connection is already closed.
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.checkConnection(Unknown Source)
at com.sybase.jdbc3.jdbc.SybConnection.close(Unknown Source)
at com.softtreetech.jscheduler.business.sql.SqlConnector.execute(Unknown Source)
at com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner.executeScript(Unknown Source)
at com.softtreetech.jscheduler.business.runner.SqlScriptJobRunner.runJob(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.runJobIgnoringErrorsIfNeeded(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.startExecution(Unknown Source)
at com.softtreetech.jscheduler.business.runner.AbstractJobRunner.execute(Unknown Source)
at com.softtreetech.jscheduler.business.runner.JobExecutorImpl.execute(Unknown Source)
at com.softtreetech.jscheduler.JSchedulerStarter.startup(Unknown Source)
at com.softtreetech.jscheduler.JSchedulerStarter.main(Unknown Source)
SQLException: SQLState(JZ0C0)
DriverManager.deregisterDriver: com.sybase.jdbc3.jdbc.SybDriver@20be79
DriverManager.deregisterDriver: com.sybase.jdbc3.jdbc.SybDriver@1ee4648


Is this because of any settings related to JDBC?  Please suggest how this can be resolved.
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
Commented:
This problem has been solved!
Unlock 1 Answer and 16 Comments.
See Answers