Reputation: 625
can some one help with this issue.
We are trying to upload a jar file in oracle 12c, we are getting the below error.
ORA-29546: badly formed resource
can some one help us on this issue.
Upvotes: 0
Views: 553
Reputation: 17944
Where did you get the .jar?
ORA-29546
implies that the Oracle JVM verifier sees something in the byte code that could not be created by a legitimately compiled Java program.
I recommend you (A) determine what version of Java you version of the database runs and then (B) recompile your Java from the source code with the target
version equal to the database JVM version. Then, (C) repackage the .jar and (D) attempt to load it again.
You can determine the Java version of your database as follows (or just Google it, probably):
CREATE OR REPLACE FUNCTION get_java_property (prop IN VARCHAR2)
RETURN VARCHAR2 IS
LANGUAGE JAVA
NAME 'java.lang.System.getProperty(java.lang.String) return java.lang.String' ;
DECLARE
l_java_version VARCHAR2 (240);
BEGIN
l_java_version := get_java_property ('java.version');
DBMS_OUTPUT.put_line ('Java version is ' || l_java_version);
END;
--DROP FUNCTION get_java_property;
Upvotes: 1