Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Question Unanswered: Calling Java stored procedure from Sybase ASA 9

    Trying to upgrade to ASA

    This all worked great under 7.0.4.xxxx, and there have been no changes
    to the java .jar file, or the classes inside it.

    I'm going nuts trying to get my java procedure calls to work, even in the
    simplest test case. I have no problem with the asademo examples, so I
    know java is installed properly. I don't have an .init method, but am
    rather trying to just call a method in one of the classes. I have
    verified the capitalization in the class and method names, but I'm not
    totally sure about the method signature. The error I'm getting is
    "Procedure 'setCylLength' not found SQLCODE=-265, ODBC 3 State="42S02""

    According to the OLH, this can mean either the procedure actually
    doesn't exist, or the number or type of parameters is incorrect. I'm
    guessing it's the latter issue, but have wasted too many hours and still
    can't find the problem. Again, note that it all worked fine in 7.0.4,
    and the asademo java examples work fine in this 9.0.1 database. It must
    be something really stupid I'm missing, but I've been looking at it so
    long I probably can't see what's really there any more.

    Any idea what I'm missing?

    Here are various pieces of my code; if you want to see the entire .java
    file, I can post it as well:

    This is a snippet of code for the method I'm trying to use, from in
    wra.util; you see that it takes a double as a parameter and returns nothing:

    public void setCylLength(double newCylLength) {
    cylLength = newCylLength;

    The ISQL call I'm making:

    call testsetcyllength()

    The definition of testSetCylLength():

    ALTER FUNCTION "DBA"."testSetCylLength"( )
    call SQLSetCylLength(cast(320.0 as double));
    RETURN 320;

    The definition of SQLSetCylLength(); I'm guessing my problem is here, but don't know what to try next:

    ALTER PROCEDURE "DBA"."SQLSetCylLength"(in arg1 double) external name
    'wra.util.Tank.setCylLength (D)V' language java

    Remove the ns_ from if replying by e-mail (but keep posts in the
    newsgroups if possible).

  2. #2
    Join Date
    Aug 2004
    I got this resolved; if you are interested in the details, you can see my message in the Sybase group of dbforums.

Posting Permissions

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