Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

importing weblogic.common.*

Posted on 2006-06-25
7
Medium Priority
?
633 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 92

Assisted Solution

by:objects
objects earned 60 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
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 
LVL 30

Accepted Solution

by:
Mayank S earned 450 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 240 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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 …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses

670 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