| | |
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 |
Tag cloud for Java
affinetransform android api apple applet application arc arguments array arrays automation binary bluetooth businessintelligence chat class classes client code component database desktop draw ebook eclipse encode equation error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop mac main map method methods mobile netbeans newbie number online open-source oracle parameter print problem program programming project properties recursion reference replaysolutions rotatetext scanner score screen scrollbar server set size sms socket sort sql string superclass swing template test threads time tree windows working xstream





