[Fedora-directory-devel] java.lang.ClassCastException @ exec of standalone fedora-idm-console on osx

PGNet pgnet.trash+fds at gmail.com
Mon Sep 15 17:07:34 UTC 2008


I'm trying to get fedora-idm-console up and running on OSX,

 uname -a
  Darwin mac03.pglan.com 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun  9
19:36:17 PDT 2008; root:xnu-1228.5.20~1/RELEASE_PPC Power Macintosh

I've upgraded to latest JDK provided by Apple,

 java -version
  java version "1.5.0_16"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-277)
  Java HotSpot(TM) Client VM (build 1.5.0_16-130, mixed mode, sharing)

The java upgrade causes heap-space overruns using ant; bug report here,

 "DirectoryScanner infinitely recurses on symlinks to parent directories"
  https://issues.apache.org/bugzilla/show_bug.cgi?id=45499

so I've upgraded to a src-build of Ant HEAD,

 ant -version
  Apache Ant version 1.8.0alpha compiled on September 14 2008

which cures the problem.

Mozilla prereqs all build cleanly.

FedoraDS project's "console", "fedora-idm-console", "directoryconsole"
& "admservconsole" also build cleanly.

I've installed the locally built fedora-ds & fedora-admin jars locally,

 ls -al ~/.fedora-idm-console/jars/
  -rw-r--r--  1 root wheel 2484780 2008-09-14 12:51 fedora-admin-1.1.2.jar
  -rw-r--r--  1 root wheel   37557 2008-09-14 12:51 fedora-admin-1.1.2_en.jar
  lrwxr-xr-x  1 root wheel      22 2008-09-14 12:51
fedora-admin-1.1.jar -> fedora-admin-1.1.2.jar
  lrwxr-xr-x  1 root wheel      25 2008-09-14 12:51
fedora-admin-1.1_en.jar -> fedora-admin-1.1.2_en.jar
  -rw-r--r--  1 root wheel 2469020 2008-09-14 12:38 fedora-ds-1.1.2.jar
  -rw-r--r--  1 root wheel   54528 2008-09-14 12:38 fedora-ds-1.1.2_en.jar
  lrwxr-xr-x  1 root wheel      19 2008-09-14 12:51 fedora-ds-1.1.jar
-> fedora-ds-1.1.2.jar
  lrwxr-xr-x  1 root wheel      22 2008-09-14 12:51
fedora-ds-1.1_en.jar -> fedora-ds-1.1.2_en.jar

@ OSX shell, I launch

 fedora-idm-console -D 9 -f console.log

and can successfully connect to FDS server running on a remote box (SLES).

If, in the Fedora Management Console GUI I click through to the
Servers & Applications Tab, and select the Server, I get a "Class
Loader Error" dialog,

    "Failed to instantiate Server Object for Directory Server (fds):
     com.netscape.admin.dirserv.DSAdmin"

@ console.log, I get,

 ...
 ERROR ServerNode.createServerInstance: could not create
com.netscape.management.admserv.AdminServer at fedora-admin-1.1.jar@cn=admin-serv-auth,
cn=Fedora Administration Server, cn=Server Group,
cn=fds.server.pglan.com, ou=pglan.com, o=NetscapeRoot
     Exception: java.lang.ClassCastException:
com.netscape.management.admserv.AdminServer
 ...
 ERROR ServerNode.createServerInstance: could not create
com.netscape.admin.dirserv.DSAdmin at fedora-ds-1.1.jar@cn=admin-serv-auth,
cn=Fedora Administration Server, cn=Server Group,
cn=fds.server.pglan.com, ou=pglan.com, o=NetscapeRoot
     Exception: java.lang.ClassCastException: com.netscape.admin.dirserv.DSAdmin
 ...

Per discussion in #fedora-ds, I've installed Eclipse, & created an
Eclipse project for fedora-idm-console.  Debugging the Eclipse-built
fedora-idm-console jar, exec breaks as above.  The stack @ break is,

fedora_idm_console_jar [Java Application]	
	com.netscape.management.client.console.Console at localhost:50411	
		Thread [main] (Suspended (exception ClassNotFoundException))	
			Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: 356	
			Launcher$AppClassLoader.loadClass(String, boolean) line: 280	
			Launcher$AppClassLoader(ClassLoader).loadClass(String) line: 251	
			Launcher$AppClassLoader(ClassLoader).loadClassInternal(String) line: 374	
	/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java
(Sep 14, 2008 6:19:52 PM)


Where, for reference, in "ClassLoader.class",

347:		} finally {
				if (isChildmost) {
					childmostCaller.remove();
					
					if ((c != null) && name.startsWith("org.apache.") &&
					 ( name.startsWith("org.apache.crimson.") ||
					  name.startsWith("org.apache.xalan.") ||
					  name.startsWith("org.apache.xml.") ||
					  name.startsWith("org.apache.xpath.") ) ) {
356:					AccessController.doPrivileged(new PrivilegedAction() {
													   public Object run() { return
System.setProperty("apple.lang.DisableCompatibilityClasspath",
"true");
													   }});
					}

I'm *guessing* this is OSX-specific, but am unclear as yet.  I'll
further familiarize myself with Eclipse and the FDS code; in the
meantime, any suggestions as to what the problem maybe, or further
debug help would be great.

I can provide additional needed output from Eclipse to as needed.

Thanks.




More information about the 389-devel mailing list