Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Big trouble in little documentation  RSS feed

 
Mark Macza
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded the J2EE server from sun. I created some EJB's, deployed them, everything's wonderful, fine.
The problem comes when I want to access the LDAP. First question, does the J2EE server from Sun even start an LDAP? I think it does because when you start the server with j2ee -verbose, one of the first lines is
Naming Service Started:1050

Sun's server is so poorly documented, I can't even tell, or if I want to install iPlanet or something, I wouldn't even know how to configure the server to point to that LDAP instead of its own. (I checked, there isn't any jndi.properites file that I can find)

Second question, how in the hell do I access it for testing? I can't find any documentation on Sun's J2EE server anyplace that specifies how in the hell to access it.
I tried
Hashtable properties = new Hashtable();
properties.put(InitialContext.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
properties.put(InitialContext.PROVIDER_URL,"ldap://localhost:1050/o=myapp");
InitialContext context = new InitialContext (properties);

it throws a
javax.naming.CommunicationException: Request: 1 cancelled
at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
I'm running my client from Eclipse. Do I have to add something to the enviroment to get it to see it? Doesn't make sense, because if J2EE starts a Naming service on a port, I should just be able to connect to the port and get the information that way no?
I change the port to 389, and I get connection refused error.
I haven't done anything weird here, I just downloaded the standard Sun J2EE server, installed it, and am now trying to access the information in its naming service. Been staring at this for 2 days now, getting frustrated.
Thanks.
 
Mark Macza
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you view the bindings in the j2ee naming service?
How do you add new people, groups, and permissions in the j2ee naming service?
Is there a graphical tool somewhere that lets you view the contents?
What is the scope of a naming service? Are the contents cleared when the service shuts down or are the settings persistant? If they are persistant, where are they held?
How do you configure j2ee to use a different naming service than the one it ships with?
thanks.
 
Mark Macza
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do you access an ldap on a different box?
Where do you specify that in the j2ee applications server?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!