Tags: 3rd, classes, database, developed, load, loadjava, mysql, ora-29521, ora-29521loadjava, oracle, party, pwd, reported, resolve, sql, synonym, sys, user

loadjava results in ORA-29521 -- again !

On Database » Oracle

3,216 words with 3 Comments; publish: Mon, 11 Feb 2008 20:49:00 GMT; (25062.50, « »)

Hello,

I developed some classes for a 3rd party; they tried to load them but reported ORA-29521:

loadjava -user sys/pwd -resolve -synonym DBInterface.class

result:

ORA-29521: referenced name common/RequestMessage could not be found

ORA-29521: referenced name common/HeaderRequest could not be found

etc.

My classes are located in 2 packages "common" and "local"

The above command was issued in directory .../sbs which is at top of common and local.

All classes were copied where they should; that's OK.

Now they tell me they should have a "class map" so as to load each class, first the ones that do not depend on other classes, last the ones that do depend.. I think they are wrong; AFAIK, loadjava utility may load all classes first and THEN attempt to resolve them.

Pls. note I have no access to their environment, so I can not try by myself that command.

??Is there something wrong with the above command, as they issued it ?

??May just a wild card in the command line help ? :

loadjava ... *.class

or

loadjava ... common/*.class local/.*class

Needed classes may be first loaded (via an explicit list or wild cards?) and afterwards resolved. ??Am I right?

Thanks !

All Comments

Leave a comment...

  • 3 Comments
    • 436322,

      I couldn't ascertain, from your post, what Oracle version you are using. Since Oracle 9i, the "loadjava" command has the "-genmissing" option which overcomes errors that may be caused by the "-resolve" option.

      Alternatively, you do not need to use the "-resolve" option when using "loadjava". All loaded classes get resolved eventually, so it doesn't have to be done when loading the class.

      And then again, you could also follow your own suggestion: first load classes that have no dependencies (and so can be resolved), then load the other classes -- in order -- depending on their dependencies. Of-course, if you have circular dependencies, you are in trouble -- but the purists will probably tell you that circular dependencies indicate bad design, anyway :-)

      For your information, the "Java Developer's Guide" has details on the "loadjava" tool. It is available from:

      http://tahiti.oracle.com

      Good Luck,

      Avi.

      #1; Fri, 22 Feb 2008 17:55:00 GMT
    • Oracle version is 8.1.4.7.

      Besides, is it possible to use wildcards with loadjava? For example

      loadjava *.class

      Classes loaded but not resolved will be resolved at runtime ?

      Thanks !

      #2; Fri, 22 Feb 2008 17:56:00 GMT
    • 436322,

      > Oracle version is 8.1.4.7.

      I think you mean 8.1.7.4, no?

      > Besides, is it possible to use wildcards with

      > loadjava? For example

      > loadjava *.class

      I don't think "loadjava" supports wildcards, but if you are on a linux/UNIX/Mac OS platform (sorry, couldn't ascertain that information from your posts), then the shell may expand the wildcard before launching "loadjava".

      Did you try it? (I'm too lazy to try it for you ;-)

      > Classes loaded but not resolved will be resolved at

      > runtime ?

      Yes. This is detailed in the "Java Developer's Guide" that I referred you to in my previous reply. Have you looked at it?

      Good Luck,

      Avi.

      #3; Fri, 22 Feb 2008 17:57:00 GMT