on 08-19-2005 2:49 PM
Hi,
I have been struggling with the following JNDI lookup error
com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name : jdbc/VITSPR , can not resolve object reference [Root exception is java.lang.ClassCastException]
The following are the connection details from simple a java class
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
ht.put(Context.PROVIDER_URL, "igb11004:50004");
ht.put(Context.SECURITY_PRINCIPAL, "Administrator");
ht.put(Context.SECURITY_CREDENTIALS, "******");
Context ctx = new InitialContext(ht);
DataSource ds = (DataSource) ctx.lookup("jdbc/VITSPR");
I have created the above "VITSPR" datasource in Visual Administrator.
I am able to connect using direct method as follows
Class.forName("com.sap.dbtech.jdbc.DriverSapDB");
String url = "jdbc:sapdb://igb11004/VITSPR";
Connection connection = DriverManager.getConnection(url, "RAMBABU", "password");
Statement stmt = connection.createStatement();
Please suggest any help and it's quite urgent for me.
I would appreciate any help.
Thanks in advance.
Rambabu kancharla
Hello Rambabu,
this is the completely wrong forum for this question. Have alook for Enterprise Portal or Java development.
Regards
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.