Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classpath - error messages

 
Tom Hutmacher
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!I have here a book about ldap and java, which said that i have to download some files.
The files i'd downloaded by sun.com and now i have to copy them into the classpath, what i 'd done.
Classpath: jsdk../jre/lib/ext - files providerutil.jar + fscontext.jar.
Have I done this correctly?

by executing the java code i get those error messages:

javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.fscontext.FSContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.fscontext.FSContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.(Unknown Source)
at Connect.main(Connect.java:34)
Caused by: java.lang.ClassNotFoundException: com.sun.jndi.fscontext.FSContextFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
... 5 more
Exception in thread "main"

--> i suppose the classpath could be the reason.


does somebody knows what to do?

thx a lot!
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The 2 files are basically required by Weblogic 5.1.

If using Weblogic 6.1 or higher no need to add these 2 files to classpath. Simply adding weblogic.jar will suffice.

Let me know if ur trying to access the LDAP server for accessing the Exchange Server for user related info, the code for importing the same and getting the user info is slightly different.

Rgds,

Seetesh
 
Tom Hutmacher
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Seetesh!

I try to connect to a ldap directory...
for practise use I follwed the examples by my ldab book.

this is the code:



i also added the providerutil and fscontext to the classpath.

i don't think that I need the weblogic.jar...that would be verry confusing to me
 
Tom Hutmacher
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm,
does nobody has an idea?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic