Forum Stats

  • 3,839,830 Users
  • 2,262,539 Discussions
  • 7,901,065 Comments

Discussions

pl/sql java stored procedure :: package-info.java compiled with error

Apex_Noob
Apex_Noob Member Posts: 59 Bronze Badge
edited Jan 22, 2020 12:55PM in SQL & PL/SQL

Hi,

In Oracle Database 12.1,  when I compile the below java procedure it failing, When then same java code in compiled in eclipse its successful.

create or replace and compile java source named "packageinfo" as/** *  *//** * @author User * */@javax.xml.bind.annotation.XmlSchema(namespace="",  xmlns = {    @javax.xml.bind.annotation.XmlNS(prefix = "xsi", namespaceURI = "http://www.w3.org/2001/XMLSchema-instance"),    @javax.xml.bind.annotation.XmlNs(prefix = "xi", namespaceURI = "http://www.w3.org/2001/XInclude"),    @javax.xml.bind.annotation.XmlNs(prefix = "", namespaceURI = "urn:cbm:cbmnet:business:cct010001")  })package com.tremp.FIToFICustomerCreditTransfer;

How to make it valid? or What is the correct way to create package-info.java in Oracle Database?

Regards,

Shijesh

Tagged:

Answers

  • PhHein
    PhHein Member, Moderator Posts: 7,240 Silver Trophy
    edited Jan 21, 2020 3:09AM

    MOD: moved from General XML

  • Paulzip
    Paulzip Member Posts: 8,722 Blue Diamond
    edited Jan 21, 2020 6:15PM

    What error?!!!

    You miss out the most important information of your question.

  • Apex_Noob
    Apex_Noob Member Posts: 59 Bronze Badge
    edited Jan 21, 2020 8:56PM

    Hi, In Pl/SQL developer, the error show in "Compiled with Error". I was wondering whether Oracle JVM in Oracle Database supports package-info.java or not. If yes, then how to create the same. Regards, Shijesh

  • Apex_Noob
    Apex_Noob Member Posts: 59 Bronze Badge
    edited Jan 22, 2020 12:55PM

    Hi, Any help. I create a JAR file using eclipse and this jar has package-info.class file. The purpose of the JAR file is to generate XML using JAXB library. The purpose of package-info.class is to add package level annotation for namespace. When i write a java using the above library in eclipse and execute, i get proper xml with name space eg. When I load this jar file in oracle database using loadjava command, everything is working fine. However, it looks like package-info.class was not called. Hence, it did not print namespace with root node. --> Result in plsql java stored procedure. Is there anyway i can make package-info.class get called, so that namespace tags are properly generated. Thanks, Shijesh