Link to home
Start Free TrialLog in
Avatar of pmcdevelop
pmcdevelop

asked on

ora-29532 error when calling java source

Good Morning,
     we are having a problem running the call below:

+++++++++++++++++++++++++++++++++++
CREATE  OR REPLACE  
    AND COMPILE   JAVA SOURCE NAMED "CONCIERGE".""  RESOLVER ((*
    CONCIERGE)(* PUBLIC)) AS import java.util.Hashtable;

import javax.naming.*;

import javax.naming.directory.*;

public class doLookup{

    public  static int domname(String hostName) throws NamingException {

          Hashtable env = new Hashtable();

          env.put("java.naming.factory.initial",

                      "com.sun.jndi.dns.DnsContextFactory");

          DirContext ictx = new InitialDirContext (env );

          Attributes attrs = ictx.getAttributes (hostName, new String[] { "MX" });

          Attribute attr = attrs.get( "MX" );

          if (attr == null) return (0); else return (attr.size() );

    }

};

+++++++++++++++++++++++++++++++++++

we are getting the following error:
+++++++++++++++++++++++++++++++++++
Connecting to the database TPMCDB.

ORA-29532: Java call terminated by uncaught Java exception:

 javax.naming.NoInitialContextException: Cannot instantiate class:

 com.sun.jndi.dns.DnsContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.dns.DnsContextFactory]

ORA-06512: at "CONCIERGE.DOLOOKUP", line 1

ORA-06512: at line 7

Process exited.
+++++++++++++++++++++++++++++++++++++++++


Disconnecting from the database TPMCDB.
ASKER CERTIFIED SOLUTION
Avatar of barfi
barfi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial