0

I have a problem with java class which I would like to load into oracle database. There was no any output after using 'loadjava' in windows command line:

loadjava -user lrn001/123456@LAND SharedAreaDecoder.class

but I verified the status of my java class in sql developer and I found that it had an invalid status: user_objects table

The class has been compiled in Java 8. I am using oracle database 12c. I've already tried to load another java classes and in each case the problem was the same so status was INVALID. Besides that I tried to use resolve and here is the result:

alter java class "SharedAreaDecoder" resolve;

Script output: Warning: execution completed with a warning. Java CLASS altered

The status after using the above command is still the same.

Using the below command gives more details:

loadjava -user lrn001/123456@LAND SharedAreaDecoder.class -resolve

errors : class SharedAreaDecoder ORA-29521: The name can't be found java/nio/charset/StandardCharsets The following operations failed class SharedAreaDecoder: resolution exiting : Failures occurred during processing

My Oracle JVM version

Select from user_erros

The error translation is: referenced name java/nio/charset/StandardCharsets could not be found

How to solve this issue?

Tranceholic
  • 13
  • 1
  • 1
  • 5
  • 1
    A lot of information is missing here. Which version of Java? Which version of Oracle? What is the command line you used for loadjava? Did you use `resolve`? What research did you do, what did you try and what didn't work? Please [edit] your question and add this missing information. – RealSkeptic Aug 01 '18 at 12:47
  • @RealSkeptic I added some details. Could you take a look now? – Tranceholic Aug 01 '18 at 13:12
  • And it was still invalid after the resolve? Note that you can also use `-resolve` on the `loadjava` command line. Did you check what the warning was? – RealSkeptic Aug 01 '18 at 13:12
  • After using loadjava with -resolve option I had the following output: errors : class SharedAreaDecoder ORA-29521: The name can't be found java/nio/charset/StandardCharsets The following operations failed class SharedAreaDecoder: resolution exiting : Failures occurred during processing – Tranceholic Aug 01 '18 at 13:29
  • 2
    Sounds like your Oracle JVM is not actually 1.8. Now, please do some research: look for how to check the JVM version you have on Oracle, ensure you have it installed properly, ensure that you have all dependencies loaded. And if you still have a problem after that, remember to [edit] the question and put all that information **in the question itself**, not in the comments. – RealSkeptic Aug 01 '18 at 13:38
  • @RealSkeptic I added more details in the main post. But I'm still confused about the reason of my problem. – Tranceholic Aug 01 '18 at 13:52
  • Does the `user_errors` view give you any more information about the issue? – Alex Poole Aug 01 '18 at 15:10
  • @AlexPoole I added a screenshot from that table. There is only short description of an error which is not clear for me. – Tranceholic Aug 02 '18 at 06:30

0 Answers0