This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
"apply not implemented for PrimProcedure" while attempting to use JNDI
- From: Valtteri Vuorikoski <vuori at puuhamaa dot magenta dot net>
- To: kawa at sources dot redhat dot com
- Date: 14 Nov 2001 17:39:53 +0200
- Subject: "apply not implemented for PrimProcedure" while attempting to use JNDI
First, apologies if I'm doing something silly or missing something in
the docs or the list archives. I'm not particularly fluent in Java
either at the moment.
I was attempting to use the JNDI classes from within Kawa, starting with
the examples in the JNDI tutorial. I'm running the JVM shipped with MacOS X 10.1,
which is apparently J2SE 1.3.1 these days and Kawa version 1.6.96.
Attempting to instantiate javax.naming.InitialContext with a Hashtable
parameter runs into a runtime exception as in the following session
(some lines have been removed for brevity):
#|kawa:1|# (define env (make <java.util.Hashtable>))
#|kawa:5|# (require <javax.naming.Context>)
#|kawa:6|# (invoke env 'put INITIAL_CONTEXT_FACTORY "com.sun.jndi.ldap.LdapCtxFactory")
#!null
#|kawa:9|# env
{java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory}
#|kawa:10|# (define ctx (make <javax.naming.InitialContext> env))
java.lang.RuntimeException: apply not implemented for PrimProcedure javax.naming.InitialContext javax.naming.InitialContext.<init>(boolean) - java.lang.NoSuchMethodException
at gnu.expr.PrimProcedure.applyV(PrimProcedure.java:157)
at gnu.expr.GenericProc.applyV(GenericProc.java:115)
at gnu.kawa.reflect.Invoke.applyN(Invoke.java:117)
at gnu.kawa.reflect.Invoke.applyN(Invoke.java:49)
at gnu.expr.ApplyExp.eval(ApplyExp.java:45)
at gnu.expr.SetExp.eval(SetExp.java:85)
at gnu.expr.Expression.eval(Expression.java:21)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:177)
at kawa.Shell.run(Shell.java:77)
at kawa.Shell.run(Shell.java:32)
at kawa.repl.apply0(repl.java:27)
at gnu.mapping.Future.run(Future.java:59)
#|kawa:11|# (scheme-implementation-version)
1.6.96
According to the javadoc, javax.naming.InitialContext has three construcotrs:
InitialContext(), protected InitialContext(boolean) and InitialContext(Hashtable).
In fact, attempting to pass any kind of argument to the constructor results
in the same exception. Instantiating InitialContext with no arguments works.
Any suggestions for fixing this?
-valtteri