Re: java.util.NoSuchElementException when logging in

"Keith T. Garner" <[email protected]> Tue, 31 Aug 2004 15:34:37 -0500
Newsgroups gmane.mail.jamm.user
Message-ID <[email protected]>
On Tue, Aug 31, 2004 at 11:05:12, Keith T. Garner said:
> On Tue, Aug 31, 2004 at 01:23:14, Daniel Andersson said:
> > I seem to be the _only_ one having this problem, and I can't figure out 
> > what's wrong.
> 
> I think it mibhg be because you're the only one using gcj!  :) The
> stracktrace you had showed lots of references to libgcj.  Please try
> using a JVM from Sun or Blackdown.  If you still have problems, then
> we'll look into it.
> 
> Currently, we do not support gcj as the VM.

This intrigued me so I did look into why it doesn't work with gcj.  So
I fired up jamm under the stock tomcat from FC2.  It loaded, I tried
to log in, and bewm, got a class not found exception for
"com.sun.jndi.ldap.LdapCtxFactory"

I had forgotten where we referenced that class and dug around the
source.  In jamm.ldap.LdapFacade we invoke that as the ContextFactory
for JNDI.  We do this because for JDNI, you need to specify the
factory to use.  The only "real implementation" of the ldap jndi
factory that comes with the sun/blackdown JVMs is the com.sun one.
Now, in general java coding practice, its a very bad thing to
references com.sun classes directly, but we have little choice.

I searched the web for a bit to see what I could do with gcj to use
instead.  It looks like no one has implemented any third party ldap
JNDI factories.  gcj has the javax.naming stuff, but that package is
made up of mostly interfaces, and not the concrete implementation we
need.

So, I couldn't figure out how you got as far as you did, then it hit
me: It seems you left out one small fact.  You did something naughty
and copied rt.jar into jamm's lib directory.  I tried that and got the
exact same error you got.  In either case, it doesn't work and there's
not much we can really do to fix it.

So, how do we fix this?  If someone can point me at an open
source/free software ldap JNDI factory we can give it a spin.
Unfortunately, because I don't know of such a beast, we're stuck with
having to use the Sun/Blackdown JVMs.

It'd be cool to have jamm work out of the box on FC2.  Hell, I'd even
think about making an RPM.

Keith

-- 
 Keith T. Garner                                        [email protected]
                "Make no little plans; they have no magic to
                   stir men's blood." - Daniel H. Burnham


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click