Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    3

    Unanswered: Loading Sybase JDBC driver into Oracle fails

    We're an Oracle shop (8.1.7, 9.2.4) but we have a couple of Sybase databases we need to query. Ideally this happens from a Java Stored Procedure in Oracle.

    So I've been trying to load the Sybase JDBC JConnect 5.5 driver into Oracle with loadjava -u user/pass@sid -f -r -v -o -synonym -g public jconn2.jar. This fails with loads of ORA-29534 "could not be resolved" errors, and a

    errors : class com/sybase/jdbc2/jdbc/SybXAResource11
    ORA-29545: badly formed class: verifyReturnCode
    overrides a final method

    The jar works fine running at the command line, but that's not useful to us, since we need to call the procedure from DBMS_JOB.

    Is it really necessary to load the JDBC driver into Oracle in order to do this? If so, how do we get around this problem? I tried the I-Net Software driver for Sybase which I found online, and which loaded and worked fine; but of course I don't look forward to asking my boss to shell out for another bit of software when we have the Sybase client already.

    Any suggestions gratefully received!

    Roger Pearse

  2. #2
    Join Date
    Jul 2004
    Posts
    3
    Quote Originally Posted by roger_pearse
    We're an Oracle shop (8.1.7, 9.2.4) but we have a couple of Sybase databases we need to query. Ideally this happens from a Java Stored Procedure in Oracle.

    So I've been trying to load the Sybase JDBC JConnect 5.5 driver into Oracle with loadjava -u user/pass@sid -f -r -v -o -synonym -g public jconn2.jar. This fails with loads of ORA-29534 "could not be resolved" errors, and a

    errors : class com/sybase/jdbc2/jdbc/SybXAResource11
    ORA-29545: badly formed class: verifyReturnCode
    overrides a final method
    Bob Maggio, whose name I found plaintively asking the same question 2 years ago and emailed, has kindly emailed me back with the trick you need:

    -- start--
    First, grant this permission to the schema/user:

    exec dbms_java.grant_permission('USERNAME','SYSracle.aurora.security.JServerPermission','Verifier ', '' );

    This allows the the classes to be tagged as VALID and not have the Oracle Aurora Verifier check the dependencies.

    Next, the drivers can be loaded from DOS using:

    loadjava -u USERNAME/PASSWORD@service_name -o -f -r -v -noverify c:\jconn2.jar
    loadjava -u USERNAME/PASSWORD@service_name -o -f -r -v -noverify c:\jTDS2.jar

    Then a second permission needs to be issued:

    exec
    dbms_java.grant_permission( 'USERNAME','SYS:java.net.SocketPermission',
    'SYBASESERVERADDRESS:5000', 'connect, resolve' );

    USERNAME = your Oracle userid
    SYBASESERVERADDRESS = domain name or ip address of the Sybase server
    5000 = the port no on which Sybase is listening

    This allows the user to access the Aurora JVM SocketPermission to connect and resolve the specified host.
    ---end--

    This loads jconn2.jar fine. I still get some problems with jTDS2.jar, but then I don't find I need this from the command line anyway.

    Now my problem is that when I run my code it complains:

    ignored:java.sql.SQLException: JZ0SJ: Metadata accessor information was not
    found on this database. Please install the required tables as mentioned in the
    jConnect documentation.

    Roger Pearse

  3. #3
    Join Date
    Jul 2004
    Posts
    3
    Quote Originally Posted by roger_pearse
    Now my problem is that when I run my code it complains:

    ignored:java.sql.SQLException: JZ0SJ: Metadata accessor information was not
    found on this database. Please install the required tables as mentioned in the
    jConnect documentation.
    Ignore this: I'd left in some stuff from the I-net software driver sample, which obtained metadata about the driver version. Once I removed this my code worked just fine! And it didn't need the jTDS2.jar.

    Sorry to reply to my own posts, but I looked in vain online for an answer. Now we have one.

    All the best,

    Roger Pearse

  4. #4
    Join Date
    Jul 2006
    Posts
    1
    Hi,

    I have tried to execute loadjava for the jconn2.jar file. However, it was throwing the following message.
    errors : class com/sybase/jdbc2/jdbc/SybConnectionProxy
    ORA-29534: referenced object DBO.com/sybase/jdbc2/jdbc/SybXAResource11 could not be resolved
    errors : class com/sybase/jdbc2/jdbc/SybPooledConnection
    ORA-29534: referenced object DBO.com/sybase/jdbc2/jdbc/SybConnectionProxy could not be resolved
    errors : class com/sybase/jdbc2/jdbc/SybXAConnection
    ORA-29534: referenced object DBO.com/sybase/jdbc2/jdbc/SybPooledConnection could not be resolved
    skipping : class com/sybase/jdbc2/jdbc/SybDataSource
    skipping : class com/sybase/jdbc2/jdbc/SybDataSource$UrlProvider
    errors : class com/sybase/jdbc2/jdbc/SybXADataSource
    ORA-29534: referenced object DBO.com/sybase/jdbc2/jdbc/SybXAConnection could not be resolved
    errors : class com/sybase/jdbc2/jdbc/SybXAResource
    ORA-29534: referenced object DBO.com/sybase/jdbc2/jdbc/SybXAConnection could not be resolved
    errors : class com/sybase/jdbc2/jdbc/SybXAResource11

    I have traced the class of referenced objects, the problem caused should be "ORA-29545: badly formed class: verifyReturnCode overrides a final method".

    Any suggestions gratefully received!

    Angus Wong

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •