KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > lang > UnsupportedClassVersionError

java.lang
Class UnsupportedClassVersionError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by java.lang.LinkageError
              extended by java.lang.ClassFormatError
                  extended by java.lang.UnsupportedClassVersionError
All Implemented Interfaces:
Serializable
See Also:
Top Examples, Source Code

public UnsupportedClassVersionError()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[907]Unable to connect to the database
By adityanagaprasad { at } rediffmail { dot } com on 2004/09/20 03:00:10  Rate
Hi 
 I have a small application that is to be deployed in weblogic8.1 server. 
 For this i created a connection pool 'ibs' and a datasource 'ibs'. I am using oracle as by back end.The datasource look up is 'jdbc/ibs'. But i am unable to connect to the database.Below is my code. 
 can anyone help me out ?? 
 Your help will be of great help to me. 
  
  
  
  
 import java.util.*; 
 import javax.naming.*; 
 import java.sql.*; 
 import javax.sql.*; 
 /** 
  * Insert the type's description here. 
  * Creation date:  ( 9/7/2004 6:34:03 PM )  
  * @author: Administrator 
  */
 
 public class TestClass  {  
 /** 
  * TestClass constructor comment. 
  */
 
 public TestClass (  )   
  {  
  }    
  
  
 /** 
  * Insert the method's description here. 
  * Creation date:  ( 9/7/2004 6:46:22 PM )  
  * @param args java.lang.String [  ]  
  */
 
 public static void main ( String [  ]  args )   {  
  
  
     System.out.println ( "Entered the main" ) ; 
     String dsLookUp = "jdbc/ibs"; // Enter value for Database Schema lookup 
     DataSource ds = null; 
     String initCtxt = "weblogic.jndi.WLInitialContextFactory"; 
     Connection conn = null; 
     Context ctx = null; 
     try  {  
       System.out.println  ( "IBSDbUtil : getDataSource : before getInitContext  (  ) "  ) ; 
       Properties prop=new Properties (  ) ; 
       System.out.println  ( "IBSDBUtil : getInitialContext : before prop.put"+initCtxt ) ; 
       prop.put ( javax.naming.Context.INITIAL_CONTEXT_FACTORY, initCtxt ) ; 
       System.out.println  ( "IBSDBUtil : getInitialContext : before prop.put"+initCtxt ) ; 
       ctx = new InitialContext ( prop ) ; 
  
  
       System.out.println  ( "IBSDbUtil : getDataSource : after getInitContext  (  ) "  ) ; 
       ds =  ( DataSource ) ctx.lookup ( dsLookUp ) ; 
      }  
     catch  ( Exception ex )   {  
       ex.printStackTrace (  ) ; 
       // Handle exception 
      }  
  
  
  
  
     try 
      {  
   System.out.println ( " IBSDbUtil : getDbConnection :Before getConnection: ds.toString (  )  "+ds.toString (  )  ) ; 
   conn = ds.getConnection ( "ebank","ebank" ) ; 
    
    
      }  
     catch  ( SQLException ex )  
      {  
       System.out.println ( "IBSDbUtil : getDbConnection: SQLException: "+ex ) ; 
      }  
     catch  ( Exception ex )  
      {  
       System.out.println ( "IBSDbUtil : getDbConnection: Exception: "+ex ) ; 
      }  
     System.out.println ( " IBSDbUtil : getDbConnection :return" ) ; 
    
    }  
  }  
 


public UnsupportedClassVersionError(String s)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags