directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: Problem with AbstractBootstrapSchema
Date Tue, 04 Nov 2008 09:43:17 GMT
Tim Bond wrote:
> Hi,
>
> I'm working on embedding apacheds in a custom container.  I'm running into a
> problem with the following line in AbstractBootstrapSchema:
>
> private static final String DEFAULT_PACKAGE_NAME =
> AbstractBootstrapSchema.class.getPackage().getName();
>
> The classloader I'm using does not set the package field, so when this class
> is loaded I'm getting a NullPointerException.  I'm looking to see if I can
> change the classloader somehow, but my reading of the Classload docs
> indicates getPackage() is allowed to return null.
>   
Otherwise, we can test with this function :

public static String getpkg(Class cl){
String clname = cl.getName();
int lastDot = clname.lastIndexOf('.');
return clname.substring(0,lastDot);
}

(found this workaround here : http://coverlipse.sourceforge.net/faq.php)

Which version of ADS are you working with ?

-- 
--
cordialement, regards,
Emmanuel L├ęcharny
www.iktek.com
directory.apache.org



Mime
View raw message