Solved

importing weblogic.common.*

Posted on 2006-06-25
7
603 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
allswap challenge 6 96
Java DateChooser? 3 36
jar file executable 12 51
Tomcat: Unable to run tomcat service. 2 18
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

785 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