Solved

importing weblogic.common.*

Posted on 2006-06-25
7
614 Views
Last Modified: 2008-02-01
Hi,

I am trying to JNDI capabilities thru weblogic and access a particular database. For my InitialContextTest class, I need to import weblogic.common and weblogic. How do I import those jar files? I couldn’t find in c:\ bea dir.

thx
0
Comment
Question by:dkim18
7 Comments
 
LVL 92

Assisted Solution

by:objects
objects earned 20 total points
ID: 16980426
0
 

Author Comment

by:dkim18
ID: 16980483
I included all the jars in C:\bea81\weblogic81\server\lib, but still got this error.

import javax.naming.*;
import java.util.*;
import java.io.*;
import weblogic.common.*;
import weblogic.jndi.*;
...
...
...
+++++++++++++
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
      weblogic cannot be resolved or is not a type
      Type mismatch: cannot convert from InitialContextTest to Context
      The constructor InitialContextTest(Hashtable) is undefined
      Type mismatch: cannot convert from InitialContextTest to Context
      The constructor InitialContextTest(Hashtable) is undefined

      at InitialContextTest.main(InitialContextTest.java:5)
0
 
LVL 92

Expert Comment

by:objects
ID: 16980558
can u post your code
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 30

Accepted Solution

by:
Mayank S earned 150 total points
ID: 16981183
>> InitialContextTest to Context

You are probably using: InitialContextTest something = new InitialContext () ? You can use InitialContext obj = new InitialContext () ;

>> The constructor InitialContextTest(Hashtable) is undefined

You are probably using InitialContextTest context = new InitialContextTest ( hashtable ) ; You need to use: InitialContext context = new InitialContext ( hashtable ) ;
0
 
LVL 35

Assisted Solution

by:girionis
girionis earned 80 total points
ID: 16990939
If the InitialContextTest is your own class you will need to create an object of that type.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16992123
That's perhaps what he's trying to do but using it as though its an InitialContext, I guess....
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16999428
Any reason for the B grade?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question