Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 637
  • Last Modified:

importing weblogic.common.*

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
dkim18
Asked:
dkim18
3 Solutions
 
dkim18Author Commented:
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
 
objectsCommented:
can u post your code
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Mayank SAssociate Director - Product EngineeringCommented:
>> 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
 
girionisCommented:
If the InitialContextTest is your own class you will need to create an object of that type.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
That's perhaps what he's trying to do but using it as though its an InitialContext, I guess....
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Any reason for the B grade?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now