I've had much trouble with jpype lately, on freebsd (yep, it compiles wit ha modified setup.py I'll post too) :
I tried to import a class "com.AEM", which in turn used a class "ldap.Ldapconnection" which was not in the classpath.
Instead of raising errors, jpype considered com.AEM as a package, finally raising "package com.AEM is not Callable".
I've tinkered with _jpype.findClass() to see the problem. It was weird : the first time, findClass() returned None, and on second attempt it returned a broken class : calling getClassMethods() on it returned an empty tuple (whereas there were dozens of class methods in it normally), and getMethods DID raise an import exception concerning ldap.Ldapconnection.
It seems class importation errors get partly swallowed somewhere in the process...
But well it'd be pretty cool if missing package / missing class exceptions were raised much earlier, as classpath problems can really be hell else.
Log in to post a comment.