Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    2

    Cool Unanswered: DB2 version 8.1 fp 2 Stored Procedure issue with classpath

    i am having a problem when running our tool i am getting this error on a new server that we have built. We installed our stored procedures in INSTANCEHOME/sqllib/function. they are Java stored procs. We are now getting this error( ** COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL4304N Java stored procedure or user-defined function "QUEST.TYPELISTREADER", specific name "SQL030910144644009" could not load Java class "com/ibm/nzna/projects/common/s", reason code "". SQLSTATE=42724
    **

    ) and I can't figure out why. we are getting this error. In db2diag.log, it is saying that the class isn't found which doesn't make any sense because in db2profile we have sqllib/function directory in there for the classpath and we run this profile from another id. Please help if you can!

    Brian

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: DB2 version 8.1 fp 2 Stored Procedure issue with classpath

    Originally posted by bokor
    i am having a problem when running our tool i am getting this error on a new server that we have built. We installed our stored procedures in INSTANCEHOME/sqllib/function. they are Java stored procs. We are now getting this error( ** COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL4304N Java stored procedure or user-defined function "QUEST.TYPELISTREADER", specific name "SQL030910144644009" could not load Java class "com/ibm/nzna/projects/common/s", reason code "". SQLSTATE=42724
    **

    ) and I can't figure out why. we are getting this error. In db2diag.log, it is saying that the class isn't found which doesn't make any sense because in db2profile we have sqllib/function directory in there for the classpath and we run this profile from another id. Please help if you can!

    Brian
    It's not clear from your post if you get the error while registering your procedure or when you're actually calling it. In the former case have a look at the db2 message reference - you may find some useful hints there. If it's the latter - I'd make sure that all classes you're referring to in your routine are also in the classpath available for db2dari process (or whatever process executes java procedures in v8)

    Hope this helps

    Nick
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Sep 2003
    Posts
    2

    Talking Re: DB2 version 8.1 fp 2 Stored Procedure issue with classpath

    Nick,

    Thanks for you response. I am sorry to have left out that information. We have successfully created the stored procs. We get the above error from the client when we call them. ALso when we run our TestStoredProc program on command line we get this error too.

    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/6000] SQL0444N Routine "*oredProc" (specific name "SQL030910203210180") is implemented with code in library or path "....TestStoredProc", function "QUEST.TestStoredProc" which cannot be accessed. Reason code: "4". SQLSTATE=42724


    I believe these are all related to one another. It appears that everythign is in the classpath correctly and all the libraries the java code would use are also on the server. Any more help would be appreciated. Thanks


    Originally posted by n_i
    It's not clear from your post if you get the error while registering your procedure or when you're actually calling it. In the former case have a look at the db2 message reference - you may find some useful hints there. If it's the latter - I'd make sure that all classes you're referring to in your routine are also in the classpath available for db2dari process (or whatever process executes java procedures in v8)

    Hope this helps

    Nick

  4. #4
    Join Date
    Dec 2002
    Posts
    134

    Re: DB2 version 8.1 fp 2 Stored Procedure issue with classpath

    Hi,

    We do not copy jar files to server, we use sqlj.install_jar stored procedure. The jar files after installation are placed into "function/jar/SCHEMA", not "function" directory

    Can you try putting them into the "correct" directory?
    Can you try using sqlj.install_jar?
    Also set diaglevel to 4 and try calling stored procedures - db2diag.log should have more information regarding the problem

    Also, probably APAR IY35081 we opened against V8.1.sp2 applies to you (stored procedure installation does not work when large number of paramaters and/or long path package name is used). It was working in 7.2 fixpack 6 (our environment) and now is supposed to be fixed in v8.1 fixpack 4.
    IBM provided a hotfix for us.

    regards,
    dmitri

Posting Permissions

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