| | |
JNDI help
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2007
Posts: 8
Reputation:
Solved Threads: 0
This is sasidhar.
I am getting problem with JNDI.
please help to solve this problem.
This is the program I used to work on JNDI.
I am using weblogic 10.0
It is compiling and when I am trying to run this it is showing this problem
please give reply to this problem.
I am getting problem with JNDI.
please help to solve this problem.
This is the program I used to work on JNDI.
I am using weblogic 10.0
Java Syntax (Toggle Plain Text)
import javax.naming.*; import java.rmi.*; import java.util.*; public class UseJndi{ public static void main(String args[]){ try{ Hashtable h = new Hashtable(); h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); h.put(Context.PROVIDER_URL, "t3://localhost:7001"); h.put(Context.SECURITY_PRINCIPAL, "admin");//user h.put(Context.SECURITY_CREDENTIALS, "inetadmin"); Context ic = new InitialContext(h); System.out.println(" initial context = "+ ic); NamingEnumeration ne = ic.listBindings(""); while (ne.hasMore()) { Binding b = (Binding)ne.next(); System.out.println( b.getName()); System.out.println(b.getObject()); } }catch (Exception e){} } }
It is compiling and when I am trying to run this it is showing this problem
Java Syntax (Toggle Plain Text)
E:\programs>java UseJndi Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/kernel/Kerne lStatus at weblogic.jndi.Environment.<clinit>(Environment.java:73) at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont extFactory.java:117) 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.<init>(Unknown Source) at UseJndi.main(UseJndi.java:18)
please give reply to this problem.
![]() |
Similar Threads
- looking for a jsp programmer (Web Development Job Offers)
- JNDI/JDBC lookup problem with Sun Java Application Server 8.2 (Java)
- In about Jboss.xml (Java)
- connection pooling in JSP (Java)
- Connection pooling in java (Java)
- MDB and JMS (Java)
- noobie asking for assistance with file parsing... (Perl)
- fr.dyade.aaa.jndi.Naming ContextFactory (Java)
Other Threads in the Java Forum
- Previous Thread: can someone explain this project to me?
- Next Thread: Mouse Cursor Image
| Thread Tools | Search this Thread |
-xlint add android api applet application array arrays automation bi binary blackberry bluetooth chat class classes client code compile compiler component converter database digit eclipse equation error event exception fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide idea image input int integer j2me java javame javaprojects jetbrains jni jpanel jtable julia learningresources linux list login loop main map method methods mobile myregfun netbeans newbie nonstatic notdisplaying page pearl print problem program programming project qt recursion scanner screen scrollbar server set size sms sort spamblocker sql sqlserver string superclass swing system thread threads tree variablebinding windows xor





